Skip to content

Commit

Permalink
feat: update documentations
Browse files Browse the repository at this point in the history
  • Loading branch information
mikitabut committed Jan 29, 2024
1 parent 452d69e commit 71f3631
Show file tree
Hide file tree
Showing 9 changed files with 438 additions and 415 deletions.
169 changes: 19 additions & 150 deletions README.md

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions apps/chat-e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,16 @@ When run tests on CI, `E2E_USERNAME` and `E2E_PASSWORD` CI variable should be se

## Run tests locally

Run `npm run test:e2e` to execute the tests locally.
Run `nx e2e chat-e2e` to execute the tests locally.
Installation of default browsers may be required, when run for the 1st time: `npx playwright install`.

Local version of application is automatically started before execution the tests on `http://localhost:3000`.
Config file used for local run is `local.playwright.config.ts`.

After tests execution finished, 2 kind of reports are generated: html, allure.

To open html report, run `npm run test:e2e:html`.

Before generating Allure report, install it on your local machine following the guide: https://docs.qameta.io/allure/#_get_started.

To generate Allure report, run `npm allure:serve`.

Every test inside local report contains video recording and trace attached.

If need to execute tests inside docker container run:
Expand All @@ -36,7 +32,7 @@ docker run --rm --network host -v "$(pwd)":/test/ -w /test/ -it mcr.microsoft.co
docker run --rm --network host -v ${pwd}:/test/ -w /test/ -it mcr.microsoft.com/playwright:v1.36.0-jammy /bin/bash
npm i
npm run test:e2e
nx e2e chat-e2e
```

Image version should correspond Playwright version.
Expand All @@ -45,7 +41,7 @@ Image version should correspond Playwright version.

Config file used for CI pipeline: `playwright.config.ts`.

`npm test:e2e-ci` command is used to trigger tests on CI.
`nx e2e chat-e2e --configuration=production` command is used to trigger tests on CI.

Generated Allure report is attached as a job artifact.
To view CI Allure report:
Expand All @@ -54,3 +50,14 @@ To view CI Allure report:
- for FireFox: open `about:config` in browser and set `security.fileuri.strict_origin_policy` to false.

CI report includes screenshots for failed tests.

## Environment variables

| Variable | Required | Description | Available Values | Default values |
| -------------- | -------- | ------------------------------------ | ---------------- | -------------- |
| `E2E_HOST` | No | The host URL for end-to-end testing. | Any string | |
| `E2E_USERNAME` | No | A username for e2e authentification | Any string | |
| `E2E_PASSWORD` | No | A password for e2e authentification | Any string | |
| `TRACES_URL` | No | Traces URL | Any string | |
| `TMS_URL` | No | TMS URL | Any string | |
| `ISSUE_URL` | No | Issue URL | Any string | |
170 changes: 170 additions & 0 deletions apps/chat/README.md

Large diffs are not rendered by default.

246 changes: 0 additions & 246 deletions docs/OVERLAY.md

This file was deleted.

Loading

0 comments on commit 71f3631

Please sign in to comment.