Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM mcr.microsoft.com/devcontainers/base:1.0.20-bookworm
FROM mcr.microsoft.com/devcontainers/base:2.1.9-trixie
14 changes: 5 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
{
"name": "PF dev-feat DEV",
"build": {
"dockerfile": "Dockerfile",
"options": [
"--add-host=host.docker.internal:host-gateway"
]
"dockerfile": "Dockerfile"
Comment thread
eraserix marked this conversation as resolved.
},
"runArgs": [
"--add-host=host.docker.internal:host-gateway"
],
"containerEnv": {
"GOMODCACHE": "${containerWorkspaceFolder}/.go_cache"
},
"features": {
"ghcr.io/postfinance/devcontainer-features/go:1.0.0": {
"version": "1.25.9"
},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": false
},
"ghcr.io/devcontainers-extra/features/devcontainers-cli:1": {}
},
"customizations": {
Expand All @@ -26,4 +22,4 @@
]
}
}
}
}
20 changes: 20 additions & 0 deletions features/src/playwright-deps/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,23 @@ Also don't forget to add `.ms-playwright` to your `.gitignore` file.
### Download URL from within Playwright

To change the downloads that Playwright does to a custom remote, you can adjust the `PLAYWRIGHT_DOWNLOAD_HOST` environment variable to eg. `https://mycompany.com/artifactory/playwright-remote/`. You might also want to increase the `PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT` to something like `300000`.

### Poor performance of `playwright test --ui`

If you find the UI launched with `playwright test --ui` too slow, you can run
Playwright in server mode and connect from your host browser.

For VS Code, you only need to launch Playwright in server mode:

```sh
npx playwright test --ui-host 0.0.0.0 --ui-port 8085
```

If you are using the devcontainer CLI to build the container:

1. In your `devcontainer.json`, add a port forward:
```json
"appPort": [ "32222:8085" ]
```
2. Launch Playwright in server mode: `npx playwright test --ui-host 0.0.0.0 --ui-port 8085`
3. Access Playwright from your host browser: <https://localhost:32222>
20 changes: 20 additions & 0 deletions features/src/playwright-deps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,23 @@ Also don't forget to add `.ms-playwright` to your `.gitignore` file.
### Download URL from within Playwright

To change the downloads that Playwright does to a custom remote, you can adjust the `PLAYWRIGHT_DOWNLOAD_HOST` environment variable to eg. `https://mycompany.com/artifactory/playwright-remote/`. You might also want to increase the `PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT` to something like `300000`.

### Poor performance of `playwright test --ui`

If you find the UI launched with `playwright test --ui` too slow, you can run
Playwright in server mode and connect from your host browser.

For VS Code, you only need to launch Playwright in server mode:

```sh
npx playwright test --ui-host 0.0.0.0 --ui-port 8085
```

If you are using the devcontainer CLI to build the container:

1. In your `devcontainer.json`, add a port forward:
```json
"appPort": [ "32222:8085" ]
```
2. Launch Playwright in server mode: `npx playwright test --ui-host 0.0.0.0 --ui-port 8085`
3. Access Playwright from your host browser: <https://localhost:32222>
71 changes: 33 additions & 38 deletions features/src/playwright-deps/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ var dependencies = map[string]map[string][]string{
"firefox": []string{
"libasound2t64",
"libatk1.0-0t64",
"libavcodec60",
"libcairo-gobject2",
"libcairo2",
"libdbus-1-3",
Expand Down Expand Up @@ -431,8 +432,7 @@ var dependencies = map[string]map[string][]string{
"libavif16",
},
},

"debian11": {
"ubuntu26": {
"tools": []string{
"xvfb",
"fonts-noto-color-emoji",
Expand All @@ -448,20 +448,19 @@ var dependencies = map[string]map[string][]string{
"fonts-freefont-ttf",
},
"chromium": []string{
"libasound2",
"libatk-bridge2.0-0",
"libatk1.0-0",
"libatspi2.0-0",
"libasound2t64",
"libatk-bridge2.0-0t64",
"libatk1.0-0t64",
"libatspi2.0-0t64",
"libcairo2",
"libcups2",
"libcups2t64",
"libdbus-1-3",
"libdrm2",
"libgbm1",
"libglib2.0-0",
"libglib2.0-0t64",
"libnspr4",
"libnss3",
"libpango-1.0-0",
"libwayland-client0",
"libx11-6",
"libxcb1",
"libxcomposite1",
Expand All @@ -472,18 +471,17 @@ var dependencies = map[string]map[string][]string{
"libxrandr2",
},
"firefox": []string{
"libasound2",
"libatk1.0-0",
"libasound2t64",
"libatk1.0-0t64",
"libavcodec62",
"libcairo-gobject2",
"libcairo2",
"libdbus-1-3",
"libdbus-glib-1-2",
"libfontconfig1",
"libfreetype6",
"libgdk-pixbuf-2.0-0",
"libglib2.0-0",
"libgtk-3-0",
"libharfbuzz0b",
"libglib2.0-0t64",
"libgtk-3-0t64",
"libpango-1.0-0",
"libpangocairo-1.0-0",
"libx11-6",
Expand All @@ -498,66 +496,62 @@ var dependencies = map[string]map[string][]string{
"libxi6",
"libxrandr2",
"libxrender1",
"libxtst6",
},
"webkit": []string{
"gstreamer1.0-libav",
"gstreamer1.0-plugins-bad",
"gstreamer1.0-plugins-base",
"gstreamer1.0-plugins-good",
"libatk-bridge2.0-0",
"libatk1.0-0",
"libicu78",
"libatomic1",
"libatk-bridge2.0-0t64",
"libatk1.0-0t64",
"libcairo-gobject2",
"libcairo2",
"libdbus-1-3",
"libdrm2",
"libegl1",
"libenchant-2-2",
"libepoxy0",
"libevdev2",
"libevent-2.1-7t64",
"libflite1",
"libfontconfig1",
"libfreetype6",
"libgbm1",
"libgdk-pixbuf-2.0-0",
"libgles2",
"libglib2.0-0",
"libglx0",
"libglib2.0-0t64",
"libgstreamer-gl1.0-0",
"libgstreamer-plugins-bad1.0-0",
"libgstreamer-plugins-base1.0-0",
"libgstreamer1.0-0",
"libgtk-3-0",
"libgudev-1.0-0",
"libgtk-4-1",
"libharfbuzz-icu0",
"libharfbuzz0b",
"libhyphen0",
"libicu67",
"libjpeg62-turbo",
"libjpeg-turbo8",
"liblcms2-2",
"libmanette-0.2-0",
"libnghttp2-14",
"libnotify4",
"libopengl0",
"libopenjp2-7",
"libopus0",
"libpango-1.0-0",
"libpng16-16",
"libproxy1v5",
"libpangocairo-1.0-0",
"libpng16-16t64",
"libsecret-1-0",
"libvpx12",
"libwayland-client0",
"libwayland-egl1",
"libwayland-server0",
"libwebp6",
"libwebp7",
"libwebpdemux2",
"libwoff1",
"libx11-6",
"libxcomposite1",
"libxdamage1",
"libxkbcommon0",
"libxml2",
"libxml2-16",
"libxslt1.1",
"libatomic1",
"libevent-2.1-7",
"libx264-165",
"libavif16",
},
},

"debian12": {
"tools": []string{
"xvfb",
Expand Down Expand Up @@ -723,6 +717,7 @@ var dependencies = map[string]map[string][]string{
"firefox": []string{
"libasound2",
"libatk1.0-0t64",
"libavcodec61",
"libcairo-gobject2",
"libcairo2",
"libdbus-1-3",
Expand Down
7 changes: 2 additions & 5 deletions features/test/playwright-deps/scenarios.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"install": {
"build": {
"dockerfile": "Dockerfile",
"options": [
"--add-host=host.docker.internal:host-gateway"
]
"dockerfile": "Dockerfile"
},
"features": {
"./playwright-deps": {
Expand All @@ -14,4 +11,4 @@
}
}
}
}
}
7 changes: 4 additions & 3 deletions features/test/playwright-deps/test-images.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[
"mcr.microsoft.com/devcontainers/base:debian-11",
"mcr.microsoft.com/devcontainers/base:debian-12",
"mcr.microsoft.com/devcontainers/base:ubuntu-24.04"
]
"mcr.microsoft.com/devcontainers/base:debian-13",
"mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
"mcr.microsoft.com/devcontainers/base:ubuntu-26.04"
]