mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-17 00:05:17 +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:
@@ -1366,7 +1366,12 @@ export async function readSpreadsheet() {
|
||||
|
||||
const { allCells } = await scanSpreadsheetCells(formNum);
|
||||
|
||||
if (allCells.size === 0) throw new Error('readSpreadsheet: no SpreadsheetDocument found. Report may not be generated yet.');
|
||||
if (allCells.size === 0) {
|
||||
// Check for state window messages (info bar) that explain why the report is empty
|
||||
const err = await checkForErrors();
|
||||
const hint = err?.stateText?.length ? err.stateText.join('; ') : '';
|
||||
throw new Error('readSpreadsheet: no SpreadsheetDocument found.' + (hint ? ' State: ' + hint : ' Report may not be generated yet.'));
|
||||
}
|
||||
|
||||
const mapping = buildSpreadsheetMapping(allCells);
|
||||
if (!mapping) {
|
||||
|
||||
Reference in New Issue
Block a user