Skip to content

Commit

Permalink
Update confirmCardAuthenticationWCB
Browse files Browse the repository at this point in the history
  • Loading branch information
allie500 committed Feb 10, 2025
1 parent 31c4176 commit a56006c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/e2e-pw/utils/shopper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,10 +621,12 @@ export const removeCoupon = async ( page: Page ) => {
* to confirm the card authentication.
*
* @param {Page} page The Shopper page object.
* @param {boolean} authorize Whether to authorize the transaction or not.
* @return {Promise<void>} Void.
*/
export const confirmCardAuthenticationWCB = async (
page: Page
page: Page,
authorize = true
): Promise< void > => {
const placeOrderButton = page.locator(
'.wc-block-components-checkout-place-order-button'
Expand All @@ -633,5 +635,5 @@ export const confirmCardAuthenticationWCB = async (
await expect( placeOrderButton ).toHaveClass(
/wc-block-components-button--loading/
);
await confirmCardAuthentication( page );
await confirmCardAuthentication( page, authorize );
};

0 comments on commit a56006c

Please sign in to comment.