Files
Daniel DimitrovandGitHub ac164e7f48 test(mobile): refactor the e2e tests (#6642)
* fix(mobile): infoSheet loses content

* test(mobile): refactor e2e tests

Reorganise the e2e test and make them easier to maintain. The previous structure was monotlithic. One would start the history tests and would have to wait for all of them to complete. Now one can test individual features - like twap, swap, stake txs without having the run the whole flow. Each of those can be run on it’s own. They can also be run as a whole in the __suite__ - every suite is optimised to start the app once and then to run flow without uninstalling and instalilng the app again.

* test(mobile): run tests on android as well

* test(mobile): fix wrong mock data

* fix(mobile): linting

* test(mobile): make assertions android compatible

* fix(mobile): prettier

* test(mobile): add stake claim test

* test(mobile): speed up app launch in dev mode

* test(mobile): test improvements

* test(mobile): unstable hooks caused app to crash

There was somethign wrong with AssetsNavbar and the way that react-navigation renders it. In tests we got crashes due to different number of hooks being rendered

* test(mobile): fix prettier
2025-11-14 18:02:10 +01:00

2.1 KiB

E2E Tests

The E2E tests are written for Maestro

Use Cursor together with Meastro Studio. In Cursor attach the maestro docs, screenshots, any source file or test file that would be of help for the model to write the tests. Guide the AI - tell it what test you want to write, how it should be structured, point it to a similar test, give it the screenshots, tell it which steps follows after which, tell it if it needs to do something like scroll in the test. With this the test should be 99% correct. You run it in Maestro and make small modifications.

Quick Start

# Run all tests
maestro test .

# Run smoke tests (fast validation)
maestro test --include-tags smoke tests/

# Run pending transaction suite
maestro test tests/transactions/pending/__suite__.yml

# Run single test
maestro test tests/transactions/pending/send-transaction.yml

Structure

e2e/
├── tests/                          # All runnable tests
│   ├── onboarding/
│   ├── assets/
│   ├── transactions/
│   │   ├── pending/__suite__.yml   # Suite for fast execution
│   │   └── history/__suite__.yml
│   └── settings/
└── utils/                          # Reusable utilities (not run standalone)
    ├── setup/
    ├── assertions/
    └── components/

Tags

  • smoke - Critical path tests (run on every PR)
  • onboarding, assets, transactions, settings - Feature categories
  • pending, history - Transaction subcategories

Test Modes

Development (Fast Iteration)

maestro test tests/transactions/pending/send-transaction.yml

PR Validation (Smoke Tests)

maestro test --include-tags smoke tests/

Feature Testing

maestro test --include-tags pending tests/
maestro test --include-tags cow-protocol tests/

Full Run (Nightly)

maestro test tests/transactions/pending/__suite__.yml
maestro test tests/transactions/history/__suite__.yml
maestro test tests/onboarding/__suite__.yml
maestro test tests/assets/__suite__.yml