Skip to content

Commit d4ce1e4

Browse files
renemadsenclaude
andcommitted
Fix Playwright dashboard-assert: skip useGoogleSheetAsDefault toggle and fix waitForResponse race conditions
The useGoogleSheetAsDefault setting is now enabled by default in seed (commit e86d3a1), so clicking the checkbox was disabling it instead of enabling it, causing all value mismatches. Also fixed two waitForResponse calls that were registered after the triggering click. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8c3566b commit d4ce1e4

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

eform-client/playwright/e2e/plugins/time-planning-pn/b/dashboard-assert.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ test.describe('Dashboard assert', () => {
254254
await page.locator('#firstColumn3').click();
255255
// Wait for spinner before clicking checkbox
256256
await waitForSpinner(page);
257-
await page.locator('#useGoogleSheetAsDefault').click();
257+
// useGoogleSheetAsDefault is now enabled by default in seed (commit e86d3a1b)
258+
// await page.locator('#useGoogleSheetAsDefault').click();
258259
// Wait for spinner before clicking Save button
259260
await waitForSpinner(page);
260261
const assignSitePromise = page.waitForResponse(r => r.url().includes('/api/time-planning-pn/settings/assigned-site') && r.request().method() === 'PUT');
@@ -338,8 +339,8 @@ test.describe('Dashboard assert', () => {
338339
await page.locator(id).locator('input').fill(planTextsNextWeek[i].text);
339340
}
340341

341-
await page.locator('#workingHoursSave').click();
342342
const savePromise2 = page.waitForResponse(r => r.url().includes('/api/time-planning-pn/working-hours') && r.request().method() === 'PUT');
343+
await page.locator('#workingHoursSave').click();
343344
await savePromise2;
344345
await page.locator('.overlay-spinner').waitFor({ state: 'hidden', timeout: 30000 });
345346
await expect(page.locator('#sumFlex7 input')).toHaveValue(/-14\.55/);
@@ -374,8 +375,8 @@ test.describe('Dashboard assert', () => {
374375
await page.locator(id).locator('input').fill(planTextsFutureWeek[i].text);
375376
}
376377

377-
await page.locator('#workingHoursSave').click();
378378
const savePromise3 = page.waitForResponse(r => r.url().includes('/api/time-planning-pn/working-hours') && r.request().method() === 'PUT');
379+
await page.locator('#workingHoursSave').click();
379380
await savePromise3;
380381
await page.locator('.overlay-spinner').waitFor({ state: 'hidden', timeout: 30000 });
381382
await page.locator('mat-toolbar > div > button .mat-mdc-button-persistent-ripple').first().locator('..').click();

0 commit comments

Comments
 (0)