Skip to content

Commit

Permalink
fix: Drop redundant awaits on nominee.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Oct 5, 2023
1 parent 7af45fc commit b10d032
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions e2e/tests/ui-driven/src/invite-to-pay/nominee.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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();
Expand All @@ -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,
Expand Down

0 comments on commit b10d032

Please sign in to comment.