From b10d0326ab9c2afc9733d631a55838439a74236d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Thu, 5 Oct 2023 16:13:45 +0100 Subject: [PATCH] fix: Drop redundant awaits on nominee.spec.ts --- 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 3167c03ca9..39e353095e 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 @@ -47,7 +47,7 @@ test.describe("Nominee journey @regression", async () => { await navigateToPaymentRequestPage(paymentRequest, page); await expect( - await page.getByRole("heading", { name: "Pay for your application" }), + page.getByRole("heading", { name: "Pay for your application" }), ).toBeVisible(); await expect( page.locator("#main-content").getByText("Invite to pay test"), @@ -58,7 +58,7 @@ test.describe("Nominee journey @regression", async () => { "Alteration of internal walls and addition or alteration of a deck"; await expect(page.getByText(formattedProjectType)).toBeVisible(); - const payButton = await page.getByRole("button", { + const payButton = page.getByRole("button", { name: "Pay using GOV.UK Pay", }); await expect(payButton).toBeVisible(); @@ -71,9 +71,6 @@ test.describe("Nominee journey @regression", async () => { await page.getByRole("button", { name: "Confirm payment" }).click(); await page.waitForURL("**/invite-to-pay-test/**"); - // Wait for GovPay re-request to update paymentRequest status - await page.waitForLoadState("networkidle"); - await expect(page.getByText("Payment received")).toBeVisible(); const updatedPaymentRequest = await getPaymentRequestBySessionId({ sessionId,