@empiricalrun/playwright-utils 0.62.0 → 0.63.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/CHANGELOG.md +25 -0
- package/dist/api-worker-client.d.ts +0 -13
- package/dist/api-worker-client.d.ts.map +1 -1
- package/dist/api-worker-client.js +0 -15
- package/dist/auth/google.d.ts.map +1 -1
- package/dist/auth/google.js +0 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +0 -9
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +0 -8
- package/dist/generated/api-worker-openapi.d.ts +2773 -1298
- package/dist/generated/api-worker-openapi.d.ts.map +1 -1
- package/dist/overlay-tests/cache.spec.js +0 -10
- package/dist/overlay-tests/click.spec.js +0 -18
- package/dist/playwright-extensions.d.ts.map +1 -1
- package/dist/playwright-extensions.js +0 -1
- package/dist/reporter/attachment-cleanup-test-reporter.d.ts +0 -6
- package/dist/reporter/attachment-cleanup-test-reporter.d.ts.map +1 -1
- package/dist/reporter/attachment-cleanup-test-reporter.js +0 -6
- package/dist/reporter/attachment-cleanup.d.ts +0 -33
- package/dist/reporter/attachment-cleanup.d.ts.map +1 -1
- package/dist/reporter/attachment-cleanup.js +2 -51
- package/dist/reporter/empirical-reporter.d.ts.map +1 -1
- package/dist/reporter/empirical-reporter.js +0 -9
- package/dist/reporter/harness.d.ts +0 -62
- package/dist/reporter/harness.d.ts.map +1 -1
- package/dist/reporter/harness.js +1 -53
- package/dist/reporter/ibr-utils.d.ts +0 -5
- package/dist/reporter/ibr-utils.d.ts.map +1 -1
- package/dist/reporter/ibr-utils.js +0 -5
- package/dist/reporter/incremental-blob-reporter.d.ts +0 -17
- package/dist/reporter/incremental-blob-reporter.d.ts.map +1 -1
- package/dist/reporter/incremental-blob-reporter.js +5 -35
- package/dist/reporter/lifecycle-events.d.ts.map +1 -1
- package/dist/reporter/lifecycle-events.js +0 -9
- package/dist/reporter/parity-utils.d.ts +0 -30
- package/dist/reporter/parity-utils.d.ts.map +1 -1
- package/dist/reporter/parity-utils.js +4 -28
- package/dist/reporter/reporter-state.d.ts +0 -12
- package/dist/reporter/reporter-state.d.ts.map +1 -1
- package/dist/reporter/reporter-state.js +0 -12
- package/dist/reporter/test-case-sync.d.ts.map +1 -1
- package/dist/reporter/test-case-sync.js +0 -12
- package/dist/reporter/uploader.d.ts.map +1 -1
- package/dist/reporter/uploader.js +0 -6
- package/dist/reporter/util.d.ts +0 -33
- package/dist/reporter/util.d.ts.map +1 -1
- package/dist/reporter/util.js +0 -37
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +1 -10
- package/dist/test/coverage.d.ts.map +1 -1
- package/dist/test/coverage.js +1 -3
- package/dist/test/expect/visual.d.ts.map +1 -1
- package/dist/test/expect/visual.js +1 -9
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js +4 -21
- package/dist/test/scripts/agent-capabilities.js +2 -2
- package/dist/test/scripts/index.d.ts +2 -2
- package/dist/test/scripts/index.d.ts.map +1 -1
- package/dist/test/scripts/index.js +3 -16
- package/dist/test/scripts/pw-locator-patch/actions/click.d.ts.map +1 -0
- package/dist/test/scripts/pw-locator-patch/{highlight → actions}/click.js +0 -6
- package/dist/test/scripts/pw-locator-patch/actions/hover.d.ts.map +1 -0
- package/dist/test/scripts/pw-locator-patch/{highlight → actions}/hover.js +0 -3
- package/dist/test/scripts/pw-locator-patch/dismiss-overlays/cache.d.ts.map +1 -1
- package/dist/test/scripts/pw-locator-patch/dismiss-overlays/cache.js +0 -7
- package/dist/test/scripts/pw-locator-patch/dismiss-overlays/index.d.ts.map +1 -1
- package/dist/test/scripts/pw-locator-patch/dismiss-overlays/index.js +1 -9
- package/dist/test/scripts/pw-locator-patch/dismiss-overlays/prompt.d.ts.map +1 -1
- package/dist/test/scripts/pw-locator-patch/dismiss-overlays/prompt.js +0 -1
- package/dist/test/scripts/pw-locator-patch/dismiss-overlays/utils.d.ts.map +1 -1
- package/dist/test/scripts/pw-locator-patch/dismiss-overlays/utils.js +2 -5
- package/dist/test/scripts/pw-locator-patch/utils/index.d.ts +0 -1
- package/dist/test/scripts/pw-locator-patch/utils/index.d.ts.map +1 -1
- package/dist/test/scripts/pw-locator-patch/utils/index.js +0 -18
- package/dist/test/types.d.ts +2 -5
- package/dist/test/types.d.ts.map +1 -1
- package/dist/test/video-labels.d.ts.map +1 -1
- package/dist/test/video-labels.js +0 -1
- package/dist/webhook.d.ts.map +1 -1
- package/dist/webhook.js +0 -3
- package/docs/fixtures.md +4 -5
- package/package.json +6 -6
- package/playwright.config.ts +0 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/upstream-oracle/ibr-adapter.js +0 -23
- package/upstream-oracle/run.mjs +1 -69
- package/dist/test/scripts/locator-highlights.d.ts +0 -4
- package/dist/test/scripts/locator-highlights.d.ts.map +0 -1
- package/dist/test/scripts/locator-highlights.js +0 -28
- package/dist/test/scripts/pw-locator-patch/highlight/click.d.ts.map +0 -1
- package/dist/test/scripts/pw-locator-patch/highlight/expect.d.ts +0 -5
- package/dist/test/scripts/pw-locator-patch/highlight/expect.d.ts.map +0 -1
- package/dist/test/scripts/pw-locator-patch/highlight/expect.js +0 -23
- package/dist/test/scripts/pw-locator-patch/highlight/hover.d.ts.map +0 -1
- package/dist/test/scripts/pw-locator-patch/highlight/inner-text.d.ts +0 -6
- package/dist/test/scripts/pw-locator-patch/highlight/inner-text.d.ts.map +0 -1
- package/dist/test/scripts/pw-locator-patch/highlight/inner-text.js +0 -30
- package/dist/test/scripts/pw-locator-patch/highlight/input-value.d.ts +0 -6
- package/dist/test/scripts/pw-locator-patch/highlight/input-value.d.ts.map +0 -1
- package/dist/test/scripts/pw-locator-patch/highlight/input-value.js +0 -30
- package/dist/test/scripts/pw-locator-patch/highlight/is-checked.d.ts +0 -6
- package/dist/test/scripts/pw-locator-patch/highlight/is-checked.d.ts.map +0 -1
- package/dist/test/scripts/pw-locator-patch/highlight/is-checked.js +0 -30
- package/dist/test/scripts/pw-locator-patch/highlight/is-disabled.d.ts +0 -6
- package/dist/test/scripts/pw-locator-patch/highlight/is-disabled.d.ts.map +0 -1
- package/dist/test/scripts/pw-locator-patch/highlight/is-disabled.js +0 -30
- package/dist/test/scripts/pw-locator-patch/highlight/is-editable.d.ts +0 -6
- package/dist/test/scripts/pw-locator-patch/highlight/is-editable.d.ts.map +0 -1
- package/dist/test/scripts/pw-locator-patch/highlight/is-editable.js +0 -29
- package/dist/test/scripts/pw-locator-patch/highlight/text-content.d.ts +0 -6
- package/dist/test/scripts/pw-locator-patch/highlight/text-content.d.ts.map +0 -1
- package/dist/test/scripts/pw-locator-patch/highlight/text-content.js +0 -30
- /package/dist/test/scripts/pw-locator-patch/{highlight → actions}/click.d.ts +0 -0
- /package/dist/test/scripts/pw-locator-patch/{highlight → actions}/hover.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @empiricalrun/playwright-utils
|
|
2
2
|
|
|
3
|
+
## 0.63.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a4796b0: feat!: always show video action annotations; remove locator highlight patches and the mousePointerHighlighter and locatorHighlighter options
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 7c30d84: chore: remove comments across packages
|
|
12
|
+
- Updated dependencies [7c30d84]
|
|
13
|
+
- @empiricalrun/cua@0.5.2
|
|
14
|
+
- @empiricalrun/llm@0.28.2
|
|
15
|
+
- @empiricalrun/r2-uploader@0.11.3
|
|
16
|
+
- @empiricalrun/reporter@0.30.3
|
|
17
|
+
|
|
18
|
+
## 0.62.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [b260289]
|
|
23
|
+
- @empiricalrun/r2-uploader@0.11.2
|
|
24
|
+
- @empiricalrun/cua@0.5.1
|
|
25
|
+
- @empiricalrun/llm@0.28.1
|
|
26
|
+
- @empiricalrun/reporter@0.30.2
|
|
27
|
+
|
|
3
28
|
## 0.62.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
|
@@ -11,19 +11,6 @@ export type ProjectKvSetRequest = NonNullable<paths["/api/projects/kv"]["post"][
|
|
|
11
11
|
export type ProjectKvSetResponse = components["schemas"]["ProjectKvSetResponse"];
|
|
12
12
|
export type TelemetryTrackRequest = components["schemas"]["TelemetryTrackRequest"];
|
|
13
13
|
export type TestCaseRunEndEventRequest = NonNullable<paths["/api/test-runs/events"]["put"]["requestBody"]>["content"]["application/json"];
|
|
14
|
-
/**
|
|
15
|
-
* OpenAI client config for the LLM calls playwright-utils makes from inside a
|
|
16
|
-
* test run — the overlay-dismissal browser agent and the toLookRight visual
|
|
17
|
-
* assertion. Both go through api-worker's proxy, which holds the provider key
|
|
18
|
-
* and forwards via the Cloudflare AI Gateway; the run worker puts
|
|
19
|
-
* EMPIRICALRUN_API_KEY and DASHBOARD_DOMAIN in the Playwright child process.
|
|
20
|
-
*
|
|
21
|
-
* There is deliberately no fallback to a direct OPENAI_API_KEY. A fallback
|
|
22
|
-
* makes the transport depend on ambient env, which hides a broken proxy behind
|
|
23
|
-
* a working direct call and lets a test that clears one credential still reach
|
|
24
|
-
* the model. Returns undefined only for a pi sandbox, whose OPENAI_BASE_URL
|
|
25
|
-
* already points at the sidecar's own keyless proxy route.
|
|
26
|
-
*/
|
|
27
14
|
export declare function llmProxyOpenAIConfig(): {
|
|
28
15
|
baseURL: string;
|
|
29
16
|
apiKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-worker-client.d.ts","sourceRoot":"","sources":["../src/api-worker-client.ts"],"names":[],"mappings":"AACA,OAAqB,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAExE,KAAK,mBAAmB,GAAG,MAAM,CAAC,KAAK,CAAC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AG1C;CACF;AAED,qBAAa,qBAAsB,SAAQ,SAAS;CAAG;AACvD,qBAAa,kBAAmB,SAAQ,SAAS;CAAG;AASpD,wBAAsB,cAAc,CAClC,KAAK,EAAE,WAAW,GAAG,GAAG,EACxB,IAAI,CAAC,EAAE,WAAW,qBAoCnB;AAgBD,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAS;IACxB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IAErC,YAAY,EACV,aAAa,EACb,OAAO,GACR,GAAE;QACD,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,CAAC;KACb,EAgBL;IAED,UAAU,IAAI,MAAM,CAEnB;IAEK,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAK7D;IAEK,YAAY,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAK3E;IAEK,iBAAiB,CACrB,IAAI,EAAE,iBAAiB,EACvB,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,qBAAqB,CAAC,CAKhC;IAEK,sBAAsB,CAC1B,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,IAAI,CAAC,CAGf;IAED,MAAM,CAAC,CAAC,EACN,MAAM,EAAE;QACN,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,QAAQ,EAAE,QAAQ,CAAC;KACpB,EACD,KAAK,EAAE,MAAM,GACZ,CAAC,CAUH;CACF"}
|
|
@@ -12,19 +12,6 @@ const DEFAULT_API_WORKER_URL = "https://api.empirical.run";
|
|
|
12
12
|
function apiWorkerBaseUrl() {
|
|
13
13
|
return process.env.DASHBOARD_DOMAIN || DEFAULT_API_WORKER_URL;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* OpenAI client config for the LLM calls playwright-utils makes from inside a
|
|
17
|
-
* test run — the overlay-dismissal browser agent and the toLookRight visual
|
|
18
|
-
* assertion. Both go through api-worker's proxy, which holds the provider key
|
|
19
|
-
* and forwards via the Cloudflare AI Gateway; the run worker puts
|
|
20
|
-
* EMPIRICALRUN_API_KEY and DASHBOARD_DOMAIN in the Playwright child process.
|
|
21
|
-
*
|
|
22
|
-
* There is deliberately no fallback to a direct OPENAI_API_KEY. A fallback
|
|
23
|
-
* makes the transport depend on ambient env, which hides a broken proxy behind
|
|
24
|
-
* a working direct call and lets a test that clears one credential still reach
|
|
25
|
-
* the model. Returns undefined only for a pi sandbox, whose OPENAI_BASE_URL
|
|
26
|
-
* already points at the sidecar's own keyless proxy route.
|
|
27
|
-
*/
|
|
28
15
|
function llmProxyOpenAIConfig() {
|
|
29
16
|
if (process.env.OPENAI_BASE_URL) {
|
|
30
17
|
return undefined;
|
|
@@ -82,8 +69,6 @@ async function fetchWithRetry(input, init) {
|
|
|
82
69
|
factor: 2,
|
|
83
70
|
minTimeout: 1_000,
|
|
84
71
|
maxTimeout: 5_000,
|
|
85
|
-
// Only the last attempt's error reaches callers; log the earlier ones
|
|
86
|
-
// (with the undici cause code) so the original failure is not lost.
|
|
87
72
|
onRetry: (error, attempt) => {
|
|
88
73
|
const { method, url } = describeRequest(input, init);
|
|
89
74
|
const cause = error?.cause?.code;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../src/auth/google.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAsB,aAAa,CACjC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../src/auth/google.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAsB,aAAa,CACjC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,iBAAiB,iBAwB/B"}
|
package/dist/auth/google.js
CHANGED
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.loginToGoogle = loginToGoogle;
|
|
7
7
|
const authenticator_1 = __importDefault(require("authenticator"));
|
|
8
8
|
async function loginToGoogle(page, credentials) {
|
|
9
|
-
// We are on the Google login page
|
|
10
9
|
const { email, password, authKey } = credentials;
|
|
11
10
|
await page.waitForTimeout(5_000);
|
|
12
11
|
await page.getByLabel("Email or phone").click();
|
package/dist/auth/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI5D,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtC,KAAK,OAAO,GAAG,SAAS,GAAG,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI5D,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtC,KAAK,OAAO,GAAG,SAAS,GAAG,kBAAkB,CAAC;AAW9C,KAAK,WAAW,GAAG;IACjB,IAAI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AAO,EAAE,cAAc,EACvB,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,iBAiB1B;CACF"}
|
package/dist/auth/index.js
CHANGED
|
@@ -30,8 +30,6 @@ class AuthStore {
|
|
|
30
30
|
shouldDoLogin = true;
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
// Load cached auth state into this.page's context so the check
|
|
34
|
-
// and any subsequent caller code all operate on the same page.
|
|
35
33
|
await this.loadAuthStateIntoPage(this.page, storagePath);
|
|
36
34
|
try {
|
|
37
35
|
const methodResult = await this.checkLoggedInFunc(this.page, this.userContext);
|
|
@@ -81,8 +79,6 @@ class AuthStore {
|
|
|
81
79
|
await page.context().addCookies(authState.cookies);
|
|
82
80
|
}
|
|
83
81
|
if (authState.origins?.length) {
|
|
84
|
-
// Use a temporary page to set localStorage without navigating
|
|
85
|
-
// the caller's page away from its current URL
|
|
86
82
|
const tmp = await page.context().newPage();
|
|
87
83
|
try {
|
|
88
84
|
for (const origin of authState.origins) {
|
|
@@ -111,11 +107,9 @@ class AuthStore {
|
|
|
111
107
|
}
|
|
112
108
|
async saveAuthState(storagePath) {
|
|
113
109
|
if (this.appType === "web-app") {
|
|
114
|
-
// Use playwright API to export state to a file
|
|
115
110
|
await this.page.context().storageState({ path: storagePath });
|
|
116
111
|
}
|
|
117
112
|
else if (this.appType === "chrome-extension") {
|
|
118
|
-
// Fetch and store state from chrome.storage.local
|
|
119
113
|
const context = this.page.context();
|
|
120
114
|
let [background] = context.serviceWorkers();
|
|
121
115
|
if (!background) {
|
|
@@ -123,7 +117,6 @@ class AuthStore {
|
|
|
123
117
|
}
|
|
124
118
|
const storageData = await background.evaluate(() => {
|
|
125
119
|
return new Promise((resolve) => {
|
|
126
|
-
// @ts-ignore
|
|
127
120
|
chrome.storage.local.get((items) => {
|
|
128
121
|
resolve(JSON.stringify(items));
|
|
129
122
|
});
|
|
@@ -136,7 +129,6 @@ class AuthStore {
|
|
|
136
129
|
fs_1.default.writeFileSync(storagePath, storageData);
|
|
137
130
|
}
|
|
138
131
|
}
|
|
139
|
-
// TODO: make this async
|
|
140
132
|
static location(userContext) {
|
|
141
133
|
return `auth/${userContext.key}.json`;
|
|
142
134
|
}
|
|
@@ -149,7 +141,6 @@ class AuthStore {
|
|
|
149
141
|
const contents = JSON.parse(fs_1.default.readFileSync(storagePath, { encoding: "utf-8" }));
|
|
150
142
|
await background.evaluate((contents) => {
|
|
151
143
|
return new Promise((resolve) => {
|
|
152
|
-
// @ts-ignore
|
|
153
144
|
chrome.storage.local.set(contents, () => {
|
|
154
145
|
resolve("done");
|
|
155
146
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAgBzD,wBAAgB,gBAAgB,IAAI,MAAM,CAazC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAgBzD,wBAAgB,gBAAgB,IAAI,MAAM,CAazC;AAyBD,eAAO,MAAM,UAAU,EAAE,oBA2BxB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,iBAarB,CAAC"}
|
package/dist/config/index.js
CHANGED
|
@@ -41,10 +41,6 @@ function getReporters() {
|
|
|
41
41
|
}
|
|
42
42
|
const middle = process.env.HAS_SHARDING
|
|
43
43
|
? [
|
|
44
|
-
// The incremental reporter's clean-finish upload (with its completeness
|
|
45
|
-
// marker) is the merge input. It also salvages interrupted runs because
|
|
46
|
-
// it streams events to disk instead of writing the report only on end.
|
|
47
|
-
// It is useful where a merge step exists, so it is gated on sharding.
|
|
48
44
|
[
|
|
49
45
|
"./node_modules/@empiricalrun/playwright-utils/dist/reporter/incremental-blob-reporter.js",
|
|
50
46
|
],
|
|
@@ -63,13 +59,11 @@ function getReporters() {
|
|
|
63
59
|
}
|
|
64
60
|
exports.baseConfig = {
|
|
65
61
|
testDir: "./tests",
|
|
66
|
-
// outputDir is where we store playwright artifacts (during and post test run)
|
|
67
62
|
outputDir: "./test-results",
|
|
68
63
|
reporter: getReporters(),
|
|
69
64
|
fullyParallel: true,
|
|
70
65
|
forbidOnly: false,
|
|
71
66
|
retries: process.env.CI ? 2 : 0,
|
|
72
|
-
// Let playwright choose max workers based on size of infra
|
|
73
67
|
workers: undefined,
|
|
74
68
|
// Since Playwright 1.48, a test counts toward maxFailures only after all its
|
|
75
69
|
// retries are exhausted, so this is 30 definitively-failed tests (see
|
|
@@ -88,8 +82,6 @@ exports.baseConfig = {
|
|
|
88
82
|
navigationTimeout: 30_000,
|
|
89
83
|
screenshot: "on",
|
|
90
84
|
trace: "on",
|
|
91
|
-
// Video recording is handled by the context fixture override
|
|
92
|
-
// so that we can use video labels
|
|
93
85
|
video: "off",
|
|
94
86
|
},
|
|
95
87
|
};
|