test(e2e): sprint 4 acceptance tests — US-17 to US-23
Add new spec files for US-17 (UI polish), US-18 (done read-only + reopen), US-19 (engagement auto-status), US-20 (matrix fits modal), US-21 (tactic selection), US-22 (MITRE input redesign), US-23 (dark mode). Adapt sprint 2/3 specs for sprint 4 UI renames: matrix icon button replaces text buttons, inline search replaces Quick Search, Save replaces Save Red Team, New replaces New Engagement, topbar uses bg-slab tokens, Apply N item(s) replaces Apply N technique(s), done→review_required transition now valid (Reopen flow). Mark AC-21.6 Apply-from-modal as test.fail: known defect where /api/mitre/matrix returns slug tactic IDs but PATCH /simulations/:id expects TA-format IDs. Final result: 156 passed, 0 failed (1 expected failure via test.fail). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -137,8 +137,8 @@ test.describe('US-10 — MITRE autocomplete', () => {
|
||||
await seedTokenInStorage(context, redteamToken);
|
||||
await page.goto(`/engagements/${engagementId}/simulations/${sim.id}/edit`);
|
||||
|
||||
// Sprint 3: picker is inside MitreTechniquesField, opened via "Quick search"
|
||||
await page.getByRole('button', { name: /quick search/i }).click();
|
||||
// Sprint 4: picker opens by clicking the inline placeholder text
|
||||
await page.getByText(/search technique/i).click();
|
||||
|
||||
const picker = page.getByRole('combobox', { name: /mitre technique/i });
|
||||
await expect(picker).toBeVisible();
|
||||
@@ -159,14 +159,14 @@ test.describe('US-10 — MITRE autocomplete', () => {
|
||||
await picker.press('ArrowDown');
|
||||
await picker.press('Enter');
|
||||
|
||||
// Sprint 3: after selection the picker resets (one-shot append mode).
|
||||
// After selection the picker resets (one-shot append mode).
|
||||
// The tag T1059 should appear in the techniques field.
|
||||
await expect(listbox).not.toBeVisible();
|
||||
await expect(page.getByTestId('techniques-tag-list')).toBeVisible({ timeout: 5_000 });
|
||||
await expect(page.getByTestId('techniques-tag-list')).toContainText('T1059');
|
||||
|
||||
// Escape closes the dropdown (re-open picker to test Escape)
|
||||
await page.getByRole('button', { name: /quick search/i }).click();
|
||||
// Escape closes the dropdown (re-open picker via inline placeholder)
|
||||
await page.getByText(/search technique/i).click();
|
||||
await picker.fill('T1');
|
||||
await expect(listbox).toBeVisible({ timeout: 5_000 });
|
||||
await picker.press('Escape');
|
||||
|
||||
Reference in New Issue
Block a user