Skip to content

Commit 3cc9eaf

Browse files
authored
E2E - Fix failures for Shopper: Subscription (#11013)
1 parent de740fd commit 3cc9eaf

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: dev
3+
4+
Fix E2E subcription shopper test failures because the core changes text from "Sign up now" to "Add to cart"

tests/e2e/specs/subscriptions/shopper/shopper-subscriptions-purchase-free-trial.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describeif( shouldRunSubscriptionsTests )(
8686

8787
// Add it to the cart and verify that the cart page shows the free trial details
8888
await shopperPage
89-
.getByRole( 'button', { name: 'Sign up now' } )
89+
.getByRole( 'button', { name: 'Add to cart', exact: true } )
9090
.click();
9191
await goToCart( shopperPage );
9292
await expect(
@@ -130,7 +130,7 @@ describeif( shouldRunSubscriptionsTests )(
130130
const card = config.cards[ '3dsOTP' ];
131131
await fillCardDetails( shopperPage, card );
132132
await shopperPage
133-
.getByRole( 'button', { name: 'Sign up now' } )
133+
.getByRole( 'button', { name: 'Add to cart', exact: true } )
134134
.click();
135135
await shopperPage.frames()[ 0 ].waitForLoadState( 'load' );
136136
await confirmCardAuthentication( shopperPage, true );

tests/e2e/specs/subscriptions/shopper/shopper-subscriptions-purchase-no-signup-fee.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describeif( shouldRunSubscriptionsTests )(
4545
);
4646
await goToProductPageBySlug( shopperPage, productSlug );
4747
await shopperPage
48-
.getByRole( 'button', { name: 'Sign up now' } )
48+
.getByRole( 'button', { name: 'Add to cart', exact: true } )
4949
.click();
5050
await shopperPage.waitForLoadState( 'networkidle' );
5151
await expect(

0 commit comments

Comments
 (0)