perf(web-test): detect .confirm notification for early exit in clickElement

Add .confirm CSS selector to the server-response waitForSelector in
clickElement. 1C web client shows notifications (Изменение/Проведение)
as .confirm elements after write/post operations. This allows early
exit instead of waiting the full 10s timeout. Записать: 14s → 2.6s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-03-05 08:58:21 +03:00
co-authored by Claude Opus 4.6
parent 8a286d7191
commit 6958cc558b
+1 -1
View File
@@ -1500,7 +1500,7 @@ export async function clickElement(text, { dblclick } = {}) {
// waitForSelector uses MutationObserver internally — doesn't block event loop. // waitForSelector uses MutationObserver internally — doesn't block event loop.
try { try {
await page.waitForSelector( await page.waitForSelector(
'#modalSurface:not([style*="display: none"]), .balloon', '#modalSurface:not([style*="display: none"]), .balloon, .confirm',
{ state: 'visible', timeout: 10000 } { state: 'visible', timeout: 10000 }
); );
} catch {} } catch {}