spec/watirspec/table_spec.rb in watir-webdriver-0.0.7 vs spec/watirspec/table_spec.rb in watir-webdriver-0.0.8
- old
+ new
@@ -14,22 +14,24 @@
browser.table(:id, /axis_example/).should exist
browser.table(:index, 0).should exist
browser.table(:xpath, "//table[@id='axis_example']").should exist
end
+ it "returns the first table if given no args" do
+ browser.table.should exist
+ end
+
it "returns false if the table does not exist" do
browser.table(:id, 'no_such_id').should_not exist
browser.table(:id, /no_such_id/).should_not exist
browser.table(:index, 1337).should_not exist
browser.table(:xpath, "//table[@id='no_such_id']").should_not exist
end
- bug "http://github.com/jarib/watir-webdriver/issues#issue/6", :webdriver do
- it "checks the tag name when locating by xpath" do
- browser.table(:xpath, "//table//td").should_not exist
- browser.table(:xpath, "//table").should exist
- end
+ it "checks the tag name when locating by xpath" do
+ browser.table(:xpath, "//table//td").should_not exist
+ browser.table(:xpath, "//table").should exist
end
it "raises TypeError when 'what' argument is invalid" do
lambda { browser.table(:id, 3.14).exists? }.should raise_error(TypeError)
end
@@ -115,11 +117,15 @@
it "returns the nth child row" do
browser.table(:id, 'outer')[0].id.should == "outer_first"
browser.table(:id, 'inner')[0].id.should == "inner_first"
browser.table(:id, 'outer')[2].id.should == "outer_last"
end
- it "raises UnknownRowException if the index is out of bounds" do
- lambda { browser.table(:id, 'outer')[1337] }.should raise_error(UnknownRowException)
+
+
+ bug "http://github.com/jarib/watir-webdriver/issues/issue/26", :webdriver do
+ it "raises UnknownRowException if the index is out of bounds" do
+ lambda { browser.table(:id, 'outer')[1337] }.should raise_error(UnknownRowException)
+ end
end
end
bug "http://github.com/jarib/watir-webdriver/issues/#issue/2", :webdriver do
describe "#child_row" do