From 72ec6c4da429cd20f6b00b90247ab0910befd5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Wed, 11 Dec 2024 15:29:37 +0000 Subject: [PATCH] test(e2e): Setup `FEE_BREAKDOWN` feature flag (#4065) --- e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts b/e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts index 4904a13d0c..387c288aec 100644 --- a/e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts +++ b/e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts @@ -8,7 +8,7 @@ import { setUpTestContext, tearDownTestContext, } from "../helpers/context"; -import { cards } from "../helpers/globalHelpers"; +import { cards, setFeatureFlag } from "../helpers/globalHelpers"; import { fillGovUkCardDetails } from "../helpers/userActions"; import inviteToPayFlow from "../mocks/flows/invite-to-pay-flow"; import { getPaymentRequestBySessionId } from "./helpers"; @@ -40,6 +40,10 @@ test.describe("Nominee journey @regression", async () => { } }); + test.beforeEach(async ({ page }) => { + await setFeatureFlag(page, "FEE_BREAKDOWN"); + }); + test.afterAll(async () => { await tearDownTestContext(); }); @@ -60,7 +64,10 @@ test.describe("Nominee journey @regression", async () => { "Add a verandah or deck and changes to internal walls or layout"; await expect(page.getByText(formattedProjectType)).toBeVisible(); - await expect(page.getByText("Fee breakdown")).toBeVisible(); + await expect( + page.getByRole("heading", { name: "Fee", level: 3 }), + ).toBeVisible(); + await expect(page.getByTestId("fee-breakdown-table")).toBeVisible(); const payButton = page.getByRole("button", { name: "Pay using GOV.UK Pay",