@dxos/test-utils 0.8.4-main.84f28bd → 0.8.4-main.937b3ca
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/lib/browser/meta.json +1 -1
- package/dist/lib/browser/playwright.mjs +27 -4
- package/dist/lib/browser/playwright.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/playwright.mjs +27 -4
- package/dist/lib/node-esm/playwright.mjs.map +3 -3
- package/dist/types/src/playwright.d.ts +1 -1
- package/dist/types/src/playwright.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -5
- package/src/playwright.ts +21 -1
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/test-utils",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.937b3ca",
|
|
4
4
|
"description": "Test utilities",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
13
|
"type": "module",
|
|
@@ -32,13 +36,13 @@
|
|
|
32
36
|
"src"
|
|
33
37
|
],
|
|
34
38
|
"dependencies": {
|
|
35
|
-
"@playwright/test": "
|
|
39
|
+
"@playwright/test": "1.57.0",
|
|
36
40
|
"pkg-up": "^3.1.0",
|
|
37
|
-
"@dxos/async": "0.8.4-main.
|
|
38
|
-
"@dxos/node-std": "0.8.4-main.
|
|
41
|
+
"@dxos/async": "0.8.4-main.937b3ca",
|
|
42
|
+
"@dxos/node-std": "0.8.4-main.937b3ca"
|
|
39
43
|
},
|
|
40
44
|
"peerDependencies": {
|
|
41
|
-
"vitest": "
|
|
45
|
+
"vitest": "3.2.4"
|
|
42
46
|
},
|
|
43
47
|
"publishConfig": {
|
|
44
48
|
"access": "public"
|
package/src/playwright.ts
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
/* eslint-disable no-console */
|
|
6
6
|
|
|
7
|
-
import { type Browser, type BrowserContext, type PlaywrightTestConfig, type Page } from '@playwright/test';
|
|
8
7
|
import { existsSync, readFileSync } from 'node:fs';
|
|
9
8
|
import { dirname, join, resolve } from 'node:path';
|
|
9
|
+
|
|
10
|
+
import { type Browser, type BrowserContext, type Page, type PlaywrightTestConfig, devices } from '@playwright/test';
|
|
10
11
|
import pkgUp from 'pkg-up';
|
|
11
12
|
|
|
12
13
|
import { Lock } from './lock';
|
|
@@ -50,6 +51,24 @@ export const e2ePreset = (testDir: string): PlaywrightTestConfig => {
|
|
|
50
51
|
const testResultOuputDir = join(workspaceRoot, 'test-results/playwright/output', packageDirName);
|
|
51
52
|
const reporterOutputFile = join(workspaceRoot, 'test-results/playwright/report', `${packageDirName}.json`);
|
|
52
53
|
|
|
54
|
+
const browser = process.env.PLAYWRIGHT_BROWSER || (process.env.CI ? 'all' : 'chromium');
|
|
55
|
+
const projects = [
|
|
56
|
+
{
|
|
57
|
+
name: 'chromium',
|
|
58
|
+
use: { ...devices['Desktop Chrome'] },
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'firefox',
|
|
62
|
+
use: { ...devices['Desktop Firefox'] },
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'webkit',
|
|
66
|
+
use: { ...devices['Desktop Safari'] },
|
|
67
|
+
},
|
|
68
|
+
].filter((project) => {
|
|
69
|
+
return browser === 'all' || project.name === browser;
|
|
70
|
+
});
|
|
71
|
+
|
|
53
72
|
return {
|
|
54
73
|
testDir,
|
|
55
74
|
outputDir: testResultOuputDir,
|
|
@@ -76,6 +95,7 @@ export const e2ePreset = (testDir: string): PlaywrightTestConfig => {
|
|
|
76
95
|
use: {
|
|
77
96
|
trace: 'retain-on-failure',
|
|
78
97
|
},
|
|
98
|
+
projects,
|
|
79
99
|
};
|
|
80
100
|
};
|
|
81
101
|
|