E2E Fix shopper mini-cart test (#51741)
This commit is contained in:
parent
c0c162ee61
commit
ac7321e5b7
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Fix shopper mini cart test compatibility with external envs
|
|
@ -1,8 +1,8 @@
|
|||
const { test, expect } = require( '@playwright/test' );
|
||||
const {
|
||||
disableWelcomeModal,
|
||||
openEditorSettings,
|
||||
getCanvas,
|
||||
goToPageEditor,
|
||||
} = require( '../../utils/editor' );
|
||||
const wcApi = require( '@woocommerce/woocommerce-rest-api' ).default;
|
||||
const { random } = require( '../../utils/helpers' );
|
||||
|
@ -133,9 +133,7 @@ test.describe(
|
|||
const greenColor = '00cc09';
|
||||
|
||||
// go to create a new page
|
||||
await page.goto( 'wp-admin/post-new.php?post_type=page' );
|
||||
|
||||
await disableWelcomeModal( { page } );
|
||||
await goToPageEditor( { page } );
|
||||
|
||||
const canvas = await getCanvas( page );
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
const { expect } = require( '@playwright/test' );
|
||||
|
||||
const closeChoosePatternModal = async ( { page } ) => {
|
||||
const closeModal = page.getByRole( 'button', {
|
||||
const closeModal = page
|
||||
.getByLabel( 'Scrollable section' )
|
||||
.filter()
|
||||
.getByRole( 'button', {
|
||||
name: 'Close',
|
||||
exact: true,
|
||||
} );
|
||||
|
|
Loading…
Reference in New Issue