@dxos/test-utils 0.8.4-main.ead640a → 0.8.4-main.effb148878
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/LICENSE +102 -5
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/playwright.mjs +37 -19
- package/dist/lib/browser/playwright.mjs.map +3 -3
- package/dist/lib/node-esm/index.mjs.map +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/playwright.mjs +37 -19
- package/dist/lib/node-esm/playwright.mjs.map +3 -3
- package/dist/types/src/lock.d.ts.map +1 -1
- package/dist/types/src/playwright.d.ts.map +1 -1
- package/dist/types/src/resource.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -13
- package/src/playwright.ts +25 -4
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/resource.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { onTestFinished } from 'vitest';\n\ninterface ResourceLike {\n open(): Promise<any>;\n close(): Promise<any>;\n}\n\n// TODO(burdon): Replace with abstraction relating to Context object?\nexport const openAndClose = async (...resources: ResourceLike[]) => {\n for (const resourceLike of resources) {\n await resourceLike.open();\n onTestFinished(() => resourceLike.close());\n }\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,sBAAsB;AAQxB,IAAMC,eAAe,UAAUC,cAAAA;AACpC,aAAWC,gBAAgBD,WAAW;AACpC,UAAMC,aAAaC,KAAI;
|
|
6
|
-
"names": ["onTestFinished", "openAndClose", "resources", "resourceLike", "open", "
|
|
5
|
+
"mappings": ";AAIA,SAASA,sBAAsB;AAQxB,IAAMC,eAAe,UAAUC,cAAAA;AACpC,aAAWC,gBAAgBD,WAAW;AACpC,UAAMC,aAAaC,KAAI;AACvBJ,mBAAe,MAAMG,aAAaE,MAAK,CAAA;EACzC;AACF;",
|
|
6
|
+
"names": ["onTestFinished", "openAndClose", "resources", "resourceLike", "open", "close"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/resource.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/resource.ts":{"bytes":1452,"imports":[{"path":"vitest","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":376,"imports":[{"path":"src/resource.ts","kind":"import-statement","original":"./resource"}],"format":"esm"},"src/lock.ts":{"bytes":1942,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true}],"format":"esm"},"src/playwright.ts":{"bytes":16371,"imports":[{"path":"@playwright/test","kind":"import-statement","external":true},{"path":"@dxos/node-std/fs","kind":"import-statement","external":true},{"path":"@dxos/node-std/path","kind":"import-statement","external":true},{"path":"pkg-up","kind":"import-statement","external":true},{"path":"src/lock.ts","kind":"import-statement","original":"./lock"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":780},"dist/lib/browser/index.mjs":{"imports":[{"path":"vitest","kind":"import-statement","external":true}],"exports":["openAndClose"],"entryPoint":"src/index.ts","inputs":{"src/resource.ts":{"bytesInOutput":214},"src/index.ts":{"bytesInOutput":0}},"bytes":295},"dist/lib/browser/playwright.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9280},"dist/lib/browser/playwright.mjs":{"imports":[{"path":"@playwright/test","kind":"import-statement","external":true},{"path":"@dxos/node-std/fs","kind":"import-statement","external":true},{"path":"@dxos/node-std/path","kind":"import-statement","external":true},{"path":"pkg-up","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true}],"exports":["e2ePreset","setupPage","storybookUrl"],"entryPoint":"src/playwright.ts","inputs":{"src/playwright.ts":{"bytesInOutput":3991},"src/lock.ts":{"bytesInOutput":389}},"bytes":4532}}}
|
|
@@ -1,24 +1,13 @@
|
|
|
1
1
|
// src/playwright.ts
|
|
2
|
+
import { devices } from "@playwright/test";
|
|
2
3
|
import { existsSync, readFileSync } from "@dxos/node-std/fs";
|
|
3
4
|
import { dirname, join, resolve } from "@dxos/node-std/path";
|
|
4
5
|
import pkgUp from "pkg-up";
|
|
5
6
|
|
|
6
7
|
// src/lock.ts
|
|
7
8
|
import { trigger } from "@dxos/async";
|
|
8
|
-
function _define_property(obj, key, value) {
|
|
9
|
-
if (key in obj) {
|
|
10
|
-
Object.defineProperty(obj, key, {
|
|
11
|
-
value,
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
writable: true
|
|
15
|
-
});
|
|
16
|
-
} else {
|
|
17
|
-
obj[key] = value;
|
|
18
|
-
}
|
|
19
|
-
return obj;
|
|
20
|
-
}
|
|
21
9
|
var Lock = class {
|
|
10
|
+
_lastPromise = Promise.resolve();
|
|
22
11
|
async executeSynchronized(fun) {
|
|
23
12
|
const prevPromise = this._lastPromise;
|
|
24
13
|
const [getPromise, resolve2] = trigger();
|
|
@@ -31,9 +20,6 @@ var Lock = class {
|
|
|
31
20
|
resolve2();
|
|
32
21
|
}
|
|
33
22
|
}
|
|
34
|
-
constructor() {
|
|
35
|
-
_define_property(this, "_lastPromise", Promise.resolve());
|
|
36
|
-
}
|
|
37
23
|
};
|
|
38
24
|
|
|
39
25
|
// src/playwright.ts
|
|
@@ -72,6 +58,29 @@ var e2ePreset = (testDir) => {
|
|
|
72
58
|
const workspaceRoot = findWorkspaceRoot(packageDir);
|
|
73
59
|
const testResultOuputDir = join(workspaceRoot, "test-results/playwright/output", packageDirName);
|
|
74
60
|
const reporterOutputFile = join(workspaceRoot, "test-results/playwright/report", `${packageDirName}.json`);
|
|
61
|
+
const browser = process.env.PLAYWRIGHT_BROWSER || (process.env.CI ? "all" : "chromium");
|
|
62
|
+
const projects = [
|
|
63
|
+
{
|
|
64
|
+
name: "chromium",
|
|
65
|
+
use: {
|
|
66
|
+
...devices["Desktop Chrome"]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "firefox",
|
|
71
|
+
use: {
|
|
72
|
+
...devices["Desktop Firefox"]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "webkit",
|
|
77
|
+
use: {
|
|
78
|
+
...devices["Desktop Safari"]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
].filter((project) => {
|
|
82
|
+
return browser === "all" || project.name === browser;
|
|
83
|
+
});
|
|
75
84
|
return {
|
|
76
85
|
testDir,
|
|
77
86
|
outputDir: testResultOuputDir,
|
|
@@ -79,10 +88,12 @@ var e2ePreset = (testDir) => {
|
|
|
79
88
|
fullyParallel: true,
|
|
80
89
|
// Fail the build on CI if you accidentally left test.only in the source code.
|
|
81
90
|
forbidOnly: !!process.env.CI,
|
|
82
|
-
// Retry on CI
|
|
91
|
+
// Retry on CI to ride out the residual d&d / startup flakes while the
|
|
92
|
+
// underlying causes are still being chased. Local runs stay strict so
|
|
93
|
+
// flakes are visible while iterating.
|
|
83
94
|
retries: process.env.CI ? 2 : 0,
|
|
84
95
|
// Opt out of parallel tests on CI.
|
|
85
|
-
workers: process.env.CI ? 1 :
|
|
96
|
+
workers: process.env.CI ? 1 : 4,
|
|
86
97
|
// Reporter to use. See https://playwright.dev/docs/test-reporters.
|
|
87
98
|
reporter: process.env.CI ? [
|
|
88
99
|
[
|
|
@@ -93,6 +104,12 @@ var e2ePreset = (testDir) => {
|
|
|
93
104
|
{
|
|
94
105
|
outputFile: reporterOutputFile
|
|
95
106
|
}
|
|
107
|
+
],
|
|
108
|
+
[
|
|
109
|
+
"junit",
|
|
110
|
+
{
|
|
111
|
+
outputFile: reporterOutputFile.replace(/\.json$/, ".xml")
|
|
112
|
+
}
|
|
96
113
|
]
|
|
97
114
|
] : [
|
|
98
115
|
[
|
|
@@ -101,7 +118,8 @@ var e2ePreset = (testDir) => {
|
|
|
101
118
|
],
|
|
102
119
|
use: {
|
|
103
120
|
trace: "retain-on-failure"
|
|
104
|
-
}
|
|
121
|
+
},
|
|
122
|
+
projects
|
|
105
123
|
};
|
|
106
124
|
};
|
|
107
125
|
var setupPage = async (browser, options = {}) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/playwright.ts", "../../../src/lock.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\n/* eslint-disable no-console */\n\nimport {
|
|
5
|
-
"mappings": ";AAMA,
|
|
6
|
-
"names": ["existsSync", "readFileSync", "dirname", "join", "resolve", "pkgUp", "trigger", "Lock", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\n/* eslint-disable no-console */\n\nimport { type Browser, type BrowserContext, type Page, type PlaywrightTestConfig, devices } from '@playwright/test';\nimport { existsSync, readFileSync } from 'node:fs';\nimport { dirname, join, resolve } from 'node:path';\nimport pkgUp from 'pkg-up';\n\nimport { Lock } from './lock';\n\nconst findWorkspaceRoot = (startDir: string): string => {\n let dir = resolve(startDir);\n while (dir !== '/') {\n try {\n // Check for pnpm-workspace.yaml first (modern pnpm approach)\n const workspaceYamlPath = join(dir, 'pnpm-workspace.yaml');\n if (existsSync(workspaceYamlPath)) {\n return dir;\n }\n\n // Check for package.json with workspaces field (legacy approach)\n const pkgPath = join(dir, 'package.json');\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n if (pkg.workspaces) {\n return dir;\n }\n } catch {}\n const parent = dirname(dir);\n if (parent === dir) {\n break;\n }\n dir = parent;\n }\n\n throw new Error('Could not find pnpm workspace root');\n};\n\nexport const e2ePreset = (testDir: string): PlaywrightTestConfig => {\n const packageJson = pkgUp.sync({ cwd: testDir });\n const packageDir = packageJson!.split('/').slice(0, -1).join('/');\n const packageDirName = packageDir.split('/').pop();\n if (!packageDirName) {\n throw new Error('packageDirName not found');\n }\n\n const workspaceRoot = findWorkspaceRoot(packageDir);\n const testResultOuputDir = join(workspaceRoot, 'test-results/playwright/output', packageDirName);\n const reporterOutputFile = join(workspaceRoot, 'test-results/playwright/report', `${packageDirName}.json`);\n\n const browser = process.env.PLAYWRIGHT_BROWSER || (process.env.CI ? 'all' : 'chromium');\n const projects = [\n {\n name: 'chromium',\n use: { ...devices['Desktop Chrome'] },\n },\n {\n name: 'firefox',\n use: { ...devices['Desktop Firefox'] },\n },\n {\n name: 'webkit',\n use: { ...devices['Desktop Safari'] },\n },\n ].filter((project) => {\n return browser === 'all' || project.name === browser;\n });\n\n return {\n testDir,\n outputDir: testResultOuputDir,\n // Run tests in files in parallel.\n fullyParallel: true,\n // Fail the build on CI if you accidentally left test.only in the source code.\n forbidOnly: !!process.env.CI,\n // Retry on CI to ride out the residual d&d / startup flakes while the\n // underlying causes are still being chased. Local runs stay strict so\n // flakes are visible while iterating.\n retries: process.env.CI ? 2 : 0,\n // Opt out of parallel tests on CI.\n workers: process.env.CI ? 1 : 4,\n // Reporter to use. See https://playwright.dev/docs/test-reporters.\n reporter: process.env.CI\n ? [\n ['list'],\n [\n 'json',\n {\n outputFile: reporterOutputFile,\n },\n ],\n ['junit', { outputFile: reporterOutputFile.replace(/\\.json$/, '.xml') }],\n ]\n : [['list']],\n use: {\n trace: 'retain-on-failure',\n },\n projects,\n };\n};\n\nexport type SetupOptions = {\n url?: string;\n bridgeLogs?: boolean;\n viewportSize?: Parameters<Page['setViewportSize']>[0];\n};\n\nexport const setupPage = async (browser: Browser | BrowserContext, options: SetupOptions = {}) => {\n const { url, bridgeLogs, viewportSize } = options;\n\n const context = 'newContext' in browser ? await browser.newContext() : browser;\n const page = await context.newPage();\n\n if (viewportSize) {\n await page.setViewportSize(viewportSize);\n }\n\n // TODO(wittjosiah): Remove?\n if (bridgeLogs) {\n const lock = new Lock();\n\n page.on('pageerror', async (error) => {\n await lock.executeSynchronized(async () => {\n // eslint-disable-next-line no-console\n console.log(error);\n });\n });\n\n page.on('console', async (msg) => {\n try {\n const argsPromise = Promise.all(msg.args().map((x) => x.jsonValue()));\n await lock.executeSynchronized(async () => {\n const args = await argsPromise;\n\n if (args.length > 0) {\n console.log(...args);\n } else {\n console.log(msg);\n }\n });\n } catch (err) {\n console.error('Failed to parse message', err);\n }\n });\n }\n\n if (url) {\n await page.goto(url);\n }\n\n return { context, page };\n};\n\nexport const storybookUrl = (storyId: string, port = 9009) =>\n `http://localhost:${port}/iframe.html?id=${storyId}&viewMode=story`;\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { trigger } from '@dxos/async';\n\n// Copied from @dxos/async.\nexport class Lock {\n private _lastPromise = Promise.resolve();\n\n async executeSynchronized<T>(fun: () => Promise<T>): Promise<T> {\n const prevPromise = this._lastPromise;\n const [getPromise, resolve] = trigger();\n this._lastPromise = getPromise();\n\n await prevPromise;\n try {\n const value = await fun();\n return value;\n } finally {\n resolve();\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAMA,SAAkFA,eAAe;AACjG,SAASC,YAAYC,oBAAoB;AACzC,SAASC,SAASC,MAAMC,eAAe;AACvC,OAAOC,WAAW;;;ACLlB,SAASC,eAAe;AAGj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7BC,gBAAQC,IAAIH,KAAAA;MACd,CAAA;IACF,CAAA;AAEAN,SAAKK,GAAG,WAAW,OAAOK,QAAAA;AACxB,UAAI;AACF,cAAMC,cAAcC,QAAQC,IAAIH,IAAII,KAAI,EAAGC,IAAI,CAACC,MAAMA,EAAEC,UAAS,CAAA,CAAA;AACjE,cAAMd,KAAKI,oBAAoB,YAAA;AAC7B,gBAAMO,OAAO,MAAMH;AAEnB,cAAIG,KAAKI,SAAS,GAAG;AACnBV,oBAAQC,IAAG,GAAIK,IAAAA;UACjB,OAAO;AACLN,oBAAQC,IAAIC,GAAAA;UACd;QACF,CAAA;MACF,SAASS,KAAK;AACZX,gBAAQF,MAAM,2BAA2Ba,GAAAA;MAC3C;IACF,CAAA;EACF;AAEA,MAAIxB,KAAK;AACP,UAAMK,KAAKoB,KAAKzB,GAAAA;EAClB;AAEA,SAAO;IAAEG;IAASE;EAAK;AACzB;AAEO,IAAMqB,eAAe,CAACC,SAAiBC,OAAO,SACnD,oBAAoBA,IAAAA,mBAAuBD,OAAAA;",
|
|
6
|
+
"names": ["devices", "existsSync", "readFileSync", "dirname", "join", "resolve", "pkgUp", "trigger", "Lock", "_lastPromise", "Promise", "resolve", "executeSynchronized", "fun", "prevPromise", "getPromise", "value", "findWorkspaceRoot", "startDir", "dir", "resolve", "workspaceYamlPath", "join", "existsSync", "pkgPath", "pkg", "JSON", "parse", "readFileSync", "workspaces", "parent", "dirname", "Error", "e2ePreset", "testDir", "packageJson", "pkgUp", "sync", "cwd", "packageDir", "split", "slice", "packageDirName", "pop", "workspaceRoot", "testResultOuputDir", "reporterOutputFile", "browser", "process", "env", "PLAYWRIGHT_BROWSER", "CI", "projects", "name", "use", "devices", "filter", "project", "outputDir", "fullyParallel", "forbidOnly", "retries", "workers", "reporter", "outputFile", "replace", "trace", "setupPage", "options", "url", "bridgeLogs", "viewportSize", "context", "newContext", "page", "newPage", "setViewportSize", "lock", "Lock", "on", "error", "executeSynchronized", "console", "log", "msg", "argsPromise", "Promise", "all", "args", "map", "x", "jsonValue", "length", "err", "goto", "storybookUrl", "storyId", "port"]
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/resource.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { onTestFinished } from 'vitest';\n\ninterface ResourceLike {\n open(): Promise<any>;\n close(): Promise<any>;\n}\n\n// TODO(burdon): Replace with abstraction relating to Context object?\nexport const openAndClose = async (...resources: ResourceLike[]) => {\n for (const resourceLike of resources) {\n await resourceLike.open();\n onTestFinished(() => resourceLike.close());\n }\n};\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,sBAAsB;AAQxB,IAAMC,eAAe,UAAUC,cAAAA;AACpC,aAAWC,gBAAgBD,WAAW;AACpC,UAAMC,aAAaC,KAAI;
|
|
6
|
-
"names": ["onTestFinished", "openAndClose", "resources", "resourceLike", "open", "
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,sBAAsB;AAQxB,IAAMC,eAAe,UAAUC,cAAAA;AACpC,aAAWC,gBAAgBD,WAAW;AACpC,UAAMC,aAAaC,KAAI;AACvBJ,mBAAe,MAAMG,aAAaE,MAAK,CAAA;EACzC;AACF;",
|
|
6
|
+
"names": ["onTestFinished", "openAndClose", "resources", "resourceLike", "open", "close"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/resource.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/resource.ts":{"bytes":1452,"imports":[{"path":"vitest","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":376,"imports":[{"path":"src/resource.ts","kind":"import-statement","original":"./resource"}],"format":"esm"},"src/lock.ts":{"bytes":1942,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true}],"format":"esm"},"src/playwright.ts":{"bytes":16371,"imports":[{"path":"@playwright/test","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"pkg-up","kind":"import-statement","external":true},{"path":"src/lock.ts","kind":"import-statement","original":"./lock"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":782},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"vitest","kind":"import-statement","external":true}],"exports":["openAndClose"],"entryPoint":"src/index.ts","inputs":{"src/resource.ts":{"bytesInOutput":214},"src/index.ts":{"bytesInOutput":0}},"bytes":388},"dist/lib/node-esm/playwright.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9282},"dist/lib/node-esm/playwright.mjs":{"imports":[{"path":"@playwright/test","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"pkg-up","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true}],"exports":["e2ePreset","setupPage","storybookUrl"],"entryPoint":"src/playwright.ts","inputs":{"src/playwright.ts":{"bytesInOutput":3971},"src/lock.ts":{"bytesInOutput":389}},"bytes":4605}}}
|
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
|
|
3
3
|
// src/playwright.ts
|
|
4
|
+
import { devices } from "@playwright/test";
|
|
4
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
6
|
import { dirname, join, resolve } from "node:path";
|
|
6
7
|
import pkgUp from "pkg-up";
|
|
7
8
|
|
|
8
9
|
// src/lock.ts
|
|
9
10
|
import { trigger } from "@dxos/async";
|
|
10
|
-
function _define_property(obj, key, value) {
|
|
11
|
-
if (key in obj) {
|
|
12
|
-
Object.defineProperty(obj, key, {
|
|
13
|
-
value,
|
|
14
|
-
enumerable: true,
|
|
15
|
-
configurable: true,
|
|
16
|
-
writable: true
|
|
17
|
-
});
|
|
18
|
-
} else {
|
|
19
|
-
obj[key] = value;
|
|
20
|
-
}
|
|
21
|
-
return obj;
|
|
22
|
-
}
|
|
23
11
|
var Lock = class {
|
|
12
|
+
_lastPromise = Promise.resolve();
|
|
24
13
|
async executeSynchronized(fun) {
|
|
25
14
|
const prevPromise = this._lastPromise;
|
|
26
15
|
const [getPromise, resolve2] = trigger();
|
|
@@ -33,9 +22,6 @@ var Lock = class {
|
|
|
33
22
|
resolve2();
|
|
34
23
|
}
|
|
35
24
|
}
|
|
36
|
-
constructor() {
|
|
37
|
-
_define_property(this, "_lastPromise", Promise.resolve());
|
|
38
|
-
}
|
|
39
25
|
};
|
|
40
26
|
|
|
41
27
|
// src/playwright.ts
|
|
@@ -74,6 +60,29 @@ var e2ePreset = (testDir) => {
|
|
|
74
60
|
const workspaceRoot = findWorkspaceRoot(packageDir);
|
|
75
61
|
const testResultOuputDir = join(workspaceRoot, "test-results/playwright/output", packageDirName);
|
|
76
62
|
const reporterOutputFile = join(workspaceRoot, "test-results/playwright/report", `${packageDirName}.json`);
|
|
63
|
+
const browser = process.env.PLAYWRIGHT_BROWSER || (process.env.CI ? "all" : "chromium");
|
|
64
|
+
const projects = [
|
|
65
|
+
{
|
|
66
|
+
name: "chromium",
|
|
67
|
+
use: {
|
|
68
|
+
...devices["Desktop Chrome"]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "firefox",
|
|
73
|
+
use: {
|
|
74
|
+
...devices["Desktop Firefox"]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "webkit",
|
|
79
|
+
use: {
|
|
80
|
+
...devices["Desktop Safari"]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
].filter((project) => {
|
|
84
|
+
return browser === "all" || project.name === browser;
|
|
85
|
+
});
|
|
77
86
|
return {
|
|
78
87
|
testDir,
|
|
79
88
|
outputDir: testResultOuputDir,
|
|
@@ -81,10 +90,12 @@ var e2ePreset = (testDir) => {
|
|
|
81
90
|
fullyParallel: true,
|
|
82
91
|
// Fail the build on CI if you accidentally left test.only in the source code.
|
|
83
92
|
forbidOnly: !!process.env.CI,
|
|
84
|
-
// Retry on CI
|
|
93
|
+
// Retry on CI to ride out the residual d&d / startup flakes while the
|
|
94
|
+
// underlying causes are still being chased. Local runs stay strict so
|
|
95
|
+
// flakes are visible while iterating.
|
|
85
96
|
retries: process.env.CI ? 2 : 0,
|
|
86
97
|
// Opt out of parallel tests on CI.
|
|
87
|
-
workers: process.env.CI ? 1 :
|
|
98
|
+
workers: process.env.CI ? 1 : 4,
|
|
88
99
|
// Reporter to use. See https://playwright.dev/docs/test-reporters.
|
|
89
100
|
reporter: process.env.CI ? [
|
|
90
101
|
[
|
|
@@ -95,6 +106,12 @@ var e2ePreset = (testDir) => {
|
|
|
95
106
|
{
|
|
96
107
|
outputFile: reporterOutputFile
|
|
97
108
|
}
|
|
109
|
+
],
|
|
110
|
+
[
|
|
111
|
+
"junit",
|
|
112
|
+
{
|
|
113
|
+
outputFile: reporterOutputFile.replace(/\.json$/, ".xml")
|
|
114
|
+
}
|
|
98
115
|
]
|
|
99
116
|
] : [
|
|
100
117
|
[
|
|
@@ -103,7 +120,8 @@ var e2ePreset = (testDir) => {
|
|
|
103
120
|
],
|
|
104
121
|
use: {
|
|
105
122
|
trace: "retain-on-failure"
|
|
106
|
-
}
|
|
123
|
+
},
|
|
124
|
+
projects
|
|
107
125
|
};
|
|
108
126
|
};
|
|
109
127
|
var setupPage = async (browser, options = {}) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/playwright.ts", "../../../src/lock.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\n/* eslint-disable no-console */\n\nimport {
|
|
5
|
-
"mappings": ";;;AAMA,
|
|
6
|
-
"names": ["existsSync", "readFileSync", "dirname", "join", "resolve", "pkgUp", "trigger", "Lock", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\n/* eslint-disable no-console */\n\nimport { type Browser, type BrowserContext, type Page, type PlaywrightTestConfig, devices } from '@playwright/test';\nimport { existsSync, readFileSync } from 'node:fs';\nimport { dirname, join, resolve } from 'node:path';\nimport pkgUp from 'pkg-up';\n\nimport { Lock } from './lock';\n\nconst findWorkspaceRoot = (startDir: string): string => {\n let dir = resolve(startDir);\n while (dir !== '/') {\n try {\n // Check for pnpm-workspace.yaml first (modern pnpm approach)\n const workspaceYamlPath = join(dir, 'pnpm-workspace.yaml');\n if (existsSync(workspaceYamlPath)) {\n return dir;\n }\n\n // Check for package.json with workspaces field (legacy approach)\n const pkgPath = join(dir, 'package.json');\n const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));\n if (pkg.workspaces) {\n return dir;\n }\n } catch {}\n const parent = dirname(dir);\n if (parent === dir) {\n break;\n }\n dir = parent;\n }\n\n throw new Error('Could not find pnpm workspace root');\n};\n\nexport const e2ePreset = (testDir: string): PlaywrightTestConfig => {\n const packageJson = pkgUp.sync({ cwd: testDir });\n const packageDir = packageJson!.split('/').slice(0, -1).join('/');\n const packageDirName = packageDir.split('/').pop();\n if (!packageDirName) {\n throw new Error('packageDirName not found');\n }\n\n const workspaceRoot = findWorkspaceRoot(packageDir);\n const testResultOuputDir = join(workspaceRoot, 'test-results/playwright/output', packageDirName);\n const reporterOutputFile = join(workspaceRoot, 'test-results/playwright/report', `${packageDirName}.json`);\n\n const browser = process.env.PLAYWRIGHT_BROWSER || (process.env.CI ? 'all' : 'chromium');\n const projects = [\n {\n name: 'chromium',\n use: { ...devices['Desktop Chrome'] },\n },\n {\n name: 'firefox',\n use: { ...devices['Desktop Firefox'] },\n },\n {\n name: 'webkit',\n use: { ...devices['Desktop Safari'] },\n },\n ].filter((project) => {\n return browser === 'all' || project.name === browser;\n });\n\n return {\n testDir,\n outputDir: testResultOuputDir,\n // Run tests in files in parallel.\n fullyParallel: true,\n // Fail the build on CI if you accidentally left test.only in the source code.\n forbidOnly: !!process.env.CI,\n // Retry on CI to ride out the residual d&d / startup flakes while the\n // underlying causes are still being chased. Local runs stay strict so\n // flakes are visible while iterating.\n retries: process.env.CI ? 2 : 0,\n // Opt out of parallel tests on CI.\n workers: process.env.CI ? 1 : 4,\n // Reporter to use. See https://playwright.dev/docs/test-reporters.\n reporter: process.env.CI\n ? [\n ['list'],\n [\n 'json',\n {\n outputFile: reporterOutputFile,\n },\n ],\n ['junit', { outputFile: reporterOutputFile.replace(/\\.json$/, '.xml') }],\n ]\n : [['list']],\n use: {\n trace: 'retain-on-failure',\n },\n projects,\n };\n};\n\nexport type SetupOptions = {\n url?: string;\n bridgeLogs?: boolean;\n viewportSize?: Parameters<Page['setViewportSize']>[0];\n};\n\nexport const setupPage = async (browser: Browser | BrowserContext, options: SetupOptions = {}) => {\n const { url, bridgeLogs, viewportSize } = options;\n\n const context = 'newContext' in browser ? await browser.newContext() : browser;\n const page = await context.newPage();\n\n if (viewportSize) {\n await page.setViewportSize(viewportSize);\n }\n\n // TODO(wittjosiah): Remove?\n if (bridgeLogs) {\n const lock = new Lock();\n\n page.on('pageerror', async (error) => {\n await lock.executeSynchronized(async () => {\n // eslint-disable-next-line no-console\n console.log(error);\n });\n });\n\n page.on('console', async (msg) => {\n try {\n const argsPromise = Promise.all(msg.args().map((x) => x.jsonValue()));\n await lock.executeSynchronized(async () => {\n const args = await argsPromise;\n\n if (args.length > 0) {\n console.log(...args);\n } else {\n console.log(msg);\n }\n });\n } catch (err) {\n console.error('Failed to parse message', err);\n }\n });\n }\n\n if (url) {\n await page.goto(url);\n }\n\n return { context, page };\n};\n\nexport const storybookUrl = (storyId: string, port = 9009) =>\n `http://localhost:${port}/iframe.html?id=${storyId}&viewMode=story`;\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { trigger } from '@dxos/async';\n\n// Copied from @dxos/async.\nexport class Lock {\n private _lastPromise = Promise.resolve();\n\n async executeSynchronized<T>(fun: () => Promise<T>): Promise<T> {\n const prevPromise = this._lastPromise;\n const [getPromise, resolve] = trigger();\n this._lastPromise = getPromise();\n\n await prevPromise;\n try {\n const value = await fun();\n return value;\n } finally {\n resolve();\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;AAMA,SAAkFA,eAAe;AACjG,SAASC,YAAYC,oBAAoB;AACzC,SAASC,SAASC,MAAMC,eAAe;AACvC,OAAOC,WAAW;;;ACLlB,SAASC,eAAe;AAGjB,IAAMC,OAAN,MAAMA;EACHC,eAAeC,QAAQC,QAAO;EAEtC,MAAMC,oBAAuBC,KAAmC;AAC9D,UAAMC,cAAc,KAAKL;AACzB,UAAM,CAACM,YAAYJ,QAAAA,IAAWJ,QAAAA;AAC9B,SAAKE,eAAeM,WAAAA;AAEpB,UAAMD;AACN,QAAI;AACF,YAAME,QAAQ,MAAMH,IAAAA;AACpB,aAAOG;IACT,UAAA;AACEL,MAAAA,SAAAA;IACF;EACF;AACF;;;ADVA,IAAMM,oBAAoB,CAACC,aAAAA;AACzB,MAAIC,MAAMC,QAAQF,QAAAA;AAClB,SAAOC,QAAQ,KAAK;AAClB,QAAI;AAEF,YAAME,oBAAoBC,KAAKH,KAAK,qBAAA;AACpC,UAAII,WAAWF,iBAAAA,GAAoB;AACjC,eAAOF;MACT;AAGA,YAAMK,UAAUF,KAAKH,KAAK,cAAA;AAC1B,YAAMM,MAAMC,KAAKC,MAAMC,aAAaJ,SAAS,OAAA,CAAA;AAC7C,UAAIC,IAAII,YAAY;AAClB,eAAOV;MACT;IACF,QAAQ;IAAC;AACT,UAAMW,SAASC,QAAQZ,GAAAA;AACvB,QAAIW,WAAWX,KAAK;AAClB;IACF;AACAA,UAAMW;EACR;AAEA,QAAM,IAAIE,MAAM,oCAAA;AAClB;AAEO,IAAMC,YAAY,CAACC,YAAAA;AACxB,QAAMC,cAAcC,MAAMC,KAAK;IAAEC,KAAKJ;EAAQ,CAAA;AAC9C,QAAMK,aAAaJ,YAAaK,MAAM,GAAA,EAAKC,MAAM,GAAG,EAAC,EAAGnB,KAAK,GAA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U,IAAK1B;AACvE,QAAM2B,OAAO,MAAMF,QAAQG,QAAO;AAElC,MAAIJ,cAAc;AAChB,UAAMG,KAAKE,gBAAgBL,YAAAA;EAC7B;AAGA,MAAID,YAAY;AACd,UAAMO,OAAO,IAAIC,KAAAA;AAEjBJ,SAAKK,GAAG,aAAa,OAAOC,UAAAA;AAC1B,YAAMH,KAAKI,oBAAoB,YAAA;AAE7BC,gBAAQC,IAAIH,KAAAA;MACd,CAAA;IACF,CAAA;AAEAN,SAAKK,GAAG,WAAW,OAAOK,QAAAA;AACxB,UAAI;AACF,cAAMC,cAAcC,QAAQC,IAAIH,IAAII,KAAI,EAAGC,IAAI,CAACC,MAAMA,EAAEC,UAAS,CAAA,CAAA;AACjE,cAAMd,KAAKI,oBAAoB,YAAA;AAC7B,gBAAMO,OAAO,MAAMH;AAEnB,cAAIG,KAAKI,SAAS,GAAG;AACnBV,oBAAQC,IAAG,GAAIK,IAAAA;UACjB,OAAO;AACLN,oBAAQC,IAAIC,GAAAA;UACd;QACF,CAAA;MACF,SAASS,KAAK;AACZX,gBAAQF,MAAM,2BAA2Ba,GAAAA;MAC3C;IACF,CAAA;EACF;AAEA,MAAIxB,KAAK;AACP,UAAMK,KAAKoB,KAAKzB,GAAAA;EAClB;AAEA,SAAO;IAAEG;IAASE;EAAK;AACzB;AAEO,IAAMqB,eAAe,CAACC,SAAiBC,OAAO,SACnD,oBAAoBA,IAAAA,mBAAuBD,OAAAA;",
|
|
6
|
+
"names": ["devices", "existsSync", "readFileSync", "dirname", "join", "resolve", "pkgUp", "trigger", "Lock", "_lastPromise", "Promise", "resolve", "executeSynchronized", "fun", "prevPromise", "getPromise", "value", "findWorkspaceRoot", "startDir", "dir", "resolve", "workspaceYamlPath", "join", "existsSync", "pkgPath", "pkg", "JSON", "parse", "readFileSync", "workspaces", "parent", "dirname", "Error", "e2ePreset", "testDir", "packageJson", "pkgUp", "sync", "cwd", "packageDir", "split", "slice", "packageDirName", "pop", "workspaceRoot", "testResultOuputDir", "reporterOutputFile", "browser", "process", "env", "PLAYWRIGHT_BROWSER", "CI", "projects", "name", "use", "devices", "filter", "project", "outputDir", "fullyParallel", "forbidOnly", "retries", "workers", "reporter", "outputFile", "replace", "trace", "setupPage", "options", "url", "bridgeLogs", "viewportSize", "context", "newContext", "page", "newPage", "setViewportSize", "lock", "Lock", "on", "error", "executeSynchronized", "console", "log", "msg", "argsPromise", "Promise", "all", "args", "map", "x", "jsonValue", "length", "err", "goto", "storybookUrl", "storyId", "port"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../../src/lock.ts"],"names":[],"mappings":"AAOA,qBAAa,IAAI;IACf,OAAO,CAAC,YAAY,CAAqB;IAEnC,mBAAmB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../../src/lock.ts"],"names":[],"mappings":"AAOA,qBAAa,IAAI;IACf,OAAO,CAAC,YAAY,CAAqB;IAEnC,mBAAmB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAY9D;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playwright.d.ts","sourceRoot":"","sources":["../../../src/playwright.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"playwright.d.ts","sourceRoot":"","sources":["../../../src/playwright.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,IAAI,EAAE,KAAK,oBAAoB,EAAW,MAAM,kBAAkB,CAAC;AAkCpH,eAAO,MAAM,SAAS,YAAa,MAAM,KAAG,oBA6D3C,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACvD,CAAC;AAEF,eAAO,MAAM,SAAS,YAAmB,OAAO,GAAG,cAAc,YAAW,YAAY;;;EA4CvF,CAAC;AAEF,eAAO,MAAM,YAAY,YAAa,MAAM,0BACyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/resource.ts"],"names":[],"mappings":"AAMA,UAAU,YAAY;IACpB,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IACrB,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;CACvB;AAGD,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/resource.ts"],"names":[],"mappings":"AAMA,UAAU,YAAY;IACpB,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IACrB,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;CACvB;AAGD,eAAO,MAAM,YAAY,iBAAwB,YAAY,EAAE,kBAK9D,CAAC"}
|