mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Update visibility specification in some tests
This commit is contained in:
parent
2a79cac061
commit
fb6348575e
3 changed files with 6 additions and 6 deletions
|
@ -61,12 +61,12 @@ Capybara::SpecHelper.spec '#has_selector?' do
|
|||
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
|
||||
|
|
|
@ -345,7 +345,7 @@ RSpec.shared_examples Capybara::RSpecMatchers do |session, _mode|
|
|||
expect(session).not_to have_content('This is a test')
|
||||
end.to raise_error(/expected not to find text "This is a test"/)
|
||||
end
|
||||
|
||||
|
||||
it 'not_to have_content behaves the same as to have_no_content' do
|
||||
Capybara.using_wait_time(5) do
|
||||
expect(session).to have_content('This is a test')
|
||||
|
|
|
@ -425,7 +425,7 @@ RSpec.shared_examples 'Capybara::Session' do |session, mode|
|
|||
it 'can find html5 svg elements' do
|
||||
session.visit('with_html5_svg')
|
||||
expect(session).to have_selector(:element, :svg)
|
||||
expect(session).to have_selector(:element, :rect, visible: true)
|
||||
expect(session).to have_selector(:element, :rect, visible: :visible)
|
||||
expect(session).to have_selector(:element, :circle)
|
||||
expect(session).to have_selector(:element, :linearGradient, visible: :all)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue