Skip to content

Commit

Permalink
Updating to JQuery 3.x somehow changes the visibility calculation - w…
Browse files Browse the repository at this point in the history
…as 1.x polyfilling something in Chrome?
  • Loading branch information
twalpole committed Oct 24, 2021
1 parent a400a04 commit 4e03c10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/capybara/spec/session/fill_in_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
@session.fill_in('with_change_event', with: '')
# click outside the field to trigger the change event
@session.find(:css, 'h1', text: 'FooBar').click
expect(@session).to have_selector(:css, '.change_event_triggered', match: :one)
expect(@session).to have_selector(:css, '.change_event_triggered', match: :one, visible: :all)
end
end

Expand Down
6 changes: 3 additions & 3 deletions spec/shared_selenium_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
session.fill_in('with_change_event', with: '')
# click outside the field to trigger the change event
session.find(:css, 'body').click
expect(session).to have_selector(:css, '.change_event_triggered', match: :one)
expect(session).to have_selector(:css, '.change_event_triggered', visible: :all, match: :one)
end
end

Expand Down Expand Up @@ -135,7 +135,7 @@
fill_options: { clear: :backspace })
# click outside the field to trigger the change event
session.find(:css, '#with_focus_event').click
expect(session).to have_selector(:css, '.change_event_triggered', match: :one, wait: 5)
expect(session).to have_selector(:css, '.change_event_triggered', visible: :all, match: :one, wait: 5)
end

it 'should trigger input event field_value.length times' do
Expand All @@ -146,7 +146,7 @@
# click outside the field to trigger the change event
# session.find(:css, 'body').click
session.find(:css, 'h1', text: 'FooBar').click
expect(session).to have_xpath('//p[@class="input_event_triggered"]', count: 13)
expect(session).to have_xpath('//p[@class="input_event_triggered"]', count: 13, visible: :all)
end
end

Expand Down

0 comments on commit 4e03c10

Please sign in to comment.