-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/add incident report cypress test #444
base: dev
Are you sure you want to change the base?
Conversation
Also changes the url to the full localhost url. This is done so the tests can actually get to the point where they run as uncaught issues were otherwise blocking them before they even got started. We can debug this later
Ignores videos and screenshots generated from cypress studio
Also adds comments and sections off different tabs in the code
Also changes the url to the full localhost url. This is done so the tests can actually get to the point where they run as uncaught issues were otherwise blocking them before they even got started. We can debug this later
Ignores videos and screenshots generated from cypress studio
Also adds comments and sections off different tabs in the code
also renames tests to run in order
…l/coral-arches into feature/cypress-tests
also renames tests
I've also left some comments in the spreadsheet and marked everything that should've been included in this with orange. Some fields were marked green but aren't getting checked in the tests. Rich textboxes aren't tested whatsoever |
|
||
// Record of the incident | ||
cy.wait(4000) | ||
cy.get('[aria-label="Name"]').click(); // Name textfield should be disabled and prefilled |
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.
This would not test if the input is disabled. Also applies to other inputs that were tested for being disabled with a click. See https://docs.cypress.io/api/commands/should#Examples on how to properly test for disabled elements
cy.get('[style="display: flex"] > .fa').contains('Start New').click(); | ||
|
||
// Inital Step tab | ||
cy.get('.tabbed-workflow-footer-button-container > .btn').contains('Next Step').click(); |
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.
Doesn't check if the HA Number is actually populated
|
||
cy.get('.card_component.issue_identifier').contains('Add new Relationship').scrollIntoView().click() // Issue identified by dropdown | ||
cy.wait(4000); | ||
cy.get('.select2-results__option').first().click(); |
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.
This should not use a random person but instead the one created by the tests
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.
The same applies to all the relationships selects that use .first()
Cypress tests for Incident report workflow.
Not covered Fully is the file upload and map tabs will have to potentially be manually tested as they have been quick tricky
Spreadsheet attached
https://docs.google.com/spreadsheets/d/1C1ctkKZdIIUjVUsPxAQOL-HQN3VMxsLEquoysLvVKBk/edit?hl=en_GB&pli=1&gid=1878271857#gid=1878271857
Flag for enforcement branch will need to merge 1st (Andreas)