From 0009c71a24d4e806b008270b32b589e6a93bf144 Mon Sep 17 00:00:00 2001 From: Corrin Lakeland Date: Mon, 31 Aug 2026 21:10:07 +1200 Subject: [PATCH] KAN-346 spec fix: the Revision 1 assertion is scoped to the history dialog Strict mode rejects the unscoped getByText: the tab header also says "Revision 1" (the live CostSet rev, a different number than the archive's). The merged spec fails on this; the green gate run (4/4, run ot5qglkc) already included this scoping. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_015yGJr7WS9uYzCVWaoBRNrX --- frontend/tests/e2e/job/copy-estimate-to-quote.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/tests/e2e/job/copy-estimate-to-quote.spec.ts b/frontend/tests/e2e/job/copy-estimate-to-quote.spec.ts index e4c239d0..00a6861e 100644 --- a/frontend/tests/e2e/job/copy-estimate-to-quote.spec.ts +++ b/frontend/tests/e2e/job/copy-estimate-to-quote.spec.ts @@ -133,9 +133,11 @@ test.describe.serial('copy estimate to quote', () => { // The archived quote stays visible: the Revisions history holds what the // replace displaced, including the line it archived. await autoId(page, 'JobQuoteTab-revisions').click() - await expect(page.getByText('Quote Revisions History')).toBeVisible({ timeout: 10000 }) - await expect(page.getByText('Revision 1')).toBeVisible() const dialog = page.getByRole('dialog') + await expect(dialog.getByText('Quote Revisions History')).toBeVisible({ timeout: 10000 }) + // Scoped to the dialog: the tab header also says "Revision 1" (the live + // CostSet rev), which is a different number than the archive's. + await expect(dialog.getByText('Revision 1')).toBeVisible() await expect(dialog.getByText('Straightening charge')).toBeVisible() await page.keyboard.press('Escape') })