[e2e tests] Fix flaky navigation to editor (#50841)
This commit is contained in:
parent
94d3b2e05c
commit
e1e628ccf0
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
|
|
@ -39,21 +39,23 @@ const getCanvas = async ( page ) => {
|
|||
};
|
||||
|
||||
const goToPageEditor = async ( { page } ) => {
|
||||
await page.goto( 'wp-admin/post-new.php?post_type=page' );
|
||||
await disableWelcomeModal( { page } );
|
||||
await page.waitForResponse(
|
||||
const responsePromise = page.waitForResponse(
|
||||
( response ) =>
|
||||
response.url().includes( '//page' ) && response.status() === 200
|
||||
);
|
||||
await page.goto( 'wp-admin/post-new.php?post_type=page' );
|
||||
await disableWelcomeModal( { page } );
|
||||
await responsePromise;
|
||||
};
|
||||
|
||||
const goToPostEditor = async ( { page } ) => {
|
||||
await page.goto( 'wp-admin/post-new.php' );
|
||||
await disableWelcomeModal( { page } );
|
||||
await page.waitForResponse(
|
||||
const responsePromise = page.waitForResponse(
|
||||
( response ) =>
|
||||
response.url().includes( '//single' ) && response.status() === 200
|
||||
);
|
||||
await page.goto( 'wp-admin/post-new.php' );
|
||||
await disableWelcomeModal( { page } );
|
||||
await responsePromise;
|
||||
};
|
||||
|
||||
const fillPageTitle = async ( page, title ) => {
|
||||
|
|
Loading…
Reference in New Issue