Skip to content

Commit

Permalink
Try to fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Mar 8, 2024
1 parent a99bc43 commit 65252ce
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/e2e/test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,14 @@ test.describe( 'Custom HTML Block Extension', () => {
test.describe( 'Settings page', () => {
test( 'should be rendered', async ( { admin, page } ) => {
await admin.visitAdminPage( 'options-general.php?page=custom-html-block-extension' );
// Editor config tab
// Hide welcome guide.
const welcomeGuide = page.locator( 'role=dialog[name="About Custom HTML Block Extension"i]' );
const isVisible = await welcomeGuide.isVisible();
if ( isVisible ) {
await welcomeGuide.getByRole( 'button', { name: 'Close' } ).click();
}

// Editsor config tab
await expect( page.getByRole( 'button', { name: 'Save settings' } ) ).toBeVisible();
// Tools tab
await page.getByRole( 'tab', { name: 'Tools' } ).click();
Expand Down

0 comments on commit 65252ce

Please sign in to comment.