@testmuai/playwright-bindings 0.1.20-beta.1 → 0.1.20
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../src/helpers/wait.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAMvC,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../src/helpers/wait.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAMvC,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAgBzF"}
|
package/dist/helpers/wait.js
CHANGED
|
@@ -9,13 +9,15 @@ export async function checkUntilCondition(page, condition) {
|
|
|
9
9
|
}
|
|
10
10
|
log.helper(`[check_until_condition] condition=${preview(condition, 80)}`);
|
|
11
11
|
const shot = (await takeScreenshot(page)).toString('base64');
|
|
12
|
-
const resp = await fetchWithAuth(`${config.current.aiApiHost}/api/v1/
|
|
12
|
+
const resp = await fetchWithAuth(`${config.current.aiApiHost}/api/v1/visibility/check`, {
|
|
13
13
|
method: 'POST', headers: { 'content-type': 'application/json' },
|
|
14
14
|
body: JSON.stringify({ screenshot_b64: shot, query: condition }),
|
|
15
15
|
});
|
|
16
16
|
if (!resp.ok)
|
|
17
17
|
return false;
|
|
18
18
|
const body = (await resp.json());
|
|
19
|
-
|
|
19
|
+
log.helper(`[check_until_condition] condition check: visible=${body.visible}, confidence=${body.confidence}`);
|
|
20
|
+
// Parity with the m-hps UntilBlock evaluator: missing "visible" defaults to condition-met.
|
|
21
|
+
return body.visible ?? true;
|
|
20
22
|
}
|
|
21
23
|
//# sourceMappingURL=wait.js.map
|
package/dist/helpers/wait.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wait.js","sourceRoot":"","sources":["../../src/helpers/wait.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,IAAU,EAAE,SAAiB;IACrE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAC1B,GAAG,CAAC,MAAM,CAAC,4EAA4E,CAAC,CAAC;QACzF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,GAAG,CAAC,MAAM,CAAC,qCAAqC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1E,MAAM,IAAI,GAAG,CAAC,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"wait.js","sourceRoot":"","sources":["../../src/helpers/wait.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,IAAU,EAAE,SAAi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