@dargmuesli/nuxt-vio-testing 13.1.0 → 13.1.2

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.
@@ -1,6 +1,6 @@
1
1
  import { test, expect } from '@playwright/test'
2
2
 
3
- import { SITE_URL } from '#src/utils/constants'
3
+ import { SITE_URL } from '#tests/e2e/utils/constants'
4
4
  import { COOKIE_CONTROL_DEFAULT, PAGE_READY } from '../../../utils/constants'
5
5
 
6
6
  test.beforeEach(async ({ context }) => {
@@ -1,7 +1,7 @@
1
1
  import AxeBuilder from '@axe-core/playwright'
2
2
  import { test, expect } from '@playwright/test'
3
3
 
4
- import { SITE_URL } from '#src/utils/constants'
4
+ import { SITE_URL } from '#tests/e2e/utils/constants'
5
5
  import { COOKIE_CONTROL_DEFAULT, PAGE_READY } from '../../../utils/constants'
6
6
  import { testMetadata } from '../../../utils/tests'
7
7
 
@@ -1,6 +1,6 @@
1
1
  import { test, expect } from '@playwright/test'
2
2
 
3
- import { SITE_URL } from '#src/utils/constants'
3
+ import { SITE_URL } from '#tests/e2e/utils/constants'
4
4
  import { COOKIE_CONTROL_DEFAULT, PAGE_READY } from '../../../utils/constants'
5
5
  import { testMetadata } from '../../../utils/tests'
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { test, expect } from '@playwright/test'
2
2
 
3
- import { SITE_URL } from '#src/utils/constants'
3
+ import { SITE_URL } from '#tests/e2e/utils/constants'
4
4
  import { COOKIE_CONTROL_DEFAULT, PAGE_READY } from '../../../utils/constants'
5
5
 
6
6
  test.beforeEach(async ({ context }) => {
@@ -1,7 +1,7 @@
1
1
  import { test, expect } from '@playwright/test'
2
2
  import { escapeRegExp } from 'lodash-es'
3
3
 
4
- import { SITE_URL } from '#src/utils/constants'
4
+ import { SITE_URL } from '#tests/e2e/utils/constants'
5
5
 
6
6
  const path = '/robots.txt'
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { test, expect } from '@playwright/test'
2
2
  import { escapeRegExp } from 'lodash-es'
3
3
 
4
- import { SITE_URL } from '#src/utils/constants'
4
+ import { SITE_URL } from '#tests/e2e/utils/constants'
5
5
 
6
6
  const path = '/sitemap_index.xml'
7
7
 
@@ -35,3 +35,7 @@ export const PAGE_READY = async ({
35
35
  )
36
36
  }
37
37
  }
38
+ export const SITE_URL =
39
+ process.env.SITE_URL ||
40
+ process.env.NUXT_PUBLIC_SITE_URL ||
41
+ `https://${process.env.HOST || 'localhost'}:${process.env.PORT || '3000'}`
@@ -1,7 +1,7 @@
1
1
  import { expect, type Page } from '@playwright/test'
2
2
  import { joinURL, withoutTrailingSlash } from 'ufo'
3
3
 
4
- import { SITE_URL } from '#src/utils/constants'
4
+ import { SITE_URL } from '#tests/e2e/utils/constants'
5
5
 
6
6
  export const testMetadata = async ({
7
7
  page,
package/package.json CHANGED
@@ -21,7 +21,8 @@
21
21
  "e2e/specs",
22
22
  "e2e/utils",
23
23
  "package.json",
24
- "playwright.config.ts"
24
+ "playwright.config.ts",
25
+ "tsconfig.json"
25
26
  ],
26
27
  "name": "@dargmuesli/nuxt-vio-testing",
27
28
  "peerDependencies": {
@@ -54,5 +55,5 @@
54
55
  "test:e2e:server:static": "cross-env NODE_ENV=production PORT=\"${PORT:-3002}\" SITE_URL=\"${SITE_URL:-https://localhost:3002}\" VIO_SERVER=static pnpm run test:e2e"
55
56
  },
56
57
  "type": "module",
57
- "version": "13.1.0"
58
+ "version": "13.1.2"
58
59
  }
@@ -1,6 +1,6 @@
1
1
  import { defineConfig, devices } from '@playwright/test'
2
2
 
3
- import { SITE_URL } from '#src/utils/constants'
3
+ import { SITE_URL } from '#tests/e2e/utils/constants'
4
4
 
5
5
  /**
6
6
  * Read environment variables from file.
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "ESNext",
4
+ "moduleResolution": "Bundler",
5
+ "paths": {
6
+ "#tests/*": ["./*"]
7
+ },
8
+ }
9
+ }