Skip to content

Commit

Permalink
Fix flaky tests shortcode UI
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelzaleski committed Feb 25, 2025
1 parent 6ff6cfc commit aa3d9de
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/e2e/utils/payments.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,12 @@ export const setupACHCheckout = async ( page, checkoutType = 'blocks' ) => {
.filter( { hasText: 'ACH Direct Debit' } )
.click();

// Wait for the iframe to be ready
await page.waitForSelector(
'#radio-control-wc-payment-method-options-stripe_us_bank_account__content iframe[src*="elements-inner-payment"]'
);
await page.waitForTimeout( 1000 );

// Click "Test Institution"
await page
.frameLocator(
Expand All @@ -335,6 +341,12 @@ export const setupACHCheckout = async ( page, checkoutType = 'blocks' ) => {
await page.getByText( 'ACH Direct Debit' ).click();
await page.waitForTimeout( 1000 );

// Wait for the iframe to be ready
await page.waitForSelector(
'.wc_payment_method.payment_method_stripe_us_bank_account iframe[src*="elements-inner-payment"]'
);
await page.waitForTimeout( 1000 );

// Click "Test Institution"
await page
.frameLocator(
Expand Down

0 comments on commit aa3d9de

Please sign in to comment.