fix(web-test): closeForm — pause before auto-clicking confirmation during recording

Same 1.5s pause as in clickElement for confirmation dialogs when video
recording is active. Applies when closeForm({ save: true/false }) auto-clicks
the confirmation button.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-03-27 12:39:15 +03:00
parent cce00a4def
commit d982c5082a
@@ -2275,6 +2275,7 @@ export async function closeForm({ save } = {}) {
for (const b of btns) {
const txt = (await b.textContent()).trim();
if (txt === label) {
if (recorder) await page.waitForTimeout(1500); // show confirmation to viewer during recording
await b.click({ force: true });
await waitForStable(beforeForm);
break;