spec/watirspec/elements/text_field_spec.rb in watir-7.0.0.beta1 vs spec/watirspec/elements/text_field_spec.rb in watir-7.0.0.beta2
- old
+ new
@@ -24,21 +24,19 @@
expect(browser.text_field(label: 'Without for')).to exist
expect(browser.text_field(label: /Without for/)).to exist
expect(browser.text_field(label: 'With hidden text')).to exist
expect(browser.text_field(label: 'With text')).not_to exist
- # These will work after text is deprecated for visible_text
- # expect(browser.text_field(label: /With hidden text/)).to exist
- # expect(browser.text_field(label: /With text/)).not_to exist
+ expect(browser.text_field(label: /With hidden text/)).to exist
+ expect(browser.text_field(label: /With text/)).not_to exist
end
- bug 'Safari is not filtering out hidden text', :safari do
- it 'returns true in spite of hidden text' do
- expect(browser.text_field(visible_label: 'With hidden text')).not_to exist
- expect(browser.text_field(visible_label: 'With text')).to exist
- expect(browser.text_field(visible_label: /With text/)).to exist
- expect(browser.text_field(visible_label: /With hidden text/)).not_to exist
- end
+ it 'returns true in spite of hidden text',
+ except: {browser: :safari, reason: 'Safari is not filtering out hidden text'} do
+ expect(browser.text_field(visible_label: 'With hidden text')).not_to exist
+ expect(browser.text_field(visible_label: 'With text')).to exist
+ expect(browser.text_field(visible_label: /With text/)).to exist
+ expect(browser.text_field(visible_label: /With hidden text/)).not_to exist
end
it 'locates value of text_field using text locators' do
browser.text_field(id: 'new_user_occupation').set 'Firefighter'