@atomicsmash/test-utils 6.0.0-beta.2 → 6.0.1-beta.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/index.d.ts.map +1 -1
- package/dist/index.js +3 -6
- package/package.json +4 -4
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,IAAI,EACJ,OAAO,EACP,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,IAAI,EACJ,OAAO,EACP,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAUpD,MAAM,MAAM,iBAAiB,GAC1B,iBAAiB,GACjB,YAAY,GACZ,aAAa,GACb,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,aAAa,CAAC;AACjB,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,cAAc,CAAC;AAC9D,MAAM,MAAM,QAAQ,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;AAC/D,MAAM,MAAM,QAAQ,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB,CAAC,EAAE,QAAQ,CAAC;CAChC,EAAE,CAAC;AAEJ,wBAAgB,iCAAiC,CAChD,QAAQ,EAAE,iBAAiB,GAAG,mBAAmB,EACjD,qBAAqB,EAAE,iBAAiB,GAAG,mB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W,EAAE,WAAW,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,2HAkDlE"}
|
package/dist/index.js
CHANGED
|
@@ -66,7 +66,6 @@ export const playwrightConfig = {
|
|
|
66
66
|
};
|
|
67
67
|
export const lighthouseTest = base.extend({
|
|
68
68
|
port: [
|
|
69
|
-
// eslint-disable-next-line no-empty-pattern -- destructure pattern is required by playwright
|
|
70
69
|
async ({}, use) => {
|
|
71
70
|
// Assign a unique port for each playwright worker to support parallel tests
|
|
72
71
|
const port = await getPort();
|
|
@@ -77,7 +76,7 @@ export const lighthouseTest = base.extend({
|
|
|
77
76
|
browser: [
|
|
78
77
|
async ({ port }, use) => {
|
|
79
78
|
const browser = await chromium.launch({
|
|
80
|
-
args: [`--remote-debugging-port=${port}`],
|
|
79
|
+
args: [`--remote-debugging-port=${port.toString()}`],
|
|
81
80
|
});
|
|
82
81
|
await use(browser);
|
|
83
82
|
},
|
|
@@ -102,9 +101,7 @@ export const doLighthouseTest = (pageToTest, type, disableAuditLogs = false) =>
|
|
|
102
101
|
directory: "lighthouse/latest-lighthouse-report",
|
|
103
102
|
name: `${pageToTest.slug ?? slugify(pageToTest.name)}-${type}`,
|
|
104
103
|
},
|
|
105
|
-
config:
|
|
106
|
-
? lighthouseDesktopConfig
|
|
107
|
-
: lighthouseMobileConfig),
|
|
104
|
+
config: type === "desktop" ? lighthouseDesktopConfig : lighthouseMobileConfig,
|
|
108
105
|
ignoreError: true,
|
|
109
106
|
disableLogs: disableAuditLogs,
|
|
110
107
|
});
|
|
@@ -217,7 +214,7 @@ export function generateProjectsForAllBrowsers(baseProject) {
|
|
|
217
214
|
]) {
|
|
218
215
|
projects.push({
|
|
219
216
|
...baseProject,
|
|
220
|
-
name: `${baseProject.name}__${browser.name}`,
|
|
217
|
+
name: `${baseProject.name ?? "unknown_project"}__${browser.name}`,
|
|
221
218
|
use: { ...baseProject.use, ...browser.use },
|
|
222
219
|
grepInvert: [
|
|
223
220
|
...[baseProject.grepInvert].flat(1),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomicsmash/test-utils",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.1-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A collection of helper functions for automated testing with Playwright.",
|
|
6
6
|
"keywords": [
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"lint:types": "tsc"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@playwright/test": "^1.
|
|
45
|
+
"@playwright/test": "^1.61.0",
|
|
46
46
|
"cross-env": "^10.1.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@axe-core/playwright": "^4.11.
|
|
50
|
-
"get-port": "^7.
|
|
49
|
+
"@axe-core/playwright": "^4.11.3",
|
|
50
|
+
"get-port": "^7.2.0",
|
|
51
51
|
"playwright-lighthouse": "^4.0.0"
|
|
52
52
|
}
|
|
53
53
|
}
|