Fix blocks e2e test for `additional-fields.merchant.block_theme.side_effects.spec.ts` (#46258)
* Wait for DOMContentLoaded to ensure that scripts are run when we try click edit shipping details.
This commit is contained in:
parent
11ec7c6255
commit
be93d94130
|
@ -297,11 +297,17 @@ test.describe( 'Merchant → Additional Checkout Fields', () => {
|
|||
.getByLabel( 'Is this a personal purchase or a business purchase?' )
|
||||
.selectOption( 'personal' );
|
||||
|
||||
await admin.page
|
||||
const clickPromise = admin.page
|
||||
.getByRole( 'button', { name: 'Update' } )
|
||||
.first()
|
||||
.click();
|
||||
|
||||
const navigationPromise = admin.page.waitForEvent( 'domcontentloaded' );
|
||||
|
||||
// When update is clicked without waiting for DOMContentLoaded the page becomes
|
||||
// available before click handlers are attached to the shipping edit link.
|
||||
await Promise.all( [ clickPromise, navigationPromise ] );
|
||||
|
||||
await admin.page
|
||||
.getByRole( 'heading', { name: 'Shipping Edit' } )
|
||||
.getByRole( 'link' )
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: Fix blocks e2e test for additional-fields.merchant.block_theme.side_effects.spec.ts
|
||||
|
Loading…
Reference in New Issue