Skip to content

Commit b2a0831

Browse files
committed
Fix browser tests
Pinned the browser tests to the latest Playwright version that still works with Node 16. We need Node 16 for a successful build.
1 parent 9f98c16 commit b2a0831

File tree

7 files changed

+142
-31
lines changed

7 files changed

+142
-31
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
6363
browser:
6464
name: Test (Browser)
65-
runs-on: 'ubuntu-20.04'
65+
runs-on: 'ubuntu-22.04'
6666
steps:
6767
- name: Checkout
6868
uses: actions/checkout@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ node_modules
1515
lib/handlebars/compiler/parser.js
1616
/coverage/
1717
/dist/
18+
/test-results/
1819
/tests/integration/*/dist/
1920
/spec/tmp/*

package-lock.json

Lines changed: 127 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"uglify-js": "^3.1.4"
3131
},
3232
"devDependencies": {
33-
"@playwright/test": "^1.17.1",
33+
"@playwright/test": "1.44.1",
3434
"aws-sdk": "^2.1.49",
3535
"babel-loader": "^5.0.0",
3636
"babel-runtime": "^5.1.10",

tests/browser/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ Execute the following commands in the project root:
99
```bash
1010
npm install
1111
npx grunt prepare
12-
docker pull mcr.microsoft.com/playwright:focal
13-
docker run -it --rm --volume $(pwd):/srv/app --workdir /srv/app --ipc=host mcr.microsoft.com/playwright:focal npm run test:browser
12+
docker run -it --rm --volume $(pwd):/srv/app --workdir /srv/app --ipc=host mcr.microsoft.com/playwright:v1.44.1-jammy npm run test:browser
1413
```

tests/browser/playwright.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const { devices } = require('@playwright/test');
22

33
/** @type {import('@playwright/test').PlaywrightTestConfig} */
44
const config = {
5+
testMatch: ['spec.js'],
56
projects: [
67
{
78
name: 'chromium',

tests/browser/spec.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@ async function waitForMochaAndAssertResult(page) {
77
expect(mochaResults.failures).toBe(0);
88
}
99

10-
test('Spec handlebars.js', async ({ page, baseURL }) => {
11-
await page.goto(`${baseURL}/spec/?headless=true`);
10+
test('Spec handlebars.js', async ({ page }) => {
11+
await page.goto(`/spec/?headless=true`);
1212
await waitForMochaAndAssertResult(page);
1313
});
1414

15-
test('Spec handlebars.amd.js (AMD)', async ({ page, baseURL }) => {
16-
await page.goto(`${baseURL}/spec/amd.html?headless=true`);
15+
test('Spec handlebars.amd.js (AMD)', async ({ page }) => {
16+
await page.goto(`/spec/amd.html?headless=true`);
1717
await waitForMochaAndAssertResult(page);
1818
});
1919

20-
test('Spec handlebars.runtime.amd.js (AMD)', async ({ page, baseURL }) => {
21-
await page.goto(`${baseURL}/spec/amd-runtime.html?headless=true`);
20+
test('Spec handlebars.runtime.amd.js (AMD)', async ({ page }) => {
21+
await page.goto(`/spec/amd-runtime.html?headless=true`);
2222
await waitForMochaAndAssertResult(page);
2323
});
2424

25-
test('Spec handlebars.js (UMD)', async ({ page, baseURL }) => {
26-
await page.goto(`${baseURL}/spec/umd.html?headless=true`);
25+
test('Spec handlebars.js (UMD)', async ({ page }) => {
26+
await page.goto(`/spec/umd.html?headless=true`);
2727
await waitForMochaAndAssertResult(page);
2828
});
2929

30-
test('Spec handlebars.runtime.js (UMD)', async ({ page, baseURL }) => {
31-
await page.goto(`${baseURL}/spec/umd-runtime.html?headless=true`);
30+
test('Spec handlebars.runtime.js (UMD)', async ({ page }) => {
31+
await page.goto(`/spec/umd-runtime.html?headless=true`);
3232
await waitForMochaAndAssertResult(page);
3333
});

0 commit comments

Comments
 (0)