Skip to content

Commit b8ea6f1

Browse files
committed
Restore saved cards spec
1 parent 1a0a5e2 commit b8ea6f1

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/e2e/specs/wcpay/shopper/shopper-myaccount-saved-cards.spec.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ test.describe( 'Shopper can save and delete cards', () => {
235235
// Take note of the time when we added this card
236236
cardTimingHelper.markCardAdded();
237237

238+
await expect(
239+
shopperPage.getByText(
240+
`${ card2.expires.month }/${ card2.expires.year }`
241+
)
242+
).toBeVisible();
238243
await setDefaultPaymentMethod( shopperPage, card2 );
239244
// Verify that the card was set as default
240245
await expect(
@@ -250,15 +255,6 @@ test.describe( 'Shopper can save and delete cards', () => {
250255
{ tag: '@critical' },
251256
async () => {
252257
await goToMyAccount( shopperPage, 'payment-methods' );
253-
254-
// Verify both cards are visible before trying to delete them
255-
await expect(
256-
shopperPage.getByText( card.label )
257-
).toBeVisible( { timeout: 10000 } );
258-
await expect(
259-
shopperPage.getByText( card2.label )
260-
).toBeVisible( { timeout: 10000 } );
261-
262258
await deleteSavedCard( shopperPage, card );
263259
await expect(
264260
shopperPage.getByText( 'Payment method deleted.' )

0 commit comments

Comments
 (0)