|
| 1 | +# Catalyst Voices E2E Tests |
| 2 | + |
| 3 | +End-to-end tests for the Catalyst Voices web application using Playwright. |
| 4 | +Unlike regular Playwright setups, this project will connect to already existing browser binary via CDP |
| 5 | +and the app will run locally. |
| 6 | + |
| 7 | +## Scope |
| 8 | + |
| 9 | +These tests cover browser-based end-to-end workflows for the Catalyst Voices application: |
| 10 | + |
| 11 | +* **Cardano wallet integration testing** (Lace, Eternl, Yoroi, Nufi) |
| 12 | +* **User authentication and account management** |
| 13 | +* **Cross-environment testing** (dev, staging, prod) |
| 14 | +* **Browser extension interaction** |
| 15 | +* **Application title and basic navigation** |
| 16 | + |
| 17 | +## Building & Setup |
| 18 | + |
| 19 | +### Prerequisites |
| 20 | + |
| 21 | +* **Node.js** (v18 or higher) |
| 22 | +* **npm** package manager |
| 23 | +* **Chrome for testing** ([Download manually](https://googlechromelabs.github.io/chrome-for-testing/)) |
| 24 | +* Ability to run the app locally (Check `catalyst_voices/README.md` for instructions) |
| 25 | + |
| 26 | +### Installation |
| 27 | + |
| 28 | +1. Run the app locally: |
| 29 | + |
| 30 | + This ensures the app will be running on port 5555. |
| 31 | + |
| 32 | + ```bash |
| 33 | + cd catalyst_voices/apps/voices && |
| 34 | + flutter run --flavor preprod --web-port 5555 |
| 35 | + --web-header "Cross-Origin-Opener-Policy=same-origin" |
| 36 | + --web-header "Cross-Origin-Embedder-Policy=require-corp" |
| 37 | + -d web-server lib/configs/main.dart |
| 38 | + ``` |
| 39 | + |
| 40 | +2. In new terminal, navigate to the e2e tests directory: |
| 41 | + |
| 42 | + ```bash |
| 43 | + cd catalyst_voices/apps/voices/e2e_tests |
| 44 | + ``` |
| 45 | + |
| 46 | +3. Install dependencies: |
| 47 | + |
| 48 | + ```bash |
| 49 | + npm install |
| 50 | + ``` |
| 51 | + |
| 52 | +4. Run the e2e tests: |
| 53 | + |
| 54 | + ```bash |
| 55 | + npx playwright test |
| 56 | + ``` |
0 commit comments