Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable skipped Gallery block e2e test #45266

Merged
merged 2 commits into from
Oct 26, 2022
Merged
Changes from all commits
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
41 changes: 18 additions & 23 deletions test/e2e/specs/editor/blocks/gallery.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,29 +196,24 @@ test.describe( 'Gallery', () => {
);
} );

// Disable reason:
// This test would be good to enable, but the media modal contains an
// invalid role, which is causing Axe tests to fail:
// https://core.trac.wordpress.org/ticket/50273
//
// Attempts to add an Axe exception for the media modal haven't proved
// successful:
// https://github.com/WordPress/gutenberg/pull/22719
test.fixme(
'when initially added the media library shows the Create Gallery view',
async ( { admin, editor, page } ) => {
await admin.createNewPost();
await editor.insertBlock( { name: 'core/gallery' } );
await page.click( 'role=button[name="Media Library"i]' );
await page.waitForSelector( '.media-frame' );
expect( await page.innerText( '.media-frame-title h1' ) ).toBe(
'Create gallery'
);
expect(
await page.innerText( '.media-toolbar-primary button' )
).toBe( 'Create a new gallery' );
}
);
test( 'when initially added the media library shows the Create Gallery view', async ( {
admin,
editor,
page,
} ) => {
await admin.createNewPost();
await editor.insertBlock( { name: 'core/gallery' } );
await page.click( 'role=button[name="Media Library"i]' );

const mediaLibrary = page.locator(
'role=dialog[name="Create gallery"i]'
);

await expect( mediaLibrary ).toBeVisible();
await expect(
mediaLibrary.locator( 'role=button[name="Create a new gallery"i]' )
).toBeVisible();
} );
} );

class GalleryBlockUtils {
Expand Down