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

[BUG] Drag&Drop doesn't work in 1.18 #10636

Closed
mdemenko opened this issue Dec 1, 2021 · 11 comments · Fixed by #11760
Closed

[BUG] Drag&Drop doesn't work in 1.18 #10636

mdemenko opened this issue Dec 1, 2021 · 11 comments · Fixed by #11760

Comments

@mdemenko
Copy link

mdemenko commented Dec 1, 2021

Context:

  • Playwright Version: [1.17.0]
  • Operating System: [Windows 10]
  • Node.js version: [16.13.0]
  • Browser: [Chromium]

Code Snippet

import test from '@playwright/test';

test('Example test', async ({page}) => {
const originSelector = ".dx-command-drag >> nth=1"
const targetSelector = ".dx-command-drag >> nth=3"
await this.page.dragAndDrop(originSelector, targetSelector)})

Describe the bug

Origin selector isn't released after moving to the target position. Same code is working in 1.16.2 version
Log.txt

@dgozman
Copy link
Contributor

dgozman commented Dec 1, 2021

@mdemenko Could you please share a trace file with us? You can send it to dgozman [at] microsoft [dot] com if you'd like. See here for recording a trace: https://playwright.dev/docs/trace-viewer#recording-a-trace.

@pavelfeldman
Copy link
Member

@mdemenko could you confirm that running the test with the following environment variable PLAYWRIGHT_NO_LAYOUT_SHIFT_CHECK=1 resolves the issue?

@mdemenko
Copy link
Author

mdemenko commented Dec 2, 2021

I've checked with this variable. Issue isn't reproducible.
Trace file was sent to @dgozman.

@dgozman
Copy link
Contributor

dgozman commented Dec 2, 2021

@mdemenko In this case, please upgrade to v1.17.1 and the problem should be gone. Please let us know whether it worked for you, and we'll close this issue.

@dgozman
Copy link
Contributor

dgozman commented Dec 2, 2021

If you could share a repro with us, that would be great! We'll be able to prevent similar breakages in the future.

@mdemenko
Copy link
Author

mdemenko commented Dec 3, 2021

Updated to 1.17.1. Issue is resolved.

@dgozman dgozman closed this as completed Dec 3, 2021
@mdemenko
Copy link
Author

@dgozman Issue is reproducible on 1.18.0 version. Locator.dragTo(locator) command doesn't work as well.

@dgozman
Copy link
Contributor

dgozman commented Jan 27, 2022

@mdemenko Could you please share the page url?

@dgozman dgozman reopened this Jan 27, 2022
@dgozman dgozman added v1.18 and removed v1.17 labels Jan 27, 2022
@pavelfeldman pavelfeldman changed the title [BUG] Drag&Drop doesn't work in 1.17 [BUG] Drag&Drop doesn't work in 1.18 Jan 27, 2022
@mdemenko
Copy link
Author

mdemenko commented Jan 28, 2022

@dgozman I can't provide page url since it's internal project. Are you able to reproduce the defect with the steps from description?

Update: I've checked on testing site and issue isn't reproducible.

test("drag&drop", async ({ page }) => {
await page.goto("https://letcode.in/dropable")
const drag = "#draggable"
const drop = "#droppable"
await page.dragAndDrop(drag, drop)
})

So seems it's specific for some components. Current test is checking drag&drop for table rows (DxDataGrid component, DevExpress 21.2)

@mdemenko
Copy link
Author

mdemenko commented Jan 31, 2022

@dgozman Added test for checking on devexpress demo site

import`` { test } from "@playwright/test"

test.only("basic test", async ({ page }) => {

await page.goto("https://codesandbox.io/s/o5s88")
await page.locator("#sandbox-preview").waitFor()
const frame = page.frameLocator("#sandbox-preview")
const originLocator = frame.locator("#app .dx-command-drag >> nth=1")
const targetLocator = frame.locator("#app .dx-command-drag >> nth=3")
await originLocator.dragTo(targetLocator)
await page.waitForTimeout(3000)

})

@aslushnikov
Copy link
Contributor

@mdemenko this is fixed on the tip-of-tree. Can you please try installing npm i @playwright/test@next and give it a try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants