You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Guide for running the Thunderbird Appointment E2E tests.
4
4
5
-
## Prerequisite
6
-
7
-
You must have a pre-existing Appointment user test account (using FxA credentials) on the platform where you are running the tests. ie. For the production sanity test you must have an Appointment test account on production (using production FxA credentials) already set up.
8
-
9
-
The tests expect that default Appointment application settings exist for the provided test user; for example the user scheduling availability hasn't been changed from the default settings; and the default calendar view is the current month view. This is important so that the tests can find an available booking slot, etc.
10
-
11
5
## Installation
12
6
13
7
First install the E2E suite (includes Playwright):
@@ -23,13 +17,95 @@ Next install the Playwright browsers (Playwright uses it's own bundled browers)
23
17
npx playwright install
24
18
```
25
19
26
-
## Running Locally
20
+
## E2E Test Prerequisites
21
+
The E2E tests require an existing Appointment (and corresponding FxA account) and associated data, and reads this from your local .env file. This includes:
22
+
- Credentials for an existing Appointment (FxA) account (email address, password)
23
+
- The account user's display name and share link:
24
+
- The display name is found in Appointment => Settings => Account => Display name.
25
+
- The share link is found in Appointment => Settings => Account => My Link.
26
+
- The tests also require an email address to be used as the appointment bookee's email address when actually requesting bookings. This is the email address entered on the `Book selection` dialog (after an appointment slot was selected on the booking share link page). Note that real Appointment emails will be sent to this email address.
27
+
28
+
The tests expect that the default Appointment application settings haven't been changed for the provided test user:
29
+
- The user scheduling availability hasn't been changed from the default settings;
30
+
- In the dashboard the default calendar view is the current month view; this is important so that the tests can find an available booking slot, etc.
31
+
- In `Booking Settings`, the `Booking Confirmation` option is enabled, so that requested appointments generate HOLD appointments that need to be confirmed
32
+
33
+
## Running the E2E tests against your local dev environment
34
+
35
+
First ensure that you have a local Appointment account created and you can sign in to Appointment at http://localhost:8080/.
36
+
37
+
Then copy over the provided `.env.dev.example` to a local `.env`:
38
+
39
+
```bash
40
+
cd test/e2e
41
+
cp .env.dev.example .env
42
+
```
43
+
44
+
Then edit your local `.env` file and provide the following values:
To run the E2E tests headless (still in `test/e2e`):
90
+
91
+
```bash
92
+
npm run e2e-test
93
+
```
94
+
95
+
To run the E2E tests with a UI so you can watch the tests run (still in `test/e2e`):
96
+
97
+
```bash
98
+
npm run e2e-test-headed
99
+
```
100
+
101
+
To run the E2E tests in debug mode (still in `test/e2e`):
102
+
103
+
```bash
104
+
npm run e2e-test-debug
105
+
```
106
+
107
+
## Running the production sanity test
27
108
28
-
The E2E tests require credentials for an existing Appointment (FxA) account and reads these from your local env vars.
29
-
This includes the existing Appointment account's email address, password, user's display name and share link.
30
-
The display name is found in Appointment => Settings => Account => Display name.
31
-
The share link is found in Appointment => Settings => Account => My Link.
32
-
The tests also require an email address to be used when actually requesting bookings. This is the email address entered on the `Book selection` dialog (after an appoitment slot was selected on the booking share link page). Note that real Appointment emails will be sent to this email address.
33
109
First copy over the provided `.env.prod.example` to a local `.env`:
34
110
35
111
```bash
@@ -39,11 +115,11 @@ cp .env.prod.example .env
39
115
40
116
Then edit your local `.env` file and provide the following values:
Also in order to run on BrowserStack you need to provide your BrowserStack credentials. Sign into your BrowserStack account and navigate to your `User Profile` and find your auth username and access key. In your local terminal export the following env vars to set the BrowserStack credentials that the tests will use:
0 commit comments