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

e2e Tests: Add test for inserter drag-and-drop #31356

Closed
Tracked by #33683
ockham opened this issue Apr 29, 2021 · 2 comments · Fixed by #44631
Closed
Tracked by #33683

e2e Tests: Add test for inserter drag-and-drop #31356

ockham opened this issue Apr 29, 2021 · 2 comments · Fixed by #44631
Assignees
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks [Feature] Inserter The main way to insert blocks using the + button in the editing interface Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts [Package] E2E Tests /packages/e2e-tests [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@ockham
Copy link
Contributor

ockham commented Apr 29, 2021

GB 10.5.0 had a small regression related to the inserter's drag-and-drop feature (see #31319). Let's try adding some e2e test coverage for that feature (maybe to https://github.com/WordPress/gutenberg/blob/cec7a6817ac2ec37e1e7a3b314fee0b909e7bd7d/packages/e2e-tests/specs/editor/various/inserting-blocks.test.js?).

Note that it has been previously thought to be impossible to cover drag-and-drop behavior with an e2e test. However, there is some prior art for blocks' drag-and-drop feature, see #26869.

@ockham ockham added [Type] Task Issues or PRs that have been broken down into an individual action to take [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Package] E2E Tests /packages/e2e-tests labels Apr 29, 2021
@ockham ockham added Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts labels Apr 29, 2021
@talldan
Copy link
Contributor

talldan commented Jul 9, 2021

Puppeteer now seems to support drag and drop (v10.1.0):
puppeteer/puppeteer#7150

However, I can't get it to work 😄

edit: got it working. The bit I was missing is that you have to do await page.setDragInterception( true ); before any drag and drop.

@talldan talldan added the [Feature] Drag and Drop Drag and drop functionality when working with blocks label Jul 27, 2021
@kevin940726
Copy link
Member

I can work on this next, as now we can also test dragging files in Playwright too (#42722).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks [Feature] Inserter The main way to insert blocks using the + button in the editing interface Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts [Package] E2E Tests /packages/e2e-tests [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants