Skip to content

Commit 10a145a

Browse files
renemadsenclaude
andcommitted
fix(test): add eForm/planningTag/assignee selection in I1
The Save button on the create-event modal is gated on having an eForm, planning tag, and at least one assignee. Without them the button stays disabled ("Mindst én medarbejder skal tildeles") and the test times out waiting for the create POST. Mirror the existing createSimpleEvent helper in calendar-resize.spec.ts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5496b7a commit 10a145a

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

eform-client/playwright/e2e/plugins/backend-configuration-pn/r/calendar-ui-enhancements.spec.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -661,9 +661,24 @@ test.describe.serial('Calendar UI enhancements', () => {
661661
// we want to override.
662662
await calendarPage.openCreateModalAt9AM();
663663
await page.locator('#calendarEventTitle').fill(eventTitle);
664-
// Defaults from the modal: first eForm and a board are auto-picked;
665-
// we don't set planningTag/assignee here because the suite's seeded
666-
// worker isn't strictly required to validate reconstruction.
664+
// Backend validation requires eForm + planning tag + at least one
665+
// assignee — same pattern as createSimpleEvent in calendar-resize.spec.ts.
666+
const eform = page.locator('#calendarEventEform');
667+
await eform.click();
668+
await page.locator('.ng-dropdown-panel').waitFor({ state: 'visible', timeout: 5000 });
669+
await page.locator('.ng-dropdown-panel .ng-option').first().click();
670+
await page.waitForTimeout(300);
671+
const planningTag = page.locator('#calendarEventPlanningTag');
672+
await planningTag.click();
673+
await page.locator('.ng-dropdown-panel').waitFor({ state: 'visible', timeout: 5000 });
674+
await page.locator('.ng-dropdown-panel .ng-option').first().click();
675+
await page.waitForTimeout(300);
676+
const assignee = page.locator('#calendarEventAssignee');
677+
await assignee.click();
678+
await page.locator('.ng-dropdown-panel').waitFor({ state: 'visible', timeout: 5000 });
679+
await page.locator('.ng-dropdown-panel .ng-option').first().click();
680+
await page.locator('#calendarEventTitle').click();
681+
await page.waitForTimeout(300);
667682

668683
// ----- Step 2: open repeat dropdown → Tilpasset… ----------------
669684
// The repeat select is [searchable]="false", so click .ng-select-container.

0 commit comments

Comments
 (0)