all repos — caroster @ 2c7296589b29fe5ac46d3e65e14931a57022a709

[Octree] Group carpool to your event https://caroster.io

e2e/README.md (view raw)

 1# E2E tests for Caroster
 2
 3This directory is used to test all Graphql endpoints used by Caroster's frontend.
 4
 5## Run tests
 6
 71. Install dependencies
 8   ```bash
 9   yarn
10   ```
111. Refresh GQL generated file (if any change)
12   ```bash
13   yarn gql
14   ```
151. Start Strapi in test env
16   ```bash
17   cd backend/
18   yarn start-test
19   ```
201. Run E2E tests
21   ```bash
22   cd e2e/
23   yarn test # Add '--watch' for watch mode
24   ```
25
26## Credentials
27
28### Admin & User
29
30test@octree.ch | Testtest1
31
32## How to generate a new template db
33
34Tests need a seeded Sqlite db for Strapi.
35Following Strapi upgrades, the db file has to be updated.
36
37To generate a new template db, follow these steps:
38
391. Upgrade Strapi
401. Start Strapi with the old db file
411. Ensure following data are presents (Check `constants.ts` for right values):
42   - User with email _test@octree.ch_ and password _Testtest1_
43   - Event with UUID _2c336e59-087d-4dec-bf9b-f74b1ca22cd4_
44   - Travel associated to the event
45   - Vehicle associated to the user
46   - Settings exist in fr and en
471. Stop Strapi
481. Rename `template.db` by `test.db` content in `e2e/strapi` directory