@dargmuesli/nuxt-vio-testing 20.6.7 → 20.7.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/dist/e2e/fixtures/vioTest.d.mts +17 -0
- package/dist/e2e/fixtures/vioTest.mjs +38 -0
- package/dist/e2e/utils/constants.d.mts +18 -0
- package/dist/e2e/utils/constants.mjs +12 -0
- package/dist/e2e/utils/tests.d.mts +18 -0
- package/dist/e2e/utils/tests.mjs +464 -0
- package/dist/playwright.config.d.mts +13 -0
- package/dist/playwright.config.mjs +51 -0
- package/package.json +30 -7
- package/e2e/fixtures/vioTest.ts +0 -64
- package/e2e/utils/constants.ts +0 -40
- package/e2e/utils/tests.ts +0 -584
- package/playwright.config.ts +0 -100
- package/tsconfig.json +0 -10
package/playwright.config.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { defineConfig, devices } from '@playwright/test'
|
|
2
|
-
|
|
3
|
-
import { SITE_URL, TIMEOUT } from './e2e/utils/constants' // importing from `src` or using the `#tests` path does not work because downstream consumers of this package typically cannot resolve those paths
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Read environment variables from file.
|
|
7
|
-
* https://github.com/motdotla/dotenv
|
|
8
|
-
*/
|
|
9
|
-
// require('dotenv').config();
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* See https://playwright.dev/docs/test-configuration.
|
|
13
|
-
*/
|
|
14
|
-
export default defineConfig({
|
|
15
|
-
expect: {
|
|
16
|
-
toHaveScreenshot: {
|
|
17
|
-
maxDiffPixelRatio: 0.01,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
22
|
-
forbidOnly: !!process.env.CI,
|
|
23
|
-
|
|
24
|
-
/* Run tests in files in parallel */
|
|
25
|
-
fullyParallel: true,
|
|
26
|
-
|
|
27
|
-
outputDir: 'e2e/results',
|
|
28
|
-
|
|
29
|
-
/* Configure projects for major browsers */
|
|
30
|
-
projects: [
|
|
31
|
-
{
|
|
32
|
-
name: 'chromium',
|
|
33
|
-
use: { ...devices['Desktop Chrome'] },
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
{
|
|
37
|
-
name: 'firefox',
|
|
38
|
-
use: { ...devices['Desktop Firefox'] },
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
name: 'webkit',
|
|
43
|
-
use: { ...devices['Desktop Safari'] },
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
/* Test against mobile viewports. */
|
|
47
|
-
// {
|
|
48
|
-
// name: 'Mobile Chrome',
|
|
49
|
-
// use: { ...devices['Pixel 5'] },
|
|
50
|
-
// },
|
|
51
|
-
// {
|
|
52
|
-
// name: 'Mobile Safari',
|
|
53
|
-
// use: { ...devices['iPhone 12'] },
|
|
54
|
-
// },
|
|
55
|
-
|
|
56
|
-
/* Test against branded browsers. */
|
|
57
|
-
// {
|
|
58
|
-
// name: 'Microsoft Edge',
|
|
59
|
-
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
60
|
-
// },
|
|
61
|
-
// {
|
|
62
|
-
// name: 'Google Chrome',
|
|
63
|
-
// use: { ..devices['Desktop Chrome'], channel: 'chrome' },
|
|
64
|
-
// },
|
|
65
|
-
],
|
|
66
|
-
|
|
67
|
-
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
68
|
-
reporter: [['html', { outputFolder: 'e2e/report' }]],
|
|
69
|
-
|
|
70
|
-
/* Retry on CI only */
|
|
71
|
-
retries: process.env.CI ? 1 : 0,
|
|
72
|
-
|
|
73
|
-
testDir: './e2e/specs',
|
|
74
|
-
|
|
75
|
-
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
76
|
-
use: {
|
|
77
|
-
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
78
|
-
baseURL: SITE_URL,
|
|
79
|
-
|
|
80
|
-
// TODO: remove once tests run without it
|
|
81
|
-
ignoreHTTPSErrors: true,
|
|
82
|
-
|
|
83
|
-
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
84
|
-
trace: 'on-first-retry',
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
/* Run your local dev server before starting the tests */
|
|
88
|
-
webServer: {
|
|
89
|
-
command: `pnpm run --dir ../src certificates && pnpm run --dir ../src start:${process.env.VIO_SERVER || 'dev'}`,
|
|
90
|
-
env: {
|
|
91
|
-
NUXT_PUBLIC_VIO_IS_TESTING: 'true',
|
|
92
|
-
},
|
|
93
|
-
ignoreHTTPSErrors: true, // TODO: remove once tests run without it
|
|
94
|
-
timeout: TIMEOUT,
|
|
95
|
-
url: SITE_URL,
|
|
96
|
-
reuseExistingServer: !process.env.CI,
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
workers: undefined,
|
|
100
|
-
})
|