mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-19 17:19:42 +03:00
feat(web-test): detect SpreadsheetDocument state bar (stateText)
Extract info bar messages from .stateWindowSupportSurface elements into errors.stateText — covers missing parameters, "report not generated", "settings changed", and "generating..." states. readSpreadsheet() now includes the state message in its error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
d155086444
commit
ae1dcaac07
@@ -1176,7 +1176,15 @@ export function checkErrorsScript() {
|
||||
}
|
||||
}
|
||||
|
||||
return (result.balloon || result.messages || result.modal || result.confirmation) ? result : null;
|
||||
// 5. SpreadsheetDocument state window (info bar inside moxelContainer)
|
||||
// Shows messages like "Не установлено значение параметра X" or "Отчет не сформирован"
|
||||
const stateWins = [...document.querySelectorAll('.stateWindowSupportSurface')].filter(el => el.offsetWidth > 0);
|
||||
if (stateWins.length) {
|
||||
const texts = stateWins.map(el => el.innerText?.trim()).filter(Boolean);
|
||||
if (texts.length) result.stateText = texts;
|
||||
}
|
||||
|
||||
return (result.balloon || result.messages || result.modal || result.confirmation || result.stateText) ? result : null;
|
||||
})()`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user