Skip to content

Commit

Permalink
Update place order flow
Browse files Browse the repository at this point in the history
  • Loading branch information
allie500 committed Feb 10, 2025
1 parent e80d9d9 commit 31c4176
Showing 1 changed file with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ import { addWCBCheckoutPage } from '../../../utils/merchant';
import { goToCheckoutWCB } from '../../../utils/shopper-navigation';
import {
addToCartFromShopPage,
confirmCardAuthentication,
confirmCardAuthenticationWCB,
fillBillingAddressWCB,
fillCardDetailsWCB,
placeOrderWCB,
} from '../../../utils/shopper';
import { config } from '../../../config/default';

Expand Down Expand Up @@ -49,14 +50,7 @@ describeif( shouldRunWCBlocksTests )(
config.addresses.customer.billing
);
await fillCardDetailsWCB( shopperPage, config.cards.basic );
await shopperPage
.getByRole( 'button', { name: 'Place Order' } )
.click();
await expect(
shopperPage.getByRole( 'heading', {
name: 'Order received',
} )
).toBeVisible();
await placeOrderWCB( shopperPage );
} );

test( 'using a 3DS card', async () => {
Expand All @@ -70,10 +64,8 @@ describeif( shouldRunWCBlocksTests )(
config.addresses.customer.billing
);
await fillCardDetailsWCB( shopperPage, config.cards[ '3ds' ] );
await shopperPage
.getByRole( 'button', { name: 'Place Order' } )
.click();
await confirmCardAuthentication( shopperPage );
await placeOrderWCB( shopperPage, false );
await confirmCardAuthenticationWCB( shopperPage );
await expect(
shopperPage.getByRole( 'heading', {
name: 'Order received',
Expand Down

0 comments on commit 31c4176

Please sign in to comment.