spec/watirspec/elements/button_spec.rb in watir-7.0.0.beta1 vs spec/watirspec/elements/button_spec.rb in watir-7.0.0.beta2

- old
+ new

@@ -12,13 +12,11 @@ expect(browser.button(id: /new_user_submit/)).to exist expect(browser.button(name: 'new_user_reset')).to exist expect(browser.button(name: /new_user_reset/)).to exist expect(browser.button(value: 'Button')).to exist expect(browser.button(value: /Button/)).to exist - not_compliant_on :internet_explorer do - expect(browser.button(src: 'images/button.png')).to exist - end + expect(browser.button(src: 'images/button.png')).to exist expect(browser.button(src: /button\.png/)).to exist expect(browser.button(text: 'Button 2')).to exist expect(browser.button(text: /Button 2/)).to exist expect(browser.button(class: 'image')).to exist expect(browser.button(class: /image/)).to exist @@ -125,14 +123,12 @@ expect { browser.button(name: 'no_such_name').src }.to raise_unknown_object_exception end end describe '#style' do - not_compliant_on :internet_explorer do - it 'returns the style attribute if the button exists' do - expect(browser.button(id: 'delete_user_submit').style).to eq 'border: 4px solid red;' - end + it 'returns the style attribute if the button exists' do + expect(browser.button(id: 'delete_user_submit').style).to include 'border: 4px solid red;' end it "returns an empty string if the element exists and the attribute doesn't exist" do expect(browser.button(id: 'new_user_submit').style).to eq '' end @@ -242,10 +238,10 @@ # Manipulation methods describe '#click' do it 'clicks the button if it exists' do browser.goto(WatirSpec.url_for('forms_with_input_elements.html')) browser.button(id: 'delete_user_submit').click - Watir::Wait.until { !browser.url.include? 'forms_with_input_elements.html' } + browser.wait_while(url: /forms_with_input_elements\.html$/) expect(browser.text).to include('Semantic table') end it 'fires events' do browser.button(id: 'new_user_button').click