Skip to content

Commit 0f5b899

Browse files
renemadsenclaude
andcommitted
test(e2e): read Dashboard sheet by name in working-hours export parity test
The export now adds the Dagsoversigt sheet as the first tab, so the Dashboard data is no longer the first sheet. Select the Dashboard sheet by name instead of by position so the JSON-parity comparison targets the correct sheet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent bc09aed commit 0f5b899

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

eform-client/playwright/e2e/plugins/time-planning-pn/a/time-planning-working-hours.export.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ test.describe('Time planning plugin working hours export', () => {
4747
const generatedContent = fs.readFileSync(downloadPath!);
4848
const fixtureContent = fs.readFileSync(fixturesPath);
4949

50+
// The export now adds a localized "Dagsoversigt" (Day overview) sheet as the first tab,
51+
// so the Dashboard data is no longer SheetNames[0]. Select the Dashboard sheet by name
52+
// (the sheet this fixture represents) rather than by position.
5053
const wbGenerated = XLSX.read(generatedContent, { type: 'buffer' });
51-
const sheetGenerated = wbGenerated.Sheets[wbGenerated.SheetNames[0]];
54+
const sheetGenerated = wbGenerated.Sheets['Dashboard'];
5255
const jsonGenerated = XLSX.utils.sheet_to_json(sheetGenerated, { header: 1 }) as any[][];
5356

5457
const wbFixture = XLSX.read(fixtureContent, { type: 'buffer' });

0 commit comments

Comments
 (0)