@empiricalrun/playwright-utils 0.28.2 → 0.28.3
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 +71 -0
- package/dist/auth/index.js +1 -3
- package/dist/config/index.js +1 -1
- package/dist/overlay-tests/fixtures.d.ts.map +1 -1
- package/dist/overlay-tests/fixtures.js +0 -1
- package/dist/reporter/base.d.ts.map +1 -1
- package/dist/reporter/base.js +1 -3
- package/dist/reporter/custom.js +4 -4
- package/dist/test/expect.d.ts.map +1 -1
- package/dist/test/expect.js +4 -0
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js +0 -1
- package/dist/test/scripts/pw-locator-patch/dismiss-overlays/cache.js +3 -3
- package/dist/test/scripts/pw-locator-patch/dismiss-overlays/index.js +1 -1
- package/dist/test/scripts/pw-locator-patch/utils/index.js +3 -3
- package/eslint.config.mjs +23 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,76 @@
|
|
|
1
1
|
# @empiricalrun/playwright-utils
|
|
2
2
|
|
|
3
|
+
## 0.28.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [de7be1a]
|
|
8
|
+
- Updated dependencies [1600c5d]
|
|
9
|
+
- Updated dependencies [5fc3b85]
|
|
10
|
+
- Updated dependencies [01b693e]
|
|
11
|
+
- Updated dependencies [cb503a6]
|
|
12
|
+
- Updated dependencies [29eb6fb]
|
|
13
|
+
- Updated dependencies [63a7b56]
|
|
14
|
+
- Updated dependencies [8956b5c]
|
|
15
|
+
- Updated dependencies [7c4057e]
|
|
16
|
+
- Updated dependencies [a6e6141]
|
|
17
|
+
- Updated dependencies [17fa058]
|
|
18
|
+
- Updated dependencies [b52ec03]
|
|
19
|
+
- Updated dependencies [63271bd]
|
|
20
|
+
- Updated dependencies [af74c99]
|
|
21
|
+
- Updated dependencies [3613b5f]
|
|
22
|
+
- Updated dependencies [9f33a7a]
|
|
23
|
+
- Updated dependencies [04940d6]
|
|
24
|
+
- Updated dependencies [028d845]
|
|
25
|
+
- Updated dependencies [01b693e]
|
|
26
|
+
- Updated dependencies [c0c97cf]
|
|
27
|
+
- Updated dependencies [a03391a]
|
|
28
|
+
- Updated dependencies [035febd]
|
|
29
|
+
- Updated dependencies [7fecf0a]
|
|
30
|
+
- Updated dependencies [b404912]
|
|
31
|
+
- Updated dependencies [4f598eb]
|
|
32
|
+
- Updated dependencies [1d90369]
|
|
33
|
+
- Updated dependencies [4c8249a]
|
|
34
|
+
- Updated dependencies [4b45e85]
|
|
35
|
+
- Updated dependencies [cbaf687]
|
|
36
|
+
- Updated dependencies [ad91c42]
|
|
37
|
+
- Updated dependencies [5a8af12]
|
|
38
|
+
- Updated dependencies [ce54ca8]
|
|
39
|
+
- Updated dependencies [68ce1d1]
|
|
40
|
+
- Updated dependencies [2de74d0]
|
|
41
|
+
- Updated dependencies [41816c3]
|
|
42
|
+
- Updated dependencies [5651643]
|
|
43
|
+
- Updated dependencies [3d738f4]
|
|
44
|
+
- Updated dependencies [de01455]
|
|
45
|
+
- Updated dependencies [40ef060]
|
|
46
|
+
- Updated dependencies [5da0a60]
|
|
47
|
+
- Updated dependencies [6d80d21]
|
|
48
|
+
- Updated dependencies [565a820]
|
|
49
|
+
- Updated dependencies [fdc2ee8]
|
|
50
|
+
- Updated dependencies [681aebb]
|
|
51
|
+
- Updated dependencies [612e383]
|
|
52
|
+
- Updated dependencies [773d1f8]
|
|
53
|
+
- Updated dependencies [fe95cd7]
|
|
54
|
+
- Updated dependencies [6585338]
|
|
55
|
+
- Updated dependencies [4b898bd]
|
|
56
|
+
- Updated dependencies [c0931db]
|
|
57
|
+
- Updated dependencies [89858b4]
|
|
58
|
+
- Updated dependencies [2718944]
|
|
59
|
+
- Updated dependencies [f83a0b0]
|
|
60
|
+
- Updated dependencies [aa14384]
|
|
61
|
+
- Updated dependencies [7b3c12b]
|
|
62
|
+
- Updated dependencies [c112011]
|
|
63
|
+
- Updated dependencies [50c05ff]
|
|
64
|
+
- Updated dependencies [91d856c]
|
|
65
|
+
- Updated dependencies [9635632]
|
|
66
|
+
- Updated dependencies [98853ca]
|
|
67
|
+
- Updated dependencies [5c91897]
|
|
68
|
+
- Updated dependencies [8eeb121]
|
|
69
|
+
- Updated dependencies [ac01228]
|
|
70
|
+
- @empiricalrun/test-gen@0.74.0
|
|
71
|
+
- @empiricalrun/llm@0.21.0
|
|
72
|
+
- @empiricalrun/r2-uploader@0.3.10
|
|
73
|
+
|
|
3
74
|
## 0.28.2
|
|
4
75
|
|
|
5
76
|
### Patch Changes
|
package/dist/auth/index.js
CHANGED
|
@@ -43,7 +43,7 @@ class AuthStore {
|
|
|
43
43
|
}
|
|
44
44
|
shouldDoLogin = !methodResult;
|
|
45
45
|
}
|
|
46
|
-
catch
|
|
46
|
+
catch {
|
|
47
47
|
shouldDoLogin = true;
|
|
48
48
|
await page.close();
|
|
49
49
|
}
|
|
@@ -112,7 +112,6 @@ class AuthStore {
|
|
|
112
112
|
const storageData = await background.evaluate(() => {
|
|
113
113
|
return new Promise((resolve) => {
|
|
114
114
|
// @ts-ignore
|
|
115
|
-
// eslint-disable-next-line no-undef
|
|
116
115
|
chrome.storage.local.get((items) => {
|
|
117
116
|
resolve(JSON.stringify(items));
|
|
118
117
|
});
|
|
@@ -139,7 +138,6 @@ class AuthStore {
|
|
|
139
138
|
await background.evaluate((contents) => {
|
|
140
139
|
return new Promise((resolve) => {
|
|
141
140
|
// @ts-ignore
|
|
142
|
-
// eslint-disable-next-line no-undef
|
|
143
141
|
chrome.storage.local.set(contents, () => {
|
|
144
142
|
resolve("done");
|
|
145
143
|
});
|
package/dist/config/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/overlay-tests/fixtures.ts"],"names":[],"mappings":"AAKA,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,MAAM,uCAAc,CAAC;AAClC,eAAO,MAAM,IAAI;YAA6B,aAAa;
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/overlay-tests/fixtures.ts"],"names":[],"mappings":"AAKA,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,MAAM,uCAAc,CAAC;AAClC,eAAO,MAAM,IAAI;YAA6B,aAAa;EAuBzD,CAAC"}
|
|
@@ -11,7 +11,6 @@ const serve_handler_1 = __importDefault(require("serve-handler"));
|
|
|
11
11
|
exports.expect = test_1.test.expect;
|
|
12
12
|
exports.test = test_1.test.extend({
|
|
13
13
|
server: [
|
|
14
|
-
// eslint-disable-next-line no-empty-pattern
|
|
15
14
|
async ({}, use, workerInfo) => {
|
|
16
15
|
const port = 1234 + workerInfo.workerIndex;
|
|
17
16
|
const server = http_1.default.createServer((request, response) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/reporter/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,UAAU,EACV,QAAQ,EACT,MAAM,2BAA2B,CAAC;AAQnC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,aAAa,eAAmB,CAAC;AAE9C,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC;AAEF,eAAO,MAAQ,KAAK,WAAE,QAAQ,UAA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C,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,UAAU,EAClB,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,OAAO,GACrB,YAAY,EAAE,CAyBhB;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,UAMpD;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,OAAO,GACrB,YAAY,CA+Bd;AAED,wBAAgB,SAAS,CAAC,IAAI,GAAE,MAAW,GAAG,MAAM,CAInD;AAMD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAmBA;AAMD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD"}
|
package/dist/reporter/base.js
CHANGED
|
@@ -168,9 +168,7 @@ function prepareErrorStack(stack) {
|
|
|
168
168
|
}
|
|
169
169
|
return { message, stackLines, location };
|
|
170
170
|
}
|
|
171
|
-
const ansiRegex = new RegExp(
|
|
172
|
-
// eslint-disable-next-line no-control-regex
|
|
173
|
-
"([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))", "g");
|
|
171
|
+
const ansiRegex = new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))", "g");
|
|
174
172
|
function stripAnsiEscapes(str) {
|
|
175
173
|
return str.replace(ansiRegex, "");
|
|
176
174
|
}
|
package/dist/reporter/custom.js
CHANGED
|
@@ -364,7 +364,7 @@ async function showHTMLReport(reportFolder, host = "localhost", port, testId) {
|
|
|
364
364
|
try {
|
|
365
365
|
(0, utils_1.assert)(fs_1.default.statSync(folder).isDirectory());
|
|
366
366
|
}
|
|
367
|
-
catch
|
|
367
|
+
catch {
|
|
368
368
|
console.log(base_1.colors.red(`No report found at "${folder}"`));
|
|
369
369
|
(0, utils_1.gracefullyProcessExitDoNotHang)(1);
|
|
370
370
|
return;
|
|
@@ -389,7 +389,7 @@ function startHtmlReportServer(folder) {
|
|
|
389
389
|
try {
|
|
390
390
|
return server.serveFile(request, response, url.searchParams.get("path"));
|
|
391
391
|
}
|
|
392
|
-
catch
|
|
392
|
+
catch {
|
|
393
393
|
return false;
|
|
394
394
|
}
|
|
395
395
|
}
|
|
@@ -636,7 +636,7 @@ class HtmlBuilder {
|
|
|
636
636
|
body,
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
|
-
catch
|
|
639
|
+
catch {
|
|
640
640
|
// Invalid encoding, fall through and save to file.
|
|
641
641
|
}
|
|
642
642
|
}
|
|
@@ -797,7 +797,7 @@ function createSnippets(stepsInFile) {
|
|
|
797
797
|
try {
|
|
798
798
|
source = fs_1.default.readFileSync(file, "utf-8") + "\n//";
|
|
799
799
|
}
|
|
800
|
-
catch
|
|
800
|
+
catch {
|
|
801
801
|
continue;
|
|
802
802
|
}
|
|
803
803
|
const lines = source.split("\n").length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expect.d.ts","sourceRoot":"","sources":["../../src/test/expect.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAO7C,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AA0BF,wBAAsB,WAAW,CAC/B,IAAI,EAAE,IAAI,EACV,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"expect.d.ts","sourceRoot":"","sources":["../../src/test/expect.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAO7C,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AA0BF,wBAAsB,WAAW,CAC/B,IAAI,EAAE,IAAI,EACV,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,mBAAmB,CAAC,CAkF9B"}
|
package/dist/test/expect.js
CHANGED
|
@@ -93,6 +93,10 @@ go through the reasons and pick the one that made you choose Fail`,
|
|
|
93
93
|
],
|
|
94
94
|
});
|
|
95
95
|
const rawResponse = response.tool_calls[0];
|
|
96
|
+
if (!("function" in rawResponse)) {
|
|
97
|
+
throw new Error("Expected a function tool call in the response, but got: " +
|
|
98
|
+
JSON.stringify(rawResponse));
|
|
99
|
+
}
|
|
96
100
|
const result = JSON.parse(rawResponse.function.arguments);
|
|
97
101
|
return {
|
|
98
102
|
message: () => result.most_critical_reason,
|
package/dist/test/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,MAAM,EACN,IAAI,EACJ,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,CAAC,MAAM,CAAC;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ACzB,OAAO,CAAC,EAAE,qBAAqB,KAC5B,OAAO,CAAC;QAAE,OAAO,EAAE,cAAc,CAAC;QAAC,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;IACtD,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAUF,QAAA,MAAM,eAAe,GACnB,QAAQ,QAAQ,CACd,kBAAkB,GAAG,qBAAqB,EAC1C,oBAAoB,GAAG,uBAAuB,CAC/C,EACD,UAAS,eAAgC,uHAuD1C,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,6BAA6B,EAAE,CAAC"}
|
package/dist/test/index.js
CHANGED
|
@@ -51,7 +51,6 @@ const baseTestFixture = function (testFn, options = defaultOptions) {
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
saveVideos: [
|
|
54
|
-
// eslint-disable-next-line no-empty-pattern
|
|
55
54
|
async ({}, use, testInfo) => {
|
|
56
55
|
await use();
|
|
57
56
|
const pathToTestVideos = path_1.default.join(testInfo.project.outputDir, "videos-store", testInfo.testId);
|
|
@@ -38,7 +38,7 @@ async function setCodeToCache({ dom, text, code, }) {
|
|
|
38
38
|
cache = JSON.parse(fs_1.default.readFileSync(exports.CACHE_FILE, "utf8"));
|
|
39
39
|
cache.data.push(obj);
|
|
40
40
|
}
|
|
41
|
-
catch
|
|
41
|
+
catch {
|
|
42
42
|
cache = {
|
|
43
43
|
version: "2025-03-06",
|
|
44
44
|
data: [obj],
|
|
@@ -73,12 +73,12 @@ async function executeFromCache({ page, dom, text, }) {
|
|
|
73
73
|
await exec(page);
|
|
74
74
|
return { success: true };
|
|
75
75
|
}
|
|
76
|
-
catch
|
|
76
|
+
catch {
|
|
77
77
|
console.log(`Failed in "${match.code}" for element: ${dom}`);
|
|
78
78
|
return { success: false };
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
catch
|
|
81
|
+
catch {
|
|
82
82
|
return { success: false };
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -22,7 +22,7 @@ function description(locator) {
|
|
|
22
22
|
}
|
|
23
23
|
return cleanedDescription;
|
|
24
24
|
}
|
|
25
|
-
catch
|
|
25
|
+
catch {
|
|
26
26
|
return fallbackDescription;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -43,7 +43,7 @@ async function scrollAndHighlight(locator) {
|
|
|
43
43
|
}, 2000);
|
|
44
44
|
}, undefined, { timeout: constants_1.DEFAULT_SCRIPT_EXECUTION_TIMEOUT });
|
|
45
45
|
}
|
|
46
|
-
catch
|
|
46
|
+
catch {
|
|
47
47
|
logger_1.logger.debug("Failed to scroll and highlight for locator method");
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -58,7 +58,7 @@ async function highlight(locator) {
|
|
|
58
58
|
}, 2000);
|
|
59
59
|
}, undefined, { timeout: constants_1.DEFAULT_SCRIPT_EXECUTION_TIMEOUT });
|
|
60
60
|
}
|
|
61
|
-
catch
|
|
61
|
+
catch {
|
|
62
62
|
logger_1.logger.debug("Failed to add highlight for locator method");
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import libraryConfig from "../eslint-config/library.mjs";
|
|
2
|
+
import tsParser from "@typescript-eslint/parser";
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
...libraryConfig,
|
|
6
|
+
{
|
|
7
|
+
ignores: ["src/reporter/third_party/**/*"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
files: ["src/**/*.ts", "src/**/*.tsx"],
|
|
11
|
+
languageOptions: {
|
|
12
|
+
parser: tsParser,
|
|
13
|
+
globals: {
|
|
14
|
+
node: true,
|
|
15
|
+
browser: true,
|
|
16
|
+
},
|
|
17
|
+
parserOptions: {
|
|
18
|
+
project: "./tsconfig.lint.json",
|
|
19
|
+
tsconfigRootDir: import.meta.dirname,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/playwright-utils",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@types/adm-zip": "^0.5.7",
|
|
33
33
|
"playwright-core": "1.53.2",
|
|
34
34
|
"serve-handler": "^6.1.6",
|
|
35
|
-
"@empiricalrun/shared-types": "0.
|
|
35
|
+
"@empiricalrun/shared-types": "0.9.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@babel/code-frame": "^7.24.7",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"mailosaur": "^8.6.1",
|
|
44
44
|
"puppeteer-extra-plugin-recaptcha": "^3.6.8",
|
|
45
45
|
"rimraf": "^6.0.1",
|
|
46
|
-
"@empiricalrun/llm": "^0.
|
|
47
|
-
"@empiricalrun/r2-uploader": "^0.3.
|
|
48
|
-
"@empiricalrun/test-gen": "^0.
|
|
46
|
+
"@empiricalrun/llm": "^0.21.0",
|
|
47
|
+
"@empiricalrun/r2-uploader": "^0.3.10",
|
|
48
|
+
"@empiricalrun/test-gen": "^0.74.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"dev": "tsc --build --watch",
|