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

[WiP] Try fixing Draggable block tests #43742

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ import {
clickBlockAppender,
} from '@wordpress/e2e-test-utils';

describe.skip( 'Draggable block', () => {
// Tests don't seem to pass if beforeAll and afterAll are used.
// Unsure why.
beforeEach( async () => {
describe( 'Draggable block', () => {
beforeAll( async () => {
await deactivatePlugin(
'gutenberg-test-plugin-disables-the-css-animations'
);
Expand All @@ -24,11 +22,10 @@ describe.skip( 'Draggable block', () => {
// Scrolling can interfere with the drag coordinates.
await page.setViewport( { width: 960, height: 1024 } );
await waitForWindowDimensions( 960, 1024 );
await createNewPost();
await page.setDragInterception( true );
} );

afterEach( async () => {
afterAll( async () => {
await page.setDragInterception( false );

// Reset the viewport to normal large size.
Expand All @@ -38,6 +35,10 @@ describe.skip( 'Draggable block', () => {
);
} );

beforeEach( async () => {
await createNewPost();
} );

it( 'can drag and drop to the top of a block list', async () => {
await clickBlockAppender();
await page.keyboard.type( '1' );
Expand Down