spec/watirspec/elements/tbody_spec.rb in watir-6.5.0 vs spec/watirspec/elements/tbody_spec.rb in watir-6.6.0

- old
+ new

@@ -48,20 +48,22 @@ expect { browser.tbody(no_such_how: 'some_value').exists? }.to raise_error(Watir::Exception::MissingWayOfFindingObjectException) expect { browser.table(index: 0).tbody(no_such_how: 'some_value').exists? }.to raise_error(Watir::Exception::MissingWayOfFindingObjectException) end end - describe "#[]" do - it "returns the row at the given index (page context)" do - expect(browser.tbody(id: 'first')[0].text).to eq 'March 2008' - expect(browser.tbody(id: 'first')[1][0].text).to eq 'Gregory House' - expect(browser.tbody(id: 'first')[2][0].text).to eq 'Hugh Laurie' - end + bug "Safari does not strip text", :safari do + describe "#[]" do + it "returns the row at the given index (page context)" do + expect(browser.tbody(id: 'first')[0].text).to eq 'March 2008' + expect(browser.tbody(id: 'first')[1][0].text).to eq 'Gregory House' + expect(browser.tbody(id: 'first')[2][0].text).to eq 'Hugh Laurie' + end - it "returns the row at the given index (table context)" do - expect(browser.table(index: 0).tbody(id: 'first')[0].text).to eq 'March 2008' - expect(browser.table(index: 0).tbody(id: 'first')[1][0].text).to eq 'Gregory House' - expect(browser.table(index: 0).tbody(id: 'first')[2][0].text).to eq 'Hugh Laurie' + it "returns the row at the given index (table context)" do + expect(browser.table(index: 0).tbody(id: 'first')[0].text).to eq 'March 2008' + expect(browser.table(index: 0).tbody(id: 'first')[1][0].text).to eq 'Gregory House' + expect(browser.table(index: 0).tbody(id: 'first')[2][0].text).to eq 'Hugh Laurie' + end end end describe "#row" do it "finds the first row matching the selector" do