diff --git a/.github/workflows/test-javascript.yml b/.github/workflows/test-javascript.yml index c3886acd..1ef9d1e1 100644 --- a/.github/workflows/test-javascript.yml +++ b/.github/workflows/test-javascript.yml @@ -73,4 +73,4 @@ jobs: working-directory: javascript - name: Acceptance tests working-directory: javascript - run: npm run acceptance + run: npx playwright test diff --git a/javascript/docker-compose.yml b/javascript/docker-compose.yml new file mode 100644 index 00000000..50e1dd6c --- /dev/null +++ b/javascript/docker-compose.yml @@ -0,0 +1,9 @@ +services: + playwright: + image: mcr.microsoft.com/playwright:v1.56.1-jammy + working_dir: /work + volumes: + - .:/work + environment: + - CI=true + command: sh -c "npm ci && npm run build && npx playwright test" diff --git a/javascript/package-lock.json b/javascript/package-lock.json index e3e3ad66..e6add9e8 100644 --- a/javascript/package-lock.json +++ b/javascript/package-lock.json @@ -92,7 +92,6 @@ "version": "7.28.5", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -328,7 +327,6 @@ "integrity": "sha512-g95sQtfr2JcHZDYYryaX3x2IOiNui34/K98VFlXXPT7EKvCg5+AJOZ90hfjVUCjA9zNFSXjMPzSLtS2Q4XnKZg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@cucumber/messages": ">=19.1.4 <31" } @@ -405,7 +403,6 @@ "version": "4.0.1", "dev": true, "license": "MIT", - "peer": true, "peerDependencies": { "@cucumber/messages": ">=17.1.1" } @@ -414,7 +411,6 @@ "version": "30.1.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "class-transformer": "0.5.1", "reflect-metadata": "0.2.2" @@ -488,7 +484,6 @@ "integrity": "sha512-aAvIYfQD6/aBdF8KFQChC3CQ1Q+GX9orlR6GurGiX6oqaCnBkxA4WU3OQUVepDynEFrPayerqKRFcAMhdcXReQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "class-transformer": "0.5.1", "reflect-metadata": "0.2.2" @@ -741,7 +736,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "@fortawesome/fontawesome-common-types": "6.2.1" }, @@ -1421,7 +1415,6 @@ "integrity": "sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~6.21.0" } @@ -1440,7 +1433,6 @@ "version": "18.3.26", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -1504,7 +1496,6 @@ "version": "8.39.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.39.0", "@typescript-eslint/types": "8.39.0", @@ -1915,7 +1906,6 @@ "version": "8.15.0", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2436,7 +2426,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.9", "caniuse-lite": "^1.0.30001746", @@ -3364,7 +3353,6 @@ "version": "9.32.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", @@ -6390,7 +6378,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", @@ -6594,7 +6581,6 @@ "version": "18.3.1", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -6615,7 +6601,6 @@ "version": "18.3.1", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -7013,7 +6998,6 @@ "integrity": "sha512-Dqh7SiYcaFtdv5Wvku6QgS5IGPm281L+ZtVD1U2FJa7Q0EFRlq8Z3sjYtz6gYObsYThUOz9ArwFqPZx+1azILQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", @@ -7098,7 +7082,6 @@ "version": "8.11.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -8015,7 +7998,6 @@ "version": "5.9.3", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -8287,7 +8269,6 @@ "version": "5.102.1", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -8335,7 +8316,6 @@ "version": "6.0.1", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.6.1", "@webpack-cli/configtest": "^3.0.1", diff --git a/javascript/package.json b/javascript/package.json index 631554be..040bffd9 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -20,7 +20,8 @@ "prepublishOnly": "npm run build", "fix": "eslint --max-warnings 0 --fix src test && prettier --write src test", "lint": "eslint --max-warnings 0 src test && prettier --check src test", - "acceptance": "playwright test" + "acceptance:local": "docker compose run --rm playwright", + "acceptance:update": "docker compose run --rm playwright npx playwright test --update-snapshots" }, "peerDependencies": { "@cucumber/messages": ">=18" diff --git a/javascript/playwright.config.ts b/javascript/playwright.config.ts index 852e01c1..cbcc6488 100644 --- a/javascript/playwright.config.ts +++ b/javascript/playwright.config.ts @@ -13,6 +13,7 @@ export default defineConfig({ use: { headless: true, baseURL: 'http://localhost:3000', + colorScheme: 'light' }, projects: [ { @@ -26,7 +27,6 @@ export default defineConfig({ expect: { toHaveScreenshot: { stylePath: './test/screenshot.css', - maxDiffPixelRatio: 0.05, }, }, }) \ No newline at end of file diff --git a/javascript/test/__screenshots__/ambiguous.png b/javascript/test/__screenshots__/ambiguous.png index 92029943..0f11ea27 100644 Binary files a/javascript/test/__screenshots__/ambiguous.png and b/javascript/test/__screenshots__/ambiguous.png differ diff --git a/javascript/test/__screenshots__/attachments.png b/javascript/test/__screenshots__/attachments.png index e53fd392..b38797a7 100644 Binary files a/javascript/test/__screenshots__/attachments.png and b/javascript/test/__screenshots__/attachments.png differ diff --git a/javascript/test/__screenshots__/backgrounds.png b/javascript/test/__screenshots__/backgrounds.png index cae2470d..5b3ad608 100644 Binary files a/javascript/test/__screenshots__/backgrounds.png and b/javascript/test/__screenshots__/backgrounds.png differ diff --git a/javascript/test/__screenshots__/cdata.png b/javascript/test/__screenshots__/cdata.png index 6d895963..571e40f2 100644 Binary files a/javascript/test/__screenshots__/cdata.png and b/javascript/test/__screenshots__/cdata.png differ diff --git a/javascript/test/__screenshots__/data-tables.png b/javascript/test/__screenshots__/data-tables.png index fa45234b..280f6182 100644 Binary files a/javascript/test/__screenshots__/data-tables.png and b/javascript/test/__screenshots__/data-tables.png differ diff --git a/javascript/test/__screenshots__/doc-strings.png b/javascript/test/__screenshots__/doc-strings.png index 2b368382..0096eac5 100644 Binary files a/javascript/test/__screenshots__/doc-strings.png and b/javascript/test/__screenshots__/doc-strings.png differ diff --git a/javascript/test/__screenshots__/empty.png b/javascript/test/__screenshots__/empty.png index b1793267..fe6739ff 100644 Binary files a/javascript/test/__screenshots__/empty.png and b/javascript/test/__screenshots__/empty.png differ diff --git a/javascript/test/__screenshots__/examples-tables-attachment.png b/javascript/test/__screenshots__/examples-tables-attachment.png index 305798fb..0f388bf7 100644 Binary files a/javascript/test/__screenshots__/examples-tables-attachment.png and b/javascript/test/__screenshots__/examples-tables-attachment.png differ diff --git a/javascript/test/__screenshots__/examples-tables-undefined.png b/javascript/test/__screenshots__/examples-tables-undefined.png index fb85c635..3c52e5c4 100644 Binary files a/javascript/test/__screenshots__/examples-tables-undefined.png and b/javascript/test/__screenshots__/examples-tables-undefined.png differ diff --git a/javascript/test/__screenshots__/examples-tables.png b/javascript/test/__screenshots__/examples-tables.png index cd420f92..e328729c 100644 Binary files a/javascript/test/__screenshots__/examples-tables.png and b/javascript/test/__screenshots__/examples-tables.png differ diff --git a/javascript/test/__screenshots__/global-hooks-afterall-error.png b/javascript/test/__screenshots__/global-hooks-afterall-error.png index 4e0267fd..29a9b366 100644 Binary files a/javascript/test/__screenshots__/global-hooks-afterall-error.png and b/javascript/test/__screenshots__/global-hooks-afterall-error.png differ diff --git a/javascript/test/__screenshots__/global-hooks-attachments.png b/javascript/test/__screenshots__/global-hooks-attachments.png index 13ec4c51..c9885918 100644 Binary files a/javascript/test/__screenshots__/global-hooks-attachments.png and b/javascript/test/__screenshots__/global-hooks-attachments.png differ diff --git a/javascript/test/__screenshots__/global-hooks-beforeall-error.png b/javascript/test/__screenshots__/global-hooks-beforeall-error.png index a04e2a83..4e79cdc0 100644 Binary files a/javascript/test/__screenshots__/global-hooks-beforeall-error.png and b/javascript/test/__screenshots__/global-hooks-beforeall-error.png differ diff --git a/javascript/test/__screenshots__/global-hooks.png b/javascript/test/__screenshots__/global-hooks.png index a2517abb..87d5cdc9 100644 Binary files a/javascript/test/__screenshots__/global-hooks.png and b/javascript/test/__screenshots__/global-hooks.png differ diff --git a/javascript/test/__screenshots__/hooks-attachment.png b/javascript/test/__screenshots__/hooks-attachment.png index 47a39ebf..0295c824 100644 Binary files a/javascript/test/__screenshots__/hooks-attachment.png and b/javascript/test/__screenshots__/hooks-attachment.png differ diff --git a/javascript/test/__screenshots__/hooks-conditional.png b/javascript/test/__screenshots__/hooks-conditional.png index f1a8d170..d8b01d04 100644 Binary files a/javascript/test/__screenshots__/hooks-conditional.png and b/javascript/test/__screenshots__/hooks-conditional.png differ diff --git a/javascript/test/__screenshots__/hooks-named.png b/javascript/test/__screenshots__/hooks-named.png index 91d5cdc2..1c972314 100644 Binary files a/javascript/test/__screenshots__/hooks-named.png and b/javascript/test/__screenshots__/hooks-named.png differ diff --git a/javascript/test/__screenshots__/hooks-undefined.png b/javascript/test/__screenshots__/hooks-undefined.png index b355031c..1a65bb01 100644 Binary files a/javascript/test/__screenshots__/hooks-undefined.png and b/javascript/test/__screenshots__/hooks-undefined.png differ diff --git a/javascript/test/__screenshots__/hooks.png b/javascript/test/__screenshots__/hooks.png index bf5002e8..a6ef9cb9 100644 Binary files a/javascript/test/__screenshots__/hooks.png and b/javascript/test/__screenshots__/hooks.png differ diff --git a/javascript/test/__screenshots__/markdown.png b/javascript/test/__screenshots__/markdown.png index 3a9fb60b..a7443b2c 100644 Binary files a/javascript/test/__screenshots__/markdown.png and b/javascript/test/__screenshots__/markdown.png differ diff --git a/javascript/test/__screenshots__/minimal.png b/javascript/test/__screenshots__/minimal.png index 5035d028..db205b80 100644 Binary files a/javascript/test/__screenshots__/minimal.png and b/javascript/test/__screenshots__/minimal.png differ diff --git a/javascript/test/__screenshots__/multiple-features-reversed.png b/javascript/test/__screenshots__/multiple-features-reversed.png index 8b492dad..19693ffd 100644 Binary files a/javascript/test/__screenshots__/multiple-features-reversed.png and b/javascript/test/__screenshots__/multiple-features-reversed.png differ diff --git a/javascript/test/__screenshots__/multiple-features.png b/javascript/test/__screenshots__/multiple-features.png index 4cb4b46d..1a90851c 100644 Binary files a/javascript/test/__screenshots__/multiple-features.png and b/javascript/test/__screenshots__/multiple-features.png differ diff --git a/javascript/test/__screenshots__/parameter-types.png b/javascript/test/__screenshots__/parameter-types.png index 671617e4..bfecf51b 100644 Binary files a/javascript/test/__screenshots__/parameter-types.png and b/javascript/test/__screenshots__/parameter-types.png differ diff --git a/javascript/test/__screenshots__/pending.png b/javascript/test/__screenshots__/pending.png index 8ff9f5cd..407cfbbe 100644 Binary files a/javascript/test/__screenshots__/pending.png and b/javascript/test/__screenshots__/pending.png differ diff --git a/javascript/test/__screenshots__/regular-expression.png b/javascript/test/__screenshots__/regular-expression.png index 1165c561..9604121a 100644 Binary files a/javascript/test/__screenshots__/regular-expression.png and b/javascript/test/__screenshots__/regular-expression.png differ diff --git a/javascript/test/__screenshots__/retry-ambiguous.png b/javascript/test/__screenshots__/retry-ambiguous.png index e479812c..0ad3c192 100644 Binary files a/javascript/test/__screenshots__/retry-ambiguous.png and b/javascript/test/__screenshots__/retry-ambiguous.png differ diff --git a/javascript/test/__screenshots__/retry-pending.png b/javascript/test/__screenshots__/retry-pending.png index a1947c37..36f89c06 100644 Binary files a/javascript/test/__screenshots__/retry-pending.png and b/javascript/test/__screenshots__/retry-pending.png differ diff --git a/javascript/test/__screenshots__/retry-undefined.png b/javascript/test/__screenshots__/retry-undefined.png index 6d11b025..44ca391c 100644 Binary files a/javascript/test/__screenshots__/retry-undefined.png and b/javascript/test/__screenshots__/retry-undefined.png differ diff --git a/javascript/test/__screenshots__/retry.png b/javascript/test/__screenshots__/retry.png index b26a7fe5..67b11443 100644 Binary files a/javascript/test/__screenshots__/retry.png and b/javascript/test/__screenshots__/retry.png differ diff --git a/javascript/test/__screenshots__/rules-backgrounds.png b/javascript/test/__screenshots__/rules-backgrounds.png index b7566a4c..f7628fc8 100644 Binary files a/javascript/test/__screenshots__/rules-backgrounds.png and b/javascript/test/__screenshots__/rules-backgrounds.png differ diff --git a/javascript/test/__screenshots__/rules.png b/javascript/test/__screenshots__/rules.png index 35275bbe..60934069 100644 Binary files a/javascript/test/__screenshots__/rules.png and b/javascript/test/__screenshots__/rules.png differ diff --git a/javascript/test/__screenshots__/skipped.png b/javascript/test/__screenshots__/skipped.png index 1c04a238..b991f628 100644 Binary files a/javascript/test/__screenshots__/skipped.png and b/javascript/test/__screenshots__/skipped.png differ diff --git a/javascript/test/__screenshots__/stack-traces.png b/javascript/test/__screenshots__/stack-traces.png index 78624e76..3772c354 100644 Binary files a/javascript/test/__screenshots__/stack-traces.png and b/javascript/test/__screenshots__/stack-traces.png differ diff --git a/javascript/test/__screenshots__/test-run-exception.png b/javascript/test/__screenshots__/test-run-exception.png index 99608231..777eb010 100644 Binary files a/javascript/test/__screenshots__/test-run-exception.png and b/javascript/test/__screenshots__/test-run-exception.png differ diff --git a/javascript/test/__screenshots__/undefined.png b/javascript/test/__screenshots__/undefined.png index c622e892..941ce90c 100644 Binary files a/javascript/test/__screenshots__/undefined.png and b/javascript/test/__screenshots__/undefined.png differ diff --git a/javascript/test/__screenshots__/unknown-parameter-type.png b/javascript/test/__screenshots__/unknown-parameter-type.png index 882b951a..c5d39b2d 100644 Binary files a/javascript/test/__screenshots__/unknown-parameter-type.png and b/javascript/test/__screenshots__/unknown-parameter-type.png differ diff --git a/javascript/test/__screenshots__/unused-steps.png b/javascript/test/__screenshots__/unused-steps.png index cff7033c..8454ade8 100644 Binary files a/javascript/test/__screenshots__/unused-steps.png and b/javascript/test/__screenshots__/unused-steps.png differ