Skip to content

Commit e97631c

Browse files
renemadsenclaude
andcommitted
Add Playwright E2E tests for KA/Krifa and GLS-A Gartneri presets
Add Scenario 3 (KA/Krifa Landbrug Svine/Kvaeg Standard) and Scenario 4 (GLS-A Gartneri Standard) to verify the new preset groups work in the UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 40e28e5 commit e97631c

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,4 +387,45 @@ test.describe('GLS-A / 3F Pay Rule Set Full Pipeline E2E', () => {
387387
await expect(grid.getByText('GLS-A / 3F - Jordbrug Standard')).toBeVisible({ timeout: 10000 });
388388
await expect(grid.getByText('GLS-A / 3F - Jordbrug Dyrehold')).toBeVisible({ timeout: 10000 });
389389
});
390+
391+
// -----------------------------------------------------------------------
392+
// Scenario 3 - KA/Krifa Landbrug Svine/Kvaeg preset
393+
// -----------------------------------------------------------------------
394+
test('Scenario 3: KA/Krifa preset - create Landbrug Svine/Kvaeg Standard', async ({ page }) => {
395+
await navigateToPayRuleSets(page);
396+
await openCreatePayRuleSetModal(page);
397+
398+
// Select KA/Krifa preset - this verifies the new group appears
399+
await selectPreset(page, 'Landbrug Svine/Kvaeg - Standard');
400+
401+
const dialog = page.locator('mat-dialog-container');
402+
await expect(dialog.locator('.lock-banner')).toBeVisible({ timeout: 5000 });
403+
await expect(dialog.locator('.preset-name')).toContainText('KA / Krifa - Landbrug Svine/Kvaeg Standard');
404+
await expect(dialog.locator('.rules-summary').first()).toBeVisible({ timeout: 5000 });
405+
406+
await submitCreatePayRuleSet(page);
407+
408+
const grid = page.locator('#time-planning-pn-pay-rule-sets-grid');
409+
await grid.waitFor({ state: 'visible', timeout: 10000 });
410+
await expect(grid.getByText('KA / Krifa - Landbrug Svine/Kvaeg Standard')).toBeVisible({ timeout: 10000 });
411+
});
412+
413+
// -----------------------------------------------------------------------
414+
// Scenario 4 - GLS-A Gartneri preset
415+
// -----------------------------------------------------------------------
416+
test('Scenario 4: GLS-A Gartneri preset - create and verify in grid', async ({ page }) => {
417+
await navigateToPayRuleSets(page);
418+
await openCreatePayRuleSetModal(page);
419+
420+
await selectPreset(page, 'Gartneri - Standard');
421+
422+
const dialog = page.locator('mat-dialog-container');
423+
await expect(dialog.locator('.lock-banner')).toBeVisible({ timeout: 5000 });
424+
await expect(dialog.locator('.preset-name')).toContainText('GLS-A / 3F - Gartneri Standard');
425+
426+
await submitCreatePayRuleSet(page);
427+
428+
const grid = page.locator('#time-planning-pn-pay-rule-sets-grid');
429+
await expect(grid.getByText('GLS-A / 3F - Gartneri Standard')).toBeVisible({ timeout: 10000 });
430+
});
390431
});

0 commit comments

Comments
 (0)