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
Copy file name to clipboardExpand all lines: e2e/README.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,11 +35,15 @@ Install Cypress on your local machine by following [these instructions](https://
35
35
- Clone the API Service Portal repository
36
36
- Run `./e2e $ npm i` to install all the dependencies
37
37
38
+
### Test data dependencies
39
+
40
+
Many tests cannot be run independently because they depend on state established by other tests. These dependencies are [documented](test-data-dependencies.md) to assist in running tests selectively.
41
+
38
42
### Running Cypress Locally
39
43
40
-
-`./e2e/cypress.json` contains the web app config. Update the file to use local or dev version of the portal for executing the tests
44
+
-`./e2e/cypress.config.ts` contains the web app config. Update the file to use local or dev version of the portal for executing the tests
41
45
42
-
- Recommendation is to use local version of portal. Use `docker-compose` to create local development environment
46
+
- Recommendation is to use local version of portal. Use `dockercompose` to create local development environment
43
47
44
48
#### Cypress Test Runner
45
49
@@ -52,14 +56,14 @@ Install Cypress on your local machine by following [these instructions](https://
52
56
53
57
### Docker Compose
54
58
55
-
- Run `docker-compose up` to spin up a local development environment, which includes Cypress as one of the services and it executes all the tests and generates the HTML report
56
-
- Run `docker-compose down` to tear down the environment
59
+
- Run `dockercompose up` to spin up a local development environment, which includes Cypress as one of the services and it executes all the tests and generates the HTML report
60
+
- Run `dockercompose down` to tear down the environment
57
61
58
62
#### GitHub Actions
59
63
60
-
- Any new commit pushed to `util/*automation*` branch triggers job (`.github/workflows/aps-cypress-e2e.yaml`) and it spawns all the services including cypress to execute the test suite
64
+
- Any new commit pushed to a `cypress*` branch or `test`, triggers the job (`.github/workflows/aps-cypress-e2e.yaml`) and it spawns all the services including Cypress to execute the test suite
61
65
62
-
- The test results would be uploaded to `https://www.cypress.io/dashboard/`
66
+
- The test results would be uploaded to `https://www.cypress.io/dashboard/`, as well as attached as an artifact on the GitHub Action run.
63
67
64
68
## 3. Cypress on Windows
65
69
@@ -85,7 +89,7 @@ WSL 2 or your local machine are prefaced with `WSL` and `LM` respectively in the
85
89
86
90
### `WSL`: Build and Run Dev Environment
87
91
88
-
- Inside the `api-services-portal` directory, build and run the application by running `docker-compose up` at the project root.
92
+
- Inside the `api-services-portal` directory, build and run the application by running `dockercompose up` at the project root.
89
93
90
94
### `LM`: Install E2E Testing Dependencies
91
95
@@ -97,13 +101,13 @@ WSL 2 or your local machine are prefaced with `WSL` and `LM` respectively in the
97
101
98
102
## 4. Creating Tests
99
103
100
-
After you run `npm run cy:open`, the Cypress console will open. Before continuing, ensure the `Electron` browser is selected from the drop-down list of available browsers (top-right corner of the Cypress test runner).
104
+
After you run `npm run cy:open`, the Cypress console will open. Before continuing, ensure the `Edge` browser is selected from the drop-down list of available browsers (top-right corner of the Cypress test runner).
101
105
102
106
Each test file defined in the `./e2e/cypress/tests` directory will be visible. Click on a test in order to run all test cases in that file. A new browser window will open and you will see your tests executed sequentially.
103
107
104
108
### Test File Naming Convention and Location
105
109
106
-
- Test files follow this naming convention: `<num>-<test-name>.spec.ts`. (e.g., `01-create-api.spec.ts`)
110
+
- Test files follow this naming convention: `<num>-<test-name>.cy.ts`. (e.g., `01-create-api.cy.ts`)
107
111
- Store the test files in the `./e2e/cypress/tests` directory.
0 commit comments