lib/capybara/spec/session/has_selector_spec.rb in capybara-3.32.2 vs lib/capybara/spec/session/has_selector_spec.rb in capybara-3.33.0
- old
+ new
@@ -59,15 +59,15 @@
expect(@session).to have_selector(:css, 'p a', text: 'Redirect', count: 1)
expect(@session).not_to have_selector('//p', text: 'Doesnotexist')
end
it 'should respect visibility setting' do
- expect(@session).to have_selector(:id, 'hidden-text', text: 'Some of this text is hidden!', visible: false)
- expect(@session).not_to have_selector(:id, 'hidden-text', text: 'Some of this text is hidden!', visible: true)
+ expect(@session).to have_selector(:id, 'hidden-text', text: 'Some of this text is hidden!', visible: :all)
+ expect(@session).not_to have_selector(:id, 'hidden-text', text: 'Some of this text is hidden!', visible: :visible)
Capybara.ignore_hidden_elements = false
- expect(@session).to have_selector(:id, 'hidden-text', text: 'Some of this text is hidden!', visible: false)
+ expect(@session).to have_selector(:id, 'hidden-text', text: 'Some of this text is hidden!', visible: :all)
Capybara.visible_text_only = true
- expect(@session).not_to have_selector(:id, 'hidden-text', text: 'Some of this text is hidden!', visible: true)
+ expect(@session).not_to have_selector(:id, 'hidden-text', text: 'Some of this text is hidden!', visible: :visible)
end
it 'should discard all matches where the given regexp is not matched' do
expect(@session).to have_selector('//p//a', text: /re[dab]i/i, count: 1)
expect(@session).not_to have_selector('//p//a', text: /Red$/)