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();