Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make e2e test locator less strict
  • Loading branch information
getdave committed Sep 19, 2023
commit d2e54f94f0710d0ff1b8a233f0417d7e5dca1be3
8 changes: 3 additions & 5 deletions test/e2e/specs/editor/blocks/navigation-list-view.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ test.describe( 'Navigation block - List view editing', () => {
hasText: 'Block 2 of 2, Level 1', // proxy for filtering by description.
} )
.getByText( 'Top Level Item 2' )
).not.toBeVisible();
).toBeHidden();
} );

test( `can edit menu items`, async ( { page, editor, requestUtils } ) => {
Expand Down Expand Up @@ -525,7 +525,7 @@ test.describe( 'Navigation block - List view editing', () => {
// Check that despite being the last inserted block, the Link UI is not displayed
// in this scenario because it was not **just** inserted into the List View (i.e.
// we have unmounted the list view and then remounted it).
await expect( linkControl.getSearchInput() ).not.toBeVisible();
await expect( linkControl.getSearchInput() ).toBeHidden();
} );
} );

Expand Down Expand Up @@ -573,9 +573,7 @@ class LinkControl {
await expect( result ).toBeVisible();

return result
.locator(
'.components-menu-item__info-wrapper .components-menu-item__item'
) // this is the only way to get the label text without the URL.
.locator( '.components-menu-item__item' ) // this is the only way to get the label text without the URL.
.innerText();
}
}