Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Cypress doc updates #553
base: main
Are you sure you want to change the base?
Cypress doc updates #553
Changes from all commits
f0435ac
1a61a8b
d4066cd
1eb2e40
4c9acbc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a description somewhere about what a page object is and why we're using them? I expect that some people interacting with the tests will be unfamiliar with the concept
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to add some info about the
check
pattern in the page object modelThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another tenet (which the old Cypress tests didn't consider):
Data stability: The tests are running against a real environment with data changing continuously outside of our control. Try to avoid relying on the test data being in a certain state (e.g. "Trust 'x' has 13 academies" or "Searching for 'y' gives 122 results") by being a little fuzzy (e.g. "Trust 'x' has more than 1 academy" or "Searching for 'y' gives several pages of results"). Where this isn't possible (e.g. testing for different behaviour when a trust is missing data) use the page object to clearly state what the data requirement is and to make it easy to change when the test data changes (e.g.
governancePage.navigateToEmptyGovernancePage()
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can improve the structure of this segment so the lists are entirely independent.
E.g.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Apologies for not understanding that this was the intended layout when we were going through the linting errors in this area before)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually (when we're more in the swing of things) we should be adding new automated tests in the same branch as the new feature code because we'll be using automated-first testing assurance and things don't get merged to main until they're ready for release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the "negative tests of any assertions to check for false positives", it would be great to give it a bit more prominence on the page.
What about creating a section for it in "When creating your test it is important to have the following tenets in mind:"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a link to the automated test creation doc somewhere in this section to help tell people about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't be recommending this method - I'm writing some docs about a secure way of getting Cypress to work on a DfE machine.
I think we should replace this with a prompt to look in internal DfE docs for help getting the laptop set up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this step we need to configure the secrets so Cypress can talk to FIAT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a file in
tests/DFE.FindInformationAcademiesTrusts.CypressTests
calledcypress.env.json
which contains the following:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before seeing specs we need to select the "E2E Testing" option and desired browser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep docs tidy, we can should delete this line and reintroduce it when ZAP is working again