Files
html/api/ambre-pw-tests/tests/v31-smoke.spec.js
2026-04-22 02:25:01 +02:00

29 lines
938 B
JavaScript

const { test } = require("@playwright/test");
test("V31 · find EXACT regex syntax error", async ({ page }) => {
test.setTimeout(30000);
const errors = [];
page.on("pageerror", e => errors.push({t:"pe", m: e.message, s: (e.stack||"").substring(0,1000)}));
page.on("console", m => {
if (m.type() !== "log" && m.type() !== "debug") {
const l = m.location();
errors.push({ t: m.type(), text: m.text().substring(0,200), url: l.url, line: l.lineNumber, col: l.columnNumber });
}
});
await page.goto("/wevia.html");
await page.waitForTimeout(4000);
console.log(JSON.stringify({ errors, total: errors.length }, null, 2));
// Also probe via DOM
const state = await page.evaluate(() => ({
sendMsg: typeof window.sendMsg,
send: typeof window.send,
addMsg: typeof window.addMsg,
ambreFetch: typeof window.__ambreFetch,
}));
console.log("STATE:", JSON.stringify(state));
});