Skip to content

Functional Test: Desktop - Display a Foraging Site #484

@gcardonag

Description

@gcardonag

Is your feature request related to a problem? Please describe.
As a PHLASK developer, I would like to have automated testing of displaying Foraging 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/siteInfo.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 one of the taps that appear on the map
    4. Confirm that the window that pops up shows the correct description text for the location
  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.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions