-
-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
Milestone
Description
Description
End-to-end tests confirming user can open form, fill it, and submit successfully.
NOTE: If working on this before #648 and #649 are completed, it is acceptable that the test will not pass. It will still help us do quick validation once they are completed by targeting the newly created resources.
- Add a Cypress test that performs the following actions in
cypress/e2e/desktop/suggestion.cy.js- Clicks on any tap on the page
- Clicks on the "Edit" button on the modal that appears
- Fills out the form, making sure to fill out all pages of the form (See: https://github.com/phlask/phlask-map/blob/develop/cypress/e2e/desktop/crowdsourcing.cy.js for a reference implementation of that)
- Does NOT click the "Submit" button (to avoid adding junk data to our database)
- If necessary, add
data-cyattributes to resources in order to allow Cypress to target them for clicking/writing/etc.- For an example of how to target elements, see the the
should successfully submit a water site for testingtest in thecypress/e2e/desktop/crowdsourcing.cy.jsfile. - For an example of how components are updated to support the example above, see line 27 of the
src/components/AddResourceModal/ChooseResource.jsxfile.
- For an example of how to target elements, see the the
- When opening a Pull Request for this story, make sure to include a video recording of the completed test to help reviewers.
- When you run tests locally, a video of the test should automatically be recorded in the
cypress/videosfolder.
- When you run tests locally, a video of the test should automatically be recorded in the
Complexity
~100 LOC test file; integration + mock API