Testing E2E
This section describes how developers will test codebase related to the e2e tests.
Testing stack
All of our UI tests MUST be done using Cypress as the main testing frameworks with Synpress for wallet support. The test's code MUST be written using Typescript and ran using ts-jest to have type checking support.
Directory structure
New tests MUST be placed in a tests/e2e directory, in the root path. The files will be named as the flow that they will be testing, that is, if the e2e tests file will be testing the Collection Publication flow, the name of the file MUST be collection-publication.spec.cy.ts.
How frequent they will run
Scheduled via GitHub Actions. Frequency TBD.
What to test
Most relevant user interactions in the dApps (Items Publications, NFTs Purchases, etc.)
How to test
All of our tests MUST follow the semi-structured style of Given-When-Then (GWT).
The following example:
Given a user visits
https://example.cypress.ioWhen they click the link labeled
typeAnd they type "[email protected]" into the
[data-testid="action-email"]inputThen the URL should include
/commands/actionsAnd the
[data-testid="action-email"]input has "[email protected]" as its value
Should be written as:
Testing contracts
For testing smart contracts, refer to the Solidity Standards documentation.
Last updated