Note: This is a minimalist POC to research the technical feasibility of token-negotiator user-interface testing. It has been kept deliberately simple. It is not DRY and there are no abstraction layers for test steps and element locators etc.
- Node 16.14.2
- Cypress 9.5.3
- cypress-metamask-v2 1.6.10
- MetaMask 9.5.1
- Chrome 100
- Windows 10 | macOS 12.1
npm install npm run patch
On-chain tests only
- Create a
.envfile with the entry
ON_CHAIN_SECRET_WORDScontaining the pass phrase for a wallet containing at least one test NFT.
- Fork token-negotiator-on-chain-poc-example and configure the negotiator client in
index.htmlwith a contract containing at least one owned test NFT.
- Modify the on-chain-poc spec test data to match the requirements of the test NFT.
Run test specifications individually with
npm run <Script>.
|hotel-passive||test:passive||Smoke test no tickets issued|
|hotel-passive-e2e||test:passive-e2e||Issue tickets and obtain benefits|
|ticket-issuer||test:issuer||Confirm tickets can be issued|
|hotel-active||test:active||Smoke test no tickets issued|
|hotel-active-e2e||test:active-e2e||Issue tickets and obtain discount|
|on-chain-poc||test:on-chain||Use an NFT to obtain special offers|
Note that tests requiring MetaMask cannot be run in headless mode.