spec/watirspec/elements/option_spec.rb in watir-6.9.1 vs spec/watirspec/elements/option_spec.rb in watir-6.10.0
- old
+ new
@@ -62,15 +62,10 @@
it "raises TypeError when 'what' argument is invalid" do
expect { browser.option(id: 3.14).exists? }.to raise_error(TypeError)
expect { browser.select_list(name: "new_user_country").option(id: 3.14).exists? }.to raise_error(TypeError)
end
-
- it "raises MissingWayOfFindingObjectException when 'how' argument is invalid" do
- expect { browser.option(no_such_how: 'some_value').exists? }.to raise_error(Watir::Exception::MissingWayOfFindingObjectException)
- expect { browser.select_list(name: "new_user_country").option(no_such_how: 'some_value').exists? }.to raise_error(Watir::Exception::MissingWayOfFindingObjectException)
- end
end
describe "#select" do
not_compliant_on :safari do
it "selects the chosen option (page context)" do
@@ -100,17 +95,9 @@
end
it "raises UnknownObjectException if the option does not exist (select_list context)" do
expect { browser.select_list(name: "new_user_country").option(text: "no_such_text").select }.to raise_unknown_object_exception
expect { browser.select_list(name: "new_user_country").option(text: /missing/).select }.to raise_unknown_object_exception
- end
-
- it "raises MissingWayOfFindingObjectException when given a bad 'how' (page context)" do
- expect { browser.option(missing: "Denmark").select }.to raise_error(Watir::Exception::MissingWayOfFindingObjectException)
- end
-
- it "raises MissingWayOfFindingObjectException when given a bad 'how' (select_list context)" do
- expect { browser.select_list(name: "new_user_country").option(missing: "Denmark").select }.to raise_error(Watir::Exception::MissingWayOfFindingObjectException)
end
end
describe "#class_name" do
it "is able to get attributes (page context)" do