Skip to content

Commit 858f5f9

Browse files
committed
enable running playwright ui in codespace and devcontainers
1 parent 74bdd6b commit 858f5f9

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.devcontainer/Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ ENV PATH=$PNPM_HOME:$PATH
2121
# 6. locales: required for character encoding support
2222
# 7. procps: provides ps command
2323
# 8. requirements to run playwright
24+
# 9. install xvfb to run headless browsers
2425
RUN apt-get update && apt-get install -y \
2526
git \
2627
curl \
@@ -29,6 +30,7 @@ RUN apt-get update && apt-get install -y \
2930
zsh \
3031
locales \
3132
procps \
33+
xvfb \
3234
&& rm -rf /var/lib/apt/lists/*
3335

3436
# Generate and configure locale
@@ -64,10 +66,10 @@ COPY package.json pnpm-lock.yaml ./
6466
RUN pnpm install
6567

6668
# Install Playwright dependencies (this ensures browsers can run correctly)
67-
# RUN pnpm exec playwright install-deps
69+
RUN pnpm exec playwright install-deps
6870

6971
# Install Playwright browsers
70-
# RUN pnpm exec playwright install
72+
RUN pnpm exec playwright install
7173

7274
# Expose the application's port
7375
EXPOSE 10102

.devcontainer/devcontainer.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
"github.vscode-github-actions",
3737
"formulahendry.auto-rename-tag",
3838
"donjayamanne.githistory",
39-
"oderwat.indent-rainbow"
39+
"oderwat.indent-rainbow",
40+
"GitHub.copilot"
4041
],
4142
"settings": {
4243
"terminal.integrated.shell.linux": "/bin/zsh"
@@ -65,6 +66,9 @@
6566
"label": "unknown",
6667
"onAutoForward": "ignore"
6768
},
69+
"10103": {
70+
"label": "Playwright UI"
71+
},
6872
"10102": {
6973
"label": "Backend"
7074
},

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"sdk:node": "swagger-codegen generate -i http://localhost:10102/api/docs-json -l typescript-axios -o ./sdks/node --additional-properties npmName=@kibibit/achievibit-server-node-sdk && npm run post:sdk:node",
1717
"sdk:angular": "swagger-codegen generate -i http://localhost:10102/api/docs-json -l typescript-angular -o ./sdks/angular -c ./angular-sdk-options.json",
1818
"sdk:angular:build": "ng-packagr -p ./sdks/angular/ng-package.json",
19-
"create:github": "ts-node ./scripts/create-github.script.ts"
19+
"create:github": "ts-node ./scripts/create-github.script.ts",
20+
"e2e:ui": "xvfb-run playwright test --ui --ui-port=10103"
2021
},
2122
"author": "thatkookooguy <[email protected]>",
2223
"license": "MIT",

0 commit comments

Comments
 (0)