Skip to content

Commit

Permalink
test(e2e): Setup FEE_BREAKDOWN feature flag (#4065)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Dec 11, 2024
1 parent d7e3c5a commit 72ec6c4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -40,6 +40,10 @@ test.describe("Nominee journey @regression", async () => {
}
});

test.beforeEach(async ({ page }) => {
await setFeatureFlag(page, "FEE_BREAKDOWN");
});

test.afterAll(async () => {
await tearDownTestContext();
});
Expand All @@ -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",
Expand Down

0 comments on commit 72ec6c4

Please sign in to comment.