@dargmuesli/nuxt-vio-testing 20.5.1 → 20.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/e2e/utils/constants.ts +1 -1
- package/package.json +12 -12
- package/playwright.config.ts +5 -4
- package/tsconfig.json +2 -0
package/e2e/utils/constants.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { expect } from '@playwright/test'
|
|
|
2
2
|
import type { Page } from 'playwright-core'
|
|
3
3
|
|
|
4
4
|
export const COOKIE_CONTROL_CONSENT_COOKIE_DEFAULT = 'ctga'
|
|
5
|
+
export const TIMEOUT = 60000
|
|
5
6
|
export const PAGE_READY = async ({
|
|
6
7
|
page,
|
|
7
8
|
options,
|
|
@@ -36,6 +37,5 @@ export const PAGE_READY = async ({
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
export const SITE_URL =
|
|
39
|
-
process.env.SITE_URL ||
|
|
40
40
|
process.env.NUXT_PUBLIC_SITE_URL ||
|
|
41
41
|
`https://${process.env.HOST || 'localhost'}:${process.env.PORT || '3000'}`
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"devDependencies": {
|
|
3
|
-
"@axe-core/playwright": "4.11.
|
|
3
|
+
"@axe-core/playwright": "4.11.1",
|
|
4
4
|
"@eslint/js": "9.39.2",
|
|
5
|
-
"@playwright/test": "1.58.
|
|
6
|
-
"@types/node": "24.10.
|
|
5
|
+
"@playwright/test": "1.58.1",
|
|
6
|
+
"@types/node": "24.10.10",
|
|
7
7
|
"cross-env": "10.1.0",
|
|
8
8
|
"eslint": "9.39.2",
|
|
9
9
|
"eslint-config-prettier": "10.1.8",
|
|
10
10
|
"eslint-plugin-prettier": "5.5.5",
|
|
11
11
|
"lodash-es": "4.17.23",
|
|
12
12
|
"typescript": "5.9.3",
|
|
13
|
-
"typescript-eslint": "8.
|
|
13
|
+
"typescript-eslint": "8.54.0",
|
|
14
14
|
"ufo": "1.6.3"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"name": "@dargmuesli/nuxt-vio-testing",
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"playwright-core": "1.58.
|
|
28
|
+
"playwright-core": "1.58.1"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
@@ -43,16 +43,16 @@
|
|
|
43
43
|
"test:e2e:docker:br": "pnpm run test:e2e:docker:build && pnpm run test:e2e:docker:run",
|
|
44
44
|
"test:e2e:docker:build": "sudo docker build -t test-e2e_development --build-arg UID=$(id -u) --build-arg GID=$(id -g) --target test-e2e_development ..",
|
|
45
45
|
"test:e2e:docker:run": "sudo docker run --rm -v \"$PWD/..:/srv/app\" -v \"jonas-thelemann_playwright_data:/srv/app/node_modules\" -v \"$(pnpm store path):/srv/.pnpm-store\" test-e2e_development",
|
|
46
|
-
"test:e2e:docker:server:dev": "pnpm run test:e2e:docker:br pnpm --dir tests
|
|
46
|
+
"test:e2e:docker:server:dev": "pnpm run test:e2e:docker:br pnpm run --dir tests test:e2e:server:dev",
|
|
47
47
|
"test:e2e:docker:server:dev:update": "pnpm run test:e2e:docker:server:dev --update-snapshots",
|
|
48
|
-
"test:e2e:docker:server:node": "pnpm run test:e2e:docker:br pnpm --dir tests
|
|
48
|
+
"test:e2e:docker:server:node": "pnpm run test:e2e:docker:br pnpm run --dir tests test:e2e:server:node",
|
|
49
49
|
"test:e2e:docker:server:node:update": "pnpm run test:e2e:docker:server:node --update-snapshots",
|
|
50
|
-
"test:e2e:docker:server:static": "pnpm run test:e2e:docker:br pnpm --dir tests
|
|
50
|
+
"test:e2e:docker:server:static": "pnpm run test:e2e:docker:br pnpm run --dir tests test:e2e:server:static",
|
|
51
51
|
"test:e2e:docker:server:static:update": "pnpm run test:e2e:docker:server:static --update-snapshots",
|
|
52
|
-
"test:e2e:server:dev": "cross-env PORT=3000
|
|
53
|
-
"test:e2e:server:node": "cross-env NODE_ENV=production NUXT_PUBLIC_I18N_BASE_URL=
|
|
54
|
-
"test:e2e:server:static": "cross-env NODE_ENV=production PORT=3002
|
|
52
|
+
"test:e2e:server:dev": "cross-env PORT=3000 NUXT_PUBLIC_SITE_URL=https://localhost:3000 VIO_SERVER=dev pnpm run test:e2e",
|
|
53
|
+
"test:e2e:server:node": "cross-env NODE_ENV=production NODE_EXTRA_CA_CERTS=\"$(mkcert -CAROOT)/rootCA.pem\" NUXT_PUBLIC_I18N_BASE_URL=https://localhost:3001 NUXT_PUBLIC_SITE_URL=https://localhost:3001 PORT=3001 VIO_SERVER=node pnpm run test:e2e",
|
|
54
|
+
"test:e2e:server:static": "cross-env NODE_ENV=production PORT=3002 NUXT_PUBLIC_SITE_URL=https://localhost:3002 VIO_SERVER=static pnpm run test:e2e"
|
|
55
55
|
},
|
|
56
56
|
"type": "module",
|
|
57
|
-
"version": "20.
|
|
57
|
+
"version": "20.6.0"
|
|
58
58
|
}
|
package/playwright.config.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineConfig, devices } from '@playwright/test'
|
|
2
2
|
|
|
3
|
-
import { SITE_URL } from '
|
|
3
|
+
import { SITE_URL } from '#src/node/static'
|
|
4
|
+
import { TIMEOUT } from '#tests/e2e/utils/constants'
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Read environment variables from file.
|
|
@@ -86,13 +87,13 @@ export default defineConfig({
|
|
|
86
87
|
|
|
87
88
|
/* Run your local dev server before starting the tests */
|
|
88
89
|
webServer: {
|
|
89
|
-
command: `pnpm --dir ../src run start:${process.env.VIO_SERVER || 'dev'}`,
|
|
90
|
+
command: `pnpm --dir ../src run certificates && pnpm --dir ../src run start:${process.env.VIO_SERVER || 'dev'}`,
|
|
90
91
|
env: {
|
|
91
92
|
NUXT_PUBLIC_VIO_IS_TESTING: 'true',
|
|
92
93
|
},
|
|
93
94
|
ignoreHTTPSErrors: true, // TODO: remove once tests run without it
|
|
94
|
-
timeout:
|
|
95
|
-
url:
|
|
95
|
+
timeout: TIMEOUT,
|
|
96
|
+
url: SITE_URL,
|
|
96
97
|
reuseExistingServer: !process.env.CI,
|
|
97
98
|
},
|
|
98
99
|
|