From b60a378879fd417a01d596966b90795e2c569a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Wed, 11 Dec 2024 09:29:46 +0000 Subject: [PATCH] fix: Move beforeAll() --- e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 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 2b6496c332..323b38464b 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 @@ -29,14 +29,11 @@ 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 () => { + test.beforeAll(async ({ page }) => { try { context = await setUpTestContext(context); + await setFeatureFlag(page, "FEE_BREAKDOWN"); } catch (e) { // ensure proper teardown if setup fails await tearDownTestContext();