spec/watirspec/elements/option_spec.rb in watir-6.6.1 vs spec/watirspec/elements/option_spec.rb in watir-6.6.2

- old
+ new

@@ -69,31 +69,29 @@ 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 - bug "https://bugzilla.mozilla.org/show_bug.cgi?id=1255957", :firefox do + describe "#select" do not_compliant_on :safari do - describe "#select" do - it "selects the chosen option (page context)" do - browser.option(text: "Denmark").select - expect(browser.select_list(name: "new_user_country").selected_options.map(&:text)).to eq ["Denmark"] - end + it "selects the chosen option (page context)" do + browser.option(text: "Denmark").select + expect(browser.select_list(name: "new_user_country").selected_options.map(&:text)).to eq ["Denmark"] + end - it "selects the chosen option (select_list context)" do - browser.select_list(name: "new_user_country").option(text: "Denmark").select - expect(browser.select_list(name: "new_user_country").selected_options.map(&:text)).to eq ["Denmark"] - end + it "selects the chosen option (select_list context)" do + browser.select_list(name: "new_user_country").option(text: "Denmark").select + expect(browser.select_list(name: "new_user_country").selected_options.map(&:text)).to eq ["Denmark"] + end - it "selects the option when found by text (page context)" do - browser.option(text: 'Sweden').select - expect(browser.option(text: 'Sweden')).to be_selected - end + it "selects the option when found by text (page context)" do + browser.option(text: 'Sweden').select + expect(browser.option(text: 'Sweden')).to be_selected + end - it "selects the option when found by text (select_list context)" do - browser.select_list(name: 'new_user_country').option(text: 'Sweden').select - expect(browser.select_list(name: 'new_user_country').option(text: 'Sweden')).to be_selected - end + it "selects the option when found by text (select_list context)" do + browser.select_list(name: 'new_user_country').option(text: 'Sweden').select + expect(browser.select_list(name: 'new_user_country').option(text: 'Sweden')).to be_selected end end it "raises UnknownObjectException if the option does not exist (page context)" do expect { browser.option(text: "no_such_text").select }.to raise_unknown_object_exception