Files
mattermost/e2e-tests/playwright
Felipe Martin f3a9f166bb [MM-52869] Update and fix links in the system console (#23694)
* Updated privacy policy link

* Removed broken link from fa language

* Updated terms of use link

* Updated pricing links

* Updated self hosted billing links

* Updated terms-of-use links

* Updated privacy-policy links across the project

* Updated pricing links in e2e tests

* Updated cloud billing docs

* Fixed upgrading mattermost server links

* Updated ssl client certificate links

* Updated configure session lenghts links

* Updated configure site url links

* Updated elasticsearch links

* Update data retention policy links

* Updated ldap links

* advanced-permissions

* Updated anchor ServiceSettings.ListenAddress

* Updated anchor #SystemSettings.Forward80To443

* Updated link desktop managed resources

* Updated elasticsearch links

* Updated file content extraction links

* Updated HA Cluster inks

* Updated setup image proxy link

* Updated push notification links

* Update performance monitoring links

* Help links

* Updated about mattermost links

* updated report a problem links

* Updated download apps links

* Updated mobile apps links

* Update share messages links

* Updated format messages links

* Updated in product notices links

* Updated multi factor auth links

* Updated LDAP links

* Updated setup saml links

* Updated saml/ldap configuration links

* Updated plugins URL

* Updated plugin signing links

* Updated webhook links

* Updated slash commands links

* Updated oauth2 links

* Updated webhook links

* Update enable oauth2 links

* Updated personal access tokens list

* Updated experimental links

* Updated snap files

* check-style

* privacy/terms links in about modal
2023-06-19 18:46:52 +02:00
..
2023-03-28 18:10:00 +02:00
2023-03-28 18:10:00 +02:00
2023-03-28 18:10:00 +02:00
2023-03-28 18:10:00 +02:00
2023-03-28 18:10:00 +02:00
2023-06-07 10:15:33 -03:00
2023-03-28 18:10:00 +02:00

Local development

1. Start local server in a separate terminal.

# Typically run the local server with:
cd server && make run

# Or build and distribute webapp including channels, boards 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.
cd webapp && make dist
cd server && make run-server

2. Install dependencies and run the test.

Note: If you're using Node.js version 18 and above, you may need to set NODE_OPTIONS='--no-experimental-fetch'.

# Install npm packages
npm i

# Install browser binaries as prompted if Playwright is just installed or updated
# See https://playwright.dev/docs/browsers
npx playwright install

# Run 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
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.

Updating screenshots is strictly via Playwright's docker container for consistency

1. Run docker container using latest focal version

Change to root directory, run docker container

docker run -it --rm -v "$(pwd):/mattermost/" --ipc=host mcr.microsoft.com/playwright:v1.32.0-focal /bin/bash

2. Inside the docker container

export NODE_OPTIONS='--no-experimental-fetch'
export PW_BASE_URL=http://host.docker.internal:8065
export PW_HEADLESS=true
cd mattermost/e2e-tests/playwright

# Install npm packages. Use "npm ci" to match the automated environment
npm ci

# Run specific test. See https://playwright.dev/docs/test-cli.
npm run test -- login --project=chrome

# Or run all tests
npm run test

# Update snapshots
npm run test -- login --update-snapshots

Page/Component Object Model

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.