Skip to content

Commit 4e03c10

Browse files
committed
Updating to JQuery 3.x somehow changes the visibility calculation - was 1.x polyfilling something in Chrome?
1 parent a400a04 commit 4e03c10

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/capybara/spec/session/fill_in_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
@session.fill_in('with_change_event', with: '')
226226
# click outside the field to trigger the change event
227227
@session.find(:css, 'h1', text: 'FooBar').click
228-
expect(@session).to have_selector(:css, '.change_event_triggered', match: :one)
228+
expect(@session).to have_selector(:css, '.change_event_triggered', match: :one, visible: :all)
229229
end
230230
end
231231

spec/shared_selenium_session.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
session.fill_in('with_change_event', with: '')
8080
# click outside the field to trigger the change event
8181
session.find(:css, 'body').click
82-
expect(session).to have_selector(:css, '.change_event_triggered', match: :one)
82+
expect(session).to have_selector(:css, '.change_event_triggered', visible: :all, match: :one)
8383
end
8484
end
8585

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

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

0 commit comments

Comments
 (0)