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 { test, expect } = require( '@playwright/test' );
|
||||||
const {
|
const {
|
||||||
disableWelcomeModal,
|
|
||||||
openEditorSettings,
|
openEditorSettings,
|
||||||
getCanvas,
|
getCanvas,
|
||||||
|
goToPageEditor,
|
||||||
} = require( '../../utils/editor' );
|
} = require( '../../utils/editor' );
|
||||||
const wcApi = require( '@woocommerce/woocommerce-rest-api' ).default;
|
const wcApi = require( '@woocommerce/woocommerce-rest-api' ).default;
|
||||||
const { random } = require( '../../utils/helpers' );
|
const { random } = require( '../../utils/helpers' );
|
||||||
|
@ -133,9 +133,7 @@ test.describe(
|
||||||
const greenColor = '00cc09';
|
const greenColor = '00cc09';
|
||||||
|
|
||||||
// go to create a new page
|
// go to create a new page
|
||||||
await page.goto( 'wp-admin/post-new.php?post_type=page' );
|
await goToPageEditor( { page } );
|
||||||
|
|
||||||
await disableWelcomeModal( { page } );
|
|
||||||
|
|
||||||
const canvas = await getCanvas( page );
|
const canvas = await getCanvas( page );
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
const { expect } = require( '@playwright/test' );
|
const { expect } = require( '@playwright/test' );
|
||||||
|
|
||||||
const closeChoosePatternModal = async ( { page } ) => {
|
const closeChoosePatternModal = async ( { page } ) => {
|
||||||
const closeModal = page.getByRole( 'button', {
|
const closeModal = page
|
||||||
|
.getByLabel( 'Scrollable section' )
|
||||||
|
.filter()
|
||||||
|
.getByRole( 'button', {
|
||||||
name: 'Close',
|
name: 'Close',
|
||||||
exact: true,
|
exact: true,
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in New Issue