From 73b14b417e748f1679be0acfa7f1cb4dc319ee5a Mon Sep 17 00:00:00 2001 From: armmanvaillancourt <133890309+armmanvaillancourt@users.noreply.github.com> Date: Mon, 16 Sep 2024 09:02:46 -0400 Subject: [PATCH] Improve E2E tests README for readability (#27884) --- e2e-tests/playwright/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/e2e-tests/playwright/README.md b/e2e-tests/playwright/README.md index f9321a7317..a894201b1d 100644 --- a/e2e-tests/playwright/README.md +++ b/e2e-tests/playwright/README.md @@ -8,7 +8,7 @@ cd server && make run # Or build and distribute webapp including channels and playbooks # so that their product URLs do not rely on Webpack dev server. -# Especially important when running test inside the Playwright's docker container. +# Especially important when running tests inside the Playwright's docker container. cd webapp && make dist cd server && make run-server ``` @@ -25,24 +25,24 @@ npm i # See https://playwright.dev/docs/browsers npx playwright install -# Run specific test of all projects -- chrome, firefox, iphone and ipad. +# Run a specific test of all projects -- Chrome, Firefox, iPhone and iPad. # See https://playwright.dev/docs/test-cli. npm run test -- login -# Run specific test of a project +# Run a specific test of a project npm run test -- login --project=chrome # Or run all tests npm run test ``` -#### 3. Inspect test results at `/test-results` folder when something failed unexpectedly. +#### 3. Inspect test results at `/test-results` folder when something fails unexpectedly. -## Updating screenshots is strictly via Playwright's docker container for consistency +## Updating screenshots is done strictly via Playwright's docker container for consistency #### 1. Run docker container using latest focal version -Change to root directory, run docker container +Change to the root directory, then run the docker container. ``` docker run -it --rm -v "$(pwd):/mattermost/" --ipc=host mcr.microsoft.com/playwright:v1.46.1 /bin/bash @@ -73,4 +73,4 @@ npm run test -- login --update-snapshots See https://playwright.dev/docs/test-pom. -Page and component abstractions are located at `./support/ui`. It should be first class before writing a spec file so that any future change in DOM structure will be done in one place only. No static UI text and fixed locator should be written in the spec file. +Page and component abstractions are located at `./support/ui`. They should be established before writing a spec file so that any future changes in the DOM structure will be made in one place only. No static UI text or fixed locator should be written in the spec file.