Skip to content

Commit e4cfb66

Browse files
committed
Build/Test Tools: Wait for menu saves in the classic menus E2E test.
Developed in: #15772 Props adrianmoldovanwp. See #66455. git-svn-id: https://develop.svn.wordpress.org/trunk@65348 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0d3d217 commit e4cfb66

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tests/e2e/specs/classic-menus.test.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ test.describe( 'Classic Menus', () => {
2828
await page.locator( '#save_menu_footer' ).click();
2929

3030
// The screen reloads into the edit state for the new menu.
31+
await expect( page ).toHaveURL( /[?&]menu=[1-9]\d*/ );
3132
await expect(
3233
page.getByRole( 'textbox', { name: 'Menu Name' } )
3334
).toHaveValue( 'E2E Menu' );
@@ -67,6 +68,9 @@ test.describe( 'Classic Menus', () => {
6768
// See https://core.trac.wordpress.org/ticket/65684.
6869
await page.locator( '#save_menu_footer' ).focus();
6970
await page.keyboard.press( 'Enter' );
71+
await expect( page.locator( '#message' ) ).toContainText(
72+
'E2E Menu has been updated.'
73+
);
7074

7175
// The location assignment persists.
7276
await expect

0 commit comments

Comments
 (0)