Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[E2E test] Add Cypress test - Setup menu #794

Closed
enikonemeth opened this issue Aug 18, 2020 · 7 comments · Fixed by #1046
Closed

[E2E test] Add Cypress test - Setup menu #794

enikonemeth opened this issue Aug 18, 2020 · 7 comments · Fixed by #1046
Assignees
Labels
cypress good first issue Good for newcomers hacktoberfest Newcomers welcome! help wanted Extra attention is needed test

Comments

@enikonemeth
Copy link
Contributor

enikonemeth commented Aug 18, 2020

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 Setup menu works as it is intended.

image

😎 Role

All test should run as admin.

Test case 1

🧫 Purpose of the test

Right click on a "settings item" should make context-menu open.

🐾 Steps

  1. Login with admin role
  2. Click on 'Setup' menuitem
  3. Step: Right click on DocumentPreview.settings item
    Expected result: The context-menu dropdown should be visible with the following actions:
  • Browse
  • Copy to
  • Edit
  • Move to
  • Check out
  • Download
  1. Click away

Test case 2

🧫 Purpose of the test

Click on Edit button should open a binary editor with the content of the 'settings item'.

🐾 Steps

  1. Step: Click on Edit button of DocumentPreview.settings item
    Expected result: A binary editor has appears with the content of DocumentPreview.settings on a new page. The page should contain the name of the 'settings item' (DocumentPreview.settings)
  2. Click on Cancel button

Test case 3

🧫 Purpose of the test

Click on 'Learn more' button should open the document of the selected 'settings item'.

🐾 Steps

  1. Step: Click on 'Learn more' button of DocumentPreview.settings item
    Expected result: The document of DocumentPreview.settings should open (link: https://community.sensenet.com/docs/admin-ui/setup/#documentpreview-settings)
@enikonemeth enikonemeth added the hacktoberfest Newcomers welcome! label Aug 18, 2020
@herflis herflis changed the title [E2E test] Setup menu [E2E test] Add Cypress test - Setup menu Oct 7, 2020
@herflis herflis added cypress good first issue Good for newcomers help wanted Extra attention is needed labels Oct 7, 2020
@mitcom
Copy link
Contributor

mitcom commented Oct 12, 2020

I tried to "semi manually" (manually but in Cypress app) preview those test cases and I have some differences in the very beginning.
Test case 1, expected behaviour:

  • Browse
  • Copy to
  • Edit
  • Move to
  • Versions
  • Check out
  • Share (disabled)
  • Delete
  • Set permissions
  • Download

I have
Screenshot from 2020-10-12 14-41-20

I thought about the permissions mismatch, but I should be logged in as admin as I assume cy.login() does

@herflis
Copy link
Contributor

herflis commented Oct 12, 2020

I tried to "semi manually" (manually but in Cypress app) preview those test cases and I have some differences in the very beginning.
Test case 1, expected behaviour:

  • Browse
  • Copy to
  • Edit
  • Move to
  • Versions
  • Check out
  • Share (disabled)
  • Delete
  • Set permissions
  • Download

I have
Screenshot from 2020-10-12 14-41-20

I thought about the permissions mismatch, but I should be logged in as admin as I assume cy.login() does

thank you @mitcom for reporting this! 💙 Yes, you're right, it seems that the menuitems was changed since the test case is written. I'm updating the issue.

@milantenk
Copy link
Contributor

I would like to work on this issue, could you please assign it to me?

@herflis
Copy link
Contributor

herflis commented Oct 17, 2020

Hi @milantenk it is assigned to you now. Let us know if we can help you with anything

@milantenk
Copy link
Contributor

Should I add data-test attribute where it is necessary or should I use CSS classes / XPaths in those cases where a data-test attribute would be handy?

@enikonemeth
Copy link
Contributor Author

enikonemeth commented Oct 20, 2020

Should I add data-test attribute where it is necessary or should I use CSS classes / XPaths in those cases where a data-test attribute would be handy?

Dear @milantenk,
We prefer data-test attributes, you can add them where you need it :) Good luck!

@milantenk
Copy link
Contributor

Okok, thank you for the quick reaction! :)

@herflis herflis linked a pull request Oct 26, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cypress good first issue Good for newcomers hacktoberfest Newcomers welcome! help wanted Extra attention is needed test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants