@empiricalrun/playwright-utils 0.19.35 → 0.19.37
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 +18 -0
- package/dist/config.d.ts +2 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/overlay-tests/click.spec.js +8 -2
- package/package.json +4 -4
- package/playwright.config.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @empiricalrun/playwright-utils
|
|
2
2
|
|
|
3
|
+
## 0.19.37
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 10e354f: fix: updated viewport for browser session
|
|
8
|
+
- Updated dependencies [2babfe0]
|
|
9
|
+
- @empiricalrun/llm@0.9.34
|
|
10
|
+
- @empiricalrun/test-gen@0.42.25
|
|
11
|
+
|
|
12
|
+
## 0.19.36
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 005632b: fix: restore z-index after annotations
|
|
17
|
+
- Updated dependencies [005632b]
|
|
18
|
+
- Updated dependencies [4f8e042]
|
|
19
|
+
- @empiricalrun/test-gen@0.42.24
|
|
20
|
+
|
|
3
21
|
## 0.19.35
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/config.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type PlaywrightTestConfig } from "@playwright/test";
|
|
1
|
+
import { devices as pwDevices, type PlaywrightTestConfig } from "@playwright/test";
|
|
2
2
|
export declare function chromeStablePath(): string;
|
|
3
3
|
export declare const baseConfig: PlaywrightTestConfig;
|
|
4
|
+
export declare const devices: typeof pwDevices;
|
|
4
5
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,SAAS,EACpB,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAC;AAa1B,wBAAgB,gBAAgB,IAAI,MAAM,CAazC;AAED,eAAO,MAAM,UAAU,EAAE,oBA6BxB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,OAAO,SAc5B,CAAC"}
|
package/dist/config.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.baseConfig = exports.chromeStablePath = void 0;
|
|
3
|
+
exports.devices = exports.baseConfig = exports.chromeStablePath = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
4
5
|
function getPlatformOS() {
|
|
5
6
|
const platform = process.platform;
|
|
6
7
|
if (platform === "win32") {
|
|
@@ -61,3 +62,15 @@ exports.baseConfig = {
|
|
|
61
62
|
},
|
|
62
63
|
timeout: 15 * 60 * 1000,
|
|
63
64
|
};
|
|
65
|
+
exports.devices = Object.entries(test_1.devices).reduce((acc, [name, device]) => ({
|
|
66
|
+
...acc,
|
|
67
|
+
[name]: {
|
|
68
|
+
...device,
|
|
69
|
+
viewport: name.includes("Desktop")
|
|
70
|
+
? {
|
|
71
|
+
width: 1366,
|
|
72
|
+
height: 768,
|
|
73
|
+
}
|
|
74
|
+
: device.viewport,
|
|
75
|
+
},
|
|
76
|
+
}), {});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./auth";
|
|
2
2
|
export { solveRecaptcha } from "./captcha";
|
|
3
|
-
export { baseConfig, chromeStablePath } from "./config";
|
|
3
|
+
export { baseConfig, chromeStablePath, devices } from "./config";
|
|
4
4
|
export * from "./email";
|
|
5
5
|
export * from "./playwright-extensions";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACjE,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,12 +14,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.chromeStablePath = exports.baseConfig = exports.solveRecaptcha = void 0;
|
|
17
|
+
exports.devices = exports.chromeStablePath = exports.baseConfig = exports.solveRecaptcha = void 0;
|
|
18
18
|
__exportStar(require("./auth"), exports);
|
|
19
19
|
var captcha_1 = require("./captcha");
|
|
20
20
|
Object.defineProperty(exports, "solveRecaptcha", { enumerable: true, get: function () { return captcha_1.solveRecaptcha; } });
|
|
21
21
|
var config_1 = require("./config");
|
|
22
22
|
Object.defineProperty(exports, "baseConfig", { enumerable: true, get: function () { return config_1.baseConfig; } });
|
|
23
23
|
Object.defineProperty(exports, "chromeStablePath", { enumerable: true, get: function () { return config_1.chromeStablePath; } });
|
|
24
|
+
Object.defineProperty(exports, "devices", { enumerable: true, get: function () { return config_1.devices; } });
|
|
24
25
|
__exportStar(require("./email"), exports);
|
|
25
26
|
__exportStar(require("./playwright-extensions"), exports);
|
|
@@ -34,9 +34,15 @@ test_1.test.beforeEach(async ({ page }) => {
|
|
|
34
34
|
await page.goto(`http://localhost:${PORT}/survey.html`);
|
|
35
35
|
// Assert that Survicate and button loads
|
|
36
36
|
await (0, test_1.expect)(page.getByText("Start survey")).toBeVisible();
|
|
37
|
-
|
|
37
|
+
const targetButton = page.getByRole("button", { name: "Target" });
|
|
38
|
+
await (0, test_1.expect)(targetButton).toBeVisible();
|
|
39
|
+
// Get initial z-index
|
|
40
|
+
const initialZIndex = await targetButton.evaluate((el) => window.getComputedStyle(el).getPropertyValue("z-index"));
|
|
38
41
|
// Do the click, which should pass
|
|
39
|
-
await
|
|
42
|
+
await targetButton.click();
|
|
43
|
+
// Assert z-index hasn't changed
|
|
44
|
+
const finalZIndex = await targetButton.evaluate((el) => window.getComputedStyle(el).getPropertyValue("z-index"));
|
|
45
|
+
(0, test_1.expect)(finalZIndex).toBe(initialZIndex);
|
|
40
46
|
});
|
|
41
47
|
(0, test_1.test)("should dismiss two-step overlay for click", async ({ page }) => {
|
|
42
48
|
await page.goto(`http://localhost:${PORT}/tos.html`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/playwright-utils",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.37",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"playwright-core": "1.47.1",
|
|
43
43
|
"puppeteer-extra-plugin-recaptcha": "^3.6.8",
|
|
44
44
|
"rimraf": "^6.0.1",
|
|
45
|
-
"@empiricalrun/llm": "^0.9.
|
|
46
|
-
"@empiricalrun/
|
|
47
|
-
"@empiricalrun/
|
|
45
|
+
"@empiricalrun/llm": "^0.9.34",
|
|
46
|
+
"@empiricalrun/test-gen": "^0.42.25",
|
|
47
|
+
"@empiricalrun/r2-uploader": "^0.3.8"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"dev": "tsc --build --watch",
|
package/playwright.config.ts
CHANGED
|
@@ -13,9 +13,9 @@ export default defineConfig({
|
|
|
13
13
|
// uses this to detect headless and not render in that scenario
|
|
14
14
|
userAgent:
|
|
15
15
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36",
|
|
16
|
-
actionTimeout:
|
|
16
|
+
actionTimeout: 5_000,
|
|
17
17
|
},
|
|
18
18
|
expect: {
|
|
19
|
-
timeout:
|
|
19
|
+
timeout: 5_000,
|
|
20
20
|
},
|
|
21
21
|
});
|