From 68196b2d9944c004abc0a7ee1e29486c8bace48f Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Thu, 12 Jan 2023 14:40:10 +0500 Subject: [PATCH] web: use fallback testId for `locationFormSubmitButton` --- apps/web/__e2e__/models/checkout.model.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/web/__e2e__/models/checkout.model.ts b/apps/web/__e2e__/models/checkout.model.ts index 647ee90c3..7545c493f 100644 --- a/apps/web/__e2e__/models/checkout.model.ts +++ b/apps/web/__e2e__/models/checkout.model.ts @@ -132,11 +132,14 @@ class PricingModel { .locator(getPaddleTestId("postcodeInput")) .fill(pinCode.toString()); - await paddle - .locator( - getPaddleTestId("combinedAuthenticationLocationFormSubmitButton") - ) - .click(); + let locationFormSubmitButton = paddle.locator( + getPaddleTestId("combinedAuthenticationLocationFormSubmitButton") + ); + if (!(await locationFormSubmitButton.isVisible())) + locationFormSubmitButton = paddle.locator( + getPaddleTestId("locationFormSubmitButton") + ); + await locationFormSubmitButton.click(); await paddle .locator(getPaddleTestId("inlineComplianceBarContainer"))