spec/symbiont/enclosers_spec.rb in symbiont-0.1.1 vs spec/symbiont/enclosers_spec.rb in symbiont-0.1.2

- old
+ new

@@ -15,7 +15,28 @@ it "should wait for a condition to be true" do watir_browser.should_receive(:wait_until).with(5, "not quick enough") watir_definition.wait_for(5, "not quick enough") end + + it "should handle alert message boxes" do + watir_browser.should_receive(:wd).twice.and_return(watir_browser) + watir_browser.should_receive(:execute_script).twice + watir_definition.will_alert do + end + end + + it "should handle confirmation message boxes" do + watir_browser.should_receive(:wd).twice.and_return(watir_browser) + watir_browser.should_receive(:execute_script).twice + watir_definition.will_confirm(true) do + end + end + + it "should handle prompt message boxes" do + watir_browser.should_receive(:wd).twice.and_return(watir_browser) + watir_browser.should_receive(:execute_script).twice + watir_definition.will_prompt("Question") do + end + end end end