mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-02 17:57:45 +03:00
fix(web-test): detect modal errors without #modalSurface dependency
1C platform shows some modal dialogs (e.g. "Не удалось записать") via ps*win floating windows WITHOUT setting #modalSurface visible. Removed the modalSurface gate from checkErrorsScript — now scans all small forms for button patterns regardless of overlay state. The elCount > 100 threshold already filters content forms reliably. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
75558fe46c
commit
5ea6414585
@@ -800,9 +800,8 @@ export function checkErrorsScript() {
|
|||||||
|
|
||||||
// 3+4. Modal dialogs: confirmation (multiple buttons) or error (single pressDefault)
|
// 3+4. Modal dialogs: confirmation (multiple buttons) or error (single pressDefault)
|
||||||
// Uses form container ancestry to group buttons — pressButton elements often lack form-prefixed IDs
|
// Uses form container ancestry to group buttons — pressButton elements often lack form-prefixed IDs
|
||||||
const modalSurface = document.getElementById('modalSurface');
|
// Note: 1C shows some modals WITHOUT #modalSurface (e.g. "Не удалось записать" uses ps*win floating window)
|
||||||
if (modalSurface && modalSurface.offsetWidth > 0) {
|
// so we always scan for small forms with button patterns, regardless of modalSurface state
|
||||||
// Group visible pressButtons by their form container
|
|
||||||
const formButtons = {};
|
const formButtons = {};
|
||||||
[...document.querySelectorAll('a.press.pressButton')].forEach(btn => {
|
[...document.querySelectorAll('a.press.pressButton')].forEach(btn => {
|
||||||
if (btn.offsetWidth === 0) return;
|
if (btn.offsetWidth === 0) return;
|
||||||
@@ -849,7 +848,6 @@ export function checkErrorsScript() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return (result.balloon || result.messages || result.modal || result.confirmation) ? result : null;
|
return (result.balloon || result.messages || result.modal || result.confirmation) ? result : null;
|
||||||
})()`;
|
})()`;
|
||||||
|
|||||||
Reference in New Issue
Block a user