From 9ccf42f3df499f669343e067f9da4e71e92c5bc9 Mon Sep 17 00:00:00 2001 From: Rory Doak Date: Wed, 27 Nov 2024 09:45:00 +0000 Subject: [PATCH] refine flows type use --- e2e/tests/ui-driven/src/helpers/context.ts | 4 ++-- e2e/tests/ui-driven/src/invite-to-pay/helpers.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/tests/ui-driven/src/helpers/context.ts b/e2e/tests/ui-driven/src/helpers/context.ts index d2c9aceea5..4356b9c07f 100644 --- a/e2e/tests/ui-driven/src/helpers/context.ts +++ b/e2e/tests/ui-driven/src/helpers/context.ts @@ -74,14 +74,14 @@ export async function setUpTestContext( context.team?.id && context.user?.id ) { - context.flows![0].id = await $admin.flow.create({ + context.flows[0].id = await $admin.flow.create({ slug: context.flows[0].slug, name: context.flows[0].name, teamId: context.team.id, data: context.flows[0].data, status: "online", }); - context.flows![0].publishedId = await $admin.flow.publish({ + context.flows[0].publishedId = await $admin.flow.publish({ flow: { id: context.flows[0].id, data: context.flows[0].data, diff --git a/e2e/tests/ui-driven/src/invite-to-pay/helpers.ts b/e2e/tests/ui-driven/src/invite-to-pay/helpers.ts index ebaae1bc92..1680c5afd0 100644 --- a/e2e/tests/ui-driven/src/invite-to-pay/helpers.ts +++ b/e2e/tests/ui-driven/src/invite-to-pay/helpers.ts @@ -14,8 +14,8 @@ import { * Navigates to pay component whilst completing the minimum requirements for an Invite to Pay flow */ export async function navigateToPayComponent(page: Page, context: Context) { - const previewURL = `/${context.team!.slug!}/${context.flows![0] - .slug!}/published?analytics=false`; + const previewURL = `/${context.team!.slug!}/${context.flows?.[0] + .slug}/published?analytics=false`; await page.goto(previewURL); await fillInEmail({ page, context });