Skip to content

Commit

Permalink
Remove unwarranted check in playwright util
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Jan 11, 2023
1 parent 9b2dffb commit 175a868
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@ export async function switchBlockInspectorTab( this: Editor, label: string ) {
const inspectorTabButton = this.page.locator(
`role=region[name="Editor settings"i] >> role=tab[name="${ label }"i]`
);
const id = await inspectorTabButton.getAttribute( 'id' );

if ( inspectorTabButton ) {
const id = await inspectorTabButton.getAttribute( 'id' );
await inspectorTabButton.click();

await expect(
this.page.locator(
`role=region[name="Editor settings"i] >> div[role="tabpanel"][aria-labelledby="${ id }"]`
)
).toBeVisible();
}
await inspectorTabButton.click();
await expect(
this.page.locator(
`role=region[name="Editor settings"i] >> div[role="tabpanel"][aria-labelledby="${ id }"]`
)
).toBeVisible();
}

0 comments on commit 175a868

Please sign in to comment.