This is a guide to running Cypress tests in Protocol Designer.
cat Makefile
to see all the available commands
cypress/e2e
contains all the testscypress/support
contains all the support filescypress/support/commands
contains added commands and may be used for actions on the home page and header- use the files representing the different parts of the app to create reusable functions
../fixtures
(PD root fixtures) andcypress/fixtures
contains all the fixtures (files) that we might want to use in tests
We need to read data from files. support/testFiles.ts
maps in files and provides an enum to reference them by. All files that need to be read in should be mapped through testFiles.
https://docs.cypress.io/app/core-concepts/best-practices#Selecting-Elements
- use a simple cy.contains()
- try aria-* attributes
- data-testid attribute (then use getByTestId custom command)