Skip to content

Commit

Permalink
Multiple selector fixes for 1.50.1
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoumpierre committed Feb 6, 2025
1 parent e55bc7f commit 985c290
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ describeif( shouldRunSubscriptionsTests )(
// Get the subscription ID
subscriptionId = (
await shopperPage
.getByRole( 'cell', {
name: 'ID: View subscription number',
} )
.getByRole( 'link', { name: 'View subscription number' } )
.textContent()
)
.trim()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ describeif( shouldRunSubscriptionsTests )(

// Verify that the order total is $0.00
await expect(
shopperPage.getByRole( 'cell', { name: /^Total: \$0\.00/ } )
shopperPage
.getByRole( 'row', {
name: 'Total $0.00',
exact: true,
} )
.locator( 'td' )
).toBeVisible();

// Proceed to the checkout page and verify that the 14-day free trial is shown in the product line item,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describeif( shouldRunSubscriptionsTests )(
// Verify we have an active subscription
const relatedSubscriptionId = (
await merchantPage
.getByRole( 'cell', { name: 'Edit order number' } )
.getByRole( 'link', { name: 'Edit order number' } )
.textContent()
)
.trim()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ describeif( shouldRunWCBlocksTests )(
const card = config.cards.basic;

test.beforeAll( async ( { browser }, { project } ) => {
shopperPage = ( await getShopper( browser ) ).shopperPage;
shopperPage = (
await getShopper( browser, true, project.use.baseURL )
).shopperPage;

if (
! ( await checkPageExists(
Expand Down
6 changes: 5 additions & 1 deletion tests/e2e-pw/utils/merchant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,11 @@ export const addWCBCheckoutPage = async ( page: Page ) => {
await page.keyboard.press( 'Escape' ); // to dismiss a dialog if present

// Enable the "Company" field if it's not already enabled.
await page.getByLabel( 'Block: Shipping Address' ).click();
await page
.locator( 'iframe[name="editor-canvas"]' )
.contentFrame()
.getByRole( 'document', { name: 'Block: Shipping Address' } )
.click();

const companyCheckbox = page
.locator( '.components-toggle-control' )
Expand Down

0 comments on commit 985c290

Please sign in to comment.