E2E visual regression tests using Playwright + Applitools for dYdX trading interface.
- Install dependencies:
npm install
- Create
.env.local
file:
APPLITOOLS_API_KEY=your_key
METAMASK_VERSION=12.18.3
METAMASK_PASSWORD=your_test_password
SEED_PHRASE=your_test_seed_phrase
USE_APPLITOOLS=true
LOCAL_RUN=true
DEPLOYMENT_ID=manual
ENV_PATH=.env.local npx playwright test
ENV_PATH=.env.local npx playwright test --grep "Connect MetaMask Wallet"
You can skip a test by appending .skip
to the test
function. This is useful when a test is failing du
6A16
e to a known issue that you don't want to fix immediately.
Skip a single test:
test.skip('test name', async ({ page }) => {
// test code
});
Skip a test suite:
test.describe.skip('describe block name', () => {
// all tests in here are skipped
});
tests/
├── dydx.trade/ # Test suites
├── connect-wallet/ # Wallet connection flow
│ ├── metamask/ # MetaMask specific tests
│ └── connect-wallet.spec # General connection tests
├── market-page/ # Trading interface tests
└── not_connected/ # Logged out state tests
Interactions/ # Reusable actions
├── dydx/ # dYdX specific actions
└── wallets/ # Wallet interactions
- Automated MetaMask Setup: Extension is downloaded and configured automatically
- Visual Testing: Powered by Applitools Eyes