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

update documentation about HTML5 drag of capybara driver #120

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

YusukeIwaki
Copy link
Owner

@YusukeIwaki YusukeIwaki commented Jun 16, 2021

We can handle HTML5 drag/drop with Playwright 1.12.0 or later. (Special thanks to microsoft/playwright#6207)

  it 'drag and drop' do
    Capybara.app_host = 'https://www.w3schools.com'
    visit '/html/html5_draganddrop.asp'
    find('#drag1').drag_to(find('#div2'))
  end

This example works as expected with latest Chrome.

However when we execute https://github.com/teamcapybara/capybara/blob/master/lib/capybara/spec/session/node_spec.rb, it doesn't works as Capybara expects...

    #drag_to
      HTML5
        should HTML5 drag and drop an object
        should HTML5 drag and drop an object child
        should set clientX/Y in dragover events (FAILED - 1)
        should preserve clientX/Y from last dragover event (FAILED - 2)
        should not HTML5 drag and drop on a non HTML5 drop element
        should HTML5 drag and drop when scrolling needed (FAILED - 3)
        should drag HTML5 default draggable elements (FAILED - 4)
        should work with SortableJS (FAILED - 5)
        should drag HTML5 default draggable element child (FAILED - 6)
        should simulate a single held down modifier key
        should simulate multiple held down modifier keys
        should support key aliases

For example anchor links are draggable by default, but not draggable with Playwright.

This is difficult to explain for users. So just describe "not fully supported"

@vercel
Copy link

vercel bot commented Jun 16, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/yusukeiwaki/playwright-ruby-client/37zAE5UKRQkqG9UnZfDQVg2gj6LQ
✅ Preview: https://playwright-ruby-client-git-documentation-cap-73baf5-yusukeiwaki.vercel.app

@YusukeIwaki YusukeIwaki merged commit 1e74856 into main Jun 16, 2021
@YusukeIwaki YusukeIwaki deleted the documentation/capybara-html5-drag branch June 16, 2021 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant