SenseNet / sn-client

Monorepo for sensenet client packages 🐱‍💻
https://sensenet.com
GNU General Public License v2.0
25 stars 37 forks source link

🧪 [E2E test] Add Cypress test - Document viewer #869

Open herflis opened 4 years ago

herflis commented 4 years ago

Before you start working on an issue please take a look at our dedicated hacktoberfest site to learn the basic rules and find additional resources to help you get started.

🧪E2E test cases

The scope of these tests is to ensure that the Document (preview) viewer works as it is intended.

image

Test case 1

😎 Role

All test should run as admin.

🧫 Purpose of the test

Double-clicking on a file in the grid opens its preview in document viewer

🐾 Steps

  1. Login with admin role
  2. Click on 'Content' menuitem
  3. Click on IT workspace in the tree
  4. Click on Document library in the tree
  5. Click on Chicago in the tree
  6. Double click BusinessPlan.docx in the grid Expected result: Document viewer opens, the documents name is displayed in the docviewer's toolbar

Test case 2

🧫 Purpose of the test

Scrolling on document's pages is available and works as it is intended.

🐾 Steps

  1. Open BusinessPlan.docx in the document viewer (steps are the same as above)
  2. Scroll down in the document viewers scrolling area with 1500 pixels Expected result: Page 4 should be displayed as current page in the toolbar

Test case 3

🧫 Purpose of the test

Jump to page function works as it is intended

🐾 Steps

  1. Open BusinessPlan.docx in the document viewer (steps are the same as above)
  2. Click on the page number in the toolbar
  3. Change the inputs value to 4 Expected result: Preview list should be scrolled to the 4th page of the document.
simarpreetsingh-019 commented 4 years ago

so as far as I can understand, I just need to test these cases?

if that's the case, then how would one will be making a pull request then?

herflis commented 4 years ago

Hi @simarpreetsingh-019 have you read the contribution guide? You have to implement the above mentioned cases as automated tests. I hope you will find the answers to your questions in the linked guide :)