Merge pull request #2064 from elliterate/chores/fix-click-modifier-test

Avoid testing control+shift+click in Firefox
This commit is contained in:
Thomas Walpole 2018-07-04 09:58:10 -07:00 committed by GitHub
commit be1d05d3aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -377,6 +377,7 @@ Capybara::SpecHelper.spec "node" do
end
it "should allow multiple modifiers", requires: [:js] do
pending "Firefox doesn't generate an event for shift+control+click" if marionette_gte?(62, @session)
@session.visit('with_js')
@session.find(:css, '#click-test').click(:control, :alt, :meta, :shift)
# Selenium with Chrome on OSX ctrl-click generates a right click so just verify all keys but not click type

View File

@ -163,5 +163,13 @@ RSpec.describe Capybara::Selenium::Node do
tr.click
expect(tr.base).to have_received(:warn).with(/Clicking the first cell in the row instead/)
end
it "should allow multiple modifiers", requires: [:js] do
session = TestSessions::SeleniumMarionette
session.visit('with_js')
# Firefox doesn't generate an event for control+shift+click
session.find(:css, '#click-test').click(:alt, :ctrl, :meta)
expect(session).to have_link("Has been alt control meta clicked")
end
end
end