From 369eddd0d5112818a596a300d425f330617ee3cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Wed, 11 Dec 2024 09:08:06 +0000 Subject: [PATCH] test(e2e): Setup FEE_BREAKDOWN feature flag --- e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts | 9 +++++++-- 1 file changed, 7 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..2b6496c332 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"; @@ -29,6 +29,10 @@ const PAYMENT_NOT_FOUND_TEXT = "Sorry, we can’t find that payment link"; const adminGQLClient = getGraphQLClient(); +test.beforeAll(async ({ page }) => { + await setFeatureFlag(page, "FEE_BREAKDOWN"); +}); + test.describe("Nominee journey @regression", async () => { test.beforeAll(async () => { try { @@ -60,7 +64,8 @@ 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.getByText("Fee")).toBeVisible(); + await expect(page.getByTestId("fee-breakdown-table")).toBeVisible(); const payButton = page.getByRole("button", { name: "Pay using GOV.UK Pay",