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/55: Cypress test initial setup #155

Merged
merged 30 commits into from
Oct 27, 2021
Merged

Conversation

Sidsector9
Copy link
Member

@Sidsector9 Sidsector9 commented Sep 14, 2021

Description of the Change

The following tests focus on the backend settings:

  • Checks if the settings fields are shown/hidden as per design on page load
  • Conditional fields work as expected based on selection
  • IPv4 and IPv6 addresses can be added/removed and saved
  • Redirection settings can be edited and saved
  • Simple messaging can settings be edited and saved. Also checks if the textarea toolbar controls are working properly
  • Validates the simple messaging text shown on the frontend
  • Validates redirect to a web address with HTTP codes 301, 302 and 307
  • Redirects restricted visitors to login page and allows access to home page to unrestricted visitors.

@jeffpaul jeffpaul added this to the 7.3.0 milestone Sep 14, 2021
Copy link
Contributor

@dinhtungdu dinhtungdu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Sidsector9, running the whole tests on my local using npm run cypress:open and I got two errors, please check the attached screenshots for more details:

Is able to add IPv4 and IPv6 address without and without label
image

Is able to remove IP address
image

@Sidsector9
Copy link
Member Author

@dinhtungdu did you manually add "Test IP"? Can you delete it and test?
The checks are done based on array index. Since "Test IP" is added, the test fails as the index is moved by 1.

@dinhtungdu
Copy link
Contributor

@dinhtungdu did you manually add "Test IP"? Can you delete it and test?
The checks are done based on array index. Since "Test IP" is added, the test fails as the index is moved by 1.

@Sidsector9 I'm sorry, that's my bad. After resetting the environment, the test is passing.

on:
push:
branches:
- e2e/55-default-admin-settings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is passing, but we need to update this run condition before merging.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes absolutely, this is just so that I can ensure things are working well on Github Actions

package.json Outdated
Comment on lines 20 to 22
"dependencies": {
"cypress-file-upload": "^5.0.8"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package should be a dev dependency too.

@Sidsector9 Sidsector9 force-pushed the e2e/55-default-admin-settings branch 2 times, most recently from a09180f to 8e65278 Compare October 13, 2021 15:33
…icted-site-access into e2e/55-default-admin-settings
@Sidsector9 Sidsector9 force-pushed the e2e/55-default-admin-settings branch from 8e65278 to 53f37a1 Compare October 18, 2021 07:10
@Sidsector9 Sidsector9 requested a review from dinhtungdu October 18, 2021 07:26
dinhtungdu
dinhtungdu previously approved these changes Oct 26, 2021
Copy link
Contributor

@dinhtungdu dinhtungdu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sidsector9 Awesome work! LGTM! 🎉

@jeffpaul
Copy link
Member

@Sidsector9 anything additional you want to get into this PR or you good for merge?

@Sidsector9
Copy link
Member Author

@jeffpaul not in this PR as the changes in this are big already. I have created a separate issue for another test #164.
This one's good to merge.

@jeffpaul jeffpaul merged commit 9eee1d9 into develop Oct 27, 2021
@jeffpaul jeffpaul deleted the e2e/55-default-admin-settings branch October 27, 2021 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing: implement automated tests + write manual functional test instructions
3 participants