Skip to content

Commit c900d36

Browse files
committed
feat(calm-hub-ui): update documentation for e2e tests
1 parent fbebc55 commit c900d36

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

calm-hub-ui/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,18 @@ You may also see any lint errors in the console.
1919
Launches the test runner in the interactive watch mode.\
2020
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
2121

22-
### `npm e2e`
22+
### `npm run start-cypress`
23+
24+
End to End tests are written with cypress. Cypress can be run in headless and headed modes.
25+
The above command runs in headed mode and allows the developer to locally run through the spec
26+
files and observe the test runs. [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) queries and paradigm for testing features
27+
heavily in these tests as these help maintainability by organising tests around how the UI is used
28+
and not how its implemented. [Cypress and its best practices](https://docs.cypress.io/app/core-concepts/best-practices) are also used in writing and updating
29+
these tests.
30+
31+
#### Test Stubbing
32+
The tests are all stubbed to return desired responses. These will need to be maintained in tandem with
33+
calm-hub API. This section can be updated when a different and more reliable integration strategy is devised
2334

2435

2536
### `npm run build`

calm-hub-ui/cypress.config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import { defineConfig } from "cypress";
22

33
export default defineConfig({
44
e2e: {
5-
setupNodeEvents(on, config) {
6-
// implement node event listeners here
7-
},
85
baseUrl: 'http://localhost:5173',
96
},
107
});

0 commit comments

Comments
 (0)