Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for unsupported Linux distributions #2

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Developing trustify-ui-tests
This document describes how to setup your environment to run the trustify-ui-tests on your local environment

## System Requirements
Playwright is officially [supported](https://playwright.dev/docs/intro#system-requirements) to,
- Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).
- macOS 13 Ventura, or macOS 14 Sonoma.
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, Ubuntu 24.04, on x86-64 and arm64 architecture.

To run Playwright on [unsupported Linux distributions](https://github.com/microsoft/playwright/issues/26482) like Fedora, The playwright can be configured on docker and the tests can be executed from the client (local machine).

Create compose.yaml file with the below content and make sure to update the Playwright [version](https://hub.docker.com/r/microsoft/playwright)
```
services:
playwright:
image: mcr.microsoft.com/playwright:<version>-jammy
restart: always
container_name: "playwright"
init: true
ipc: host
ports:
- '5000:5000'
command:
[
"/bin/sh",
-c,
"cd /home/pwuser && npx -y playwright@<version> run-server --port 5000"
]
network_mode: host
```
Example compose.yaml using playwright version 1.46.0 and port 5000

```
services:
playwright:
image: mcr.microsoft.com/playwright:v1.46.0-jammy
restart: always
container_name: "playwright"
init: true
ipc: host
ports:
- '5000:5000'
command:
[
"/bin/sh",
-c,
"cd /home/pwuser && npx -y [email protected] run-server --port 5000"
]
network_mode: host
```
Run the compose.yaml file using podman-compose command
```
podman-compose -f compose.yaml up
```
The output for the above command following the container in Ready state would be,
```
Listening on ws://127.0.0.1:5000/
```

Now the user can execute the Playwright tests using the below command
```
TRUSTIFY_URL=http://localhost:8080 PW_TEST_CONNECT_WS_ENDPOINT=ws://localhost:5000/ npx playwright test
```