The "Swap" feature in the Mento application is a critical component that allows users to exchange cryptocurrencies directly within the platform. This feature's reliability and security are essential for maintaining user trust and ensuring the smooth operation of the Mento protocol.
Please follow the guide to setup the EnviormentSetup.md
The detailed test plan could be accessed here TestPlan.md
- Install dependencies with pnpm version 9.7.1
nvm usepnpm install- Start MetaMask Test Dapp in a seprate Terminal [If runing locally]:
pnpm run serve:test-dapp- Install Playwright: [If not already installed]
pnpm exec playwright install- Either export the variables to your local ~/.zshrc or locally add it to the .env file:
export SEED_PHRASE=<Your seed phrase>export WALLET_PASSWORD=<Your wallet password>- Build cache with our CLI by using a script:
# You can either build cache in a headed mode:
pnpm run build:cache
# Or in a headless mode:
pnpm run build:cache:headless- Run Playwright tests as you would normally do:
# Use one of our scripts:
pnpm run test:playwright:headful
pnpm run test:playwright:headless
### ⚠️ Important note ⚠️
Currently, tests are triggered in a headed mode by default. Add `HEADLESS=true` to run them in a headless mode.