Skip to content

Commit 71316ce

Browse files
renemadsenclaude
andcommitted
fix: set shift times in correct order (start -> stop -> break)
The break/pause field is disabled until start and stop are filled. Changed order from start/break/stop to start/stop/break to match the pattern in dashboard-edit-b.spec.ts. Also force-click the timepicker input since it has readonly+disabled attributes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d7037c9 commit 71316ce

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

eform-client/playwright/e2e/plugins/time-planning-pn/c/time-planning-glsa-3f-pay-rules.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ async function setTimepickerValue(
175175
const [hours, minutes] = timeValue.split(':').map(Number);
176176
const input = page.locator(`[data-testid="${testId}"]`);
177177
await input.waitFor({ state: 'visible', timeout: 10000 });
178-
await input.click();
178+
// The timepicker input is readonly and may be disabled - force click
179+
await input.click({ force: true });
179180

180181
// Select hour on the clock face
181182
const hourDegrees = 360 / 12 * hours;
@@ -228,9 +229,10 @@ async function setPlannedShiftTimes(
228229
pause: string,
229230
stop: string,
230231
): Promise<void> {
232+
// Order matters: break is disabled until start+stop are set
231233
await setTimepickerValue(page, `plannedStartOfShift${shiftId}`, start);
232-
await setTimepickerValue(page, `plannedBreakOfShift${shiftId}`, pause);
233234
await setTimepickerValue(page, `plannedEndOfShift${shiftId}`, stop);
235+
await setTimepickerValue(page, `plannedBreakOfShift${shiftId}`, pause);
234236
}
235237

236238
/**

0 commit comments

Comments
 (0)