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

Functional Test: Mobile - Filter Foraging Sites #488

Open
gcardonag opened this issue Jul 20, 2024 · 0 comments
Open

Functional Test: Mobile - Filter Foraging Sites #488

gcardonag opened this issue Jul 20, 2024 · 0 comments

Comments

@gcardonag
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As a PHLASK developer, I would like to have automated testing of filtering Food sites so that this functionality works consistently throughout any future site development.

Describe the solution you'd like

  1. Add a Cypress test that performs the following actions in cypress/e2e/mobile/filters.cy.js
    1. Click on the "Resources" button on the bottom toolbar
    2. Click on the "Foraging" button on the resources modal
    3. Click on the "Filter" button on the top toolbar
    4. Select a combination of "Forage Type", "Features", and "Entry Type" options, then click "Apply".
      a. Make sure that the combination shows at least one tap using test data.
      b. If necessary, modify the test data in public/testData.json so that there is a valid site for the applied filters.
    5. Confirm that a tap matching the filter is showing on the map.
    6. Confirm that a tap not matching the filter does not show on the map.
    7. Click on the "Clear All" button
    8. Confirm that a tap that was previously not matching the filter shows on the map.
  2. If necessary, add data-cy attributes 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 testing test in the cypress/e2e/desktop/crowdsourcing.cy.js file.
    • For an example of how components are updated to support the example above, see line 27 of the src/components/AddResourceModal/ChooseResource.jsx file.
  3. 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/videos folder.

Describe alternatives you've considered
N/A

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant