Skip to content

Commit 6c37263

Browse files
committed
Docker
1 parent 97474a3 commit 6c37263

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

e2e-playwright/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM mcr.microsoft.com/playwright:v1.52.0-jammy
2+
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
RUN npm install
7+
8+
COPY . .
9+
10+
RUN npx playwright install
11+
12+
CMD ["npm", "test"]

e2e-playwright/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ End-to-End UI test automation using **Playwright**, **Cucumber.js**, and **TypeS
1212
npm install
1313
npx playwright install
1414

15-
🚀 How to Run
15+
🚀 How to Run Head = true for development and debug
1616

1717
🔹 Normal Test Run
18-
npm test
18+
npm test:stage
1919

2020
🔹 Debug Mode (with Playwright Inspector)
2121
npm run debug
2222

2323
🔹 Rerun Failed Tests
24-
npm run test:failed
24+
npm run test:failed
25+
26+
27+
🚀 How to Run Docker image
28+
npm test

e2e-playwright/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
"version": "1.0.0",
44
"main": "index.js",
55
"scripts": {
6-
"debug": "cross-env ENV=prod PWDEBUG=1 DEBUG=pw:api cucumber-js --config=config/cucumber.js",
6+
"debug": "cross-env ENV=stage PWDEBUG=1 DEBUG=pw:api cucumber-js --config=config/cucumber.js",
77
"pretest": "npx ts-node src/helper/report/init.ts",
88
"test": "cross-env ENV=prod FORCE_COLOR=0 cucumber-js --config=config/cucumber.js || true",
9+
"test:stage": "cross-env ENV=stage FORCE_COLOR=0 cucumber-js --config=config/cucumber.js || true",
910
"posttest": "npx ts-node src/helper/report/report.ts",
1011
"test:failed": "cucumber-js -p rerun @rerun.txt"
1112
},
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
BASEURL = http://localhost:8080/
1+
BASEURL = http://host.docker.internal:8080/
22
BROWSER = chrome
3-
HEAD = true
3+
HEAD = false

0 commit comments

Comments
 (0)