Skip to content

Commit 058f6f0

Browse files
committed
fix: playright init failures in github actions
1 parent ecbbc9f commit 058f6f0

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/playwright-chromium.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ jobs:
1515
node-version: 16
1616
- name: Install dependencies
1717
run: npm ci
18+
- name: Build phoenix
19+
run: npm run build
1820
- name: Install Playwright Browsers
1921
run: npx playwright install --with-deps
2022
- name: Run Playwright tests in chromium
21-
run: npx playwright test --project=chromium
23+
run: npm run testChromium
2224
- uses: actions/upload-artifact@v3
2325
if: always()
2426
with:

.github/workflows/playwright-firefox.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ jobs:
1515
node-version: 16
1616
- name: Install dependencies
1717
run: npm ci
18+
- name: Build phoenix
19+
run: npm run build
1820
- name: Install Playwright Browsers
1921
run: npx playwright install --with-deps
2022
- name: Run Playwright tests in firefox
21-
run: npx playwright test --project=firefox
23+
run: npm run testFirefox
2224
- uses: actions/upload-artifact@v3
2325
if: always()
2426
with:

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
"prepare": "husky install",
4949
"serveTest": "http-server . -p 5000 -c-1",
5050
"test": "gulp test",
51+
"testChromium": "npx playwright test --project=chromium",
52+
"testFirefox": "npx playwright test --project=firefox",
5153
"buildonly": "gulp build",
5254
"vulnerabilityCheck": "echo Scanning for vulnarabilities && npm audit --prod",
5355
"build": "npm run buildonly && npm run createJSDocs && npm run test && npm run lint && npm run vulnerabilityCheck",

tests/unit-test-suite.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { test, expect } = require("@playwright/test");
33

44
test("Execute all unit tests", async ({ page }) => {
55
await page.goto(
6-
"http://localhost:8000/test/SpecRunner.html?spec=all&category=unit"
6+
"http://localhost:5000/test/SpecRunner.html?spec=all&category=unit"
77
);
88
// wait for spec runner to complete
99
await page.waitForFunction(() => window.playWrightRunComplete);

0 commit comments

Comments
 (0)