spec/element_spec.rb in cello-0.0.17 vs spec/element_spec.rb in cello-0.0.19

- old
+ new

@@ -1,19 +1,25 @@ -require File.join(File.dirname(__FILE__), '../lib/cello/structure/html_elements/element_helper.rb') +require 'mock/page' describe "Class with element" do describe "Element interface" do - it "Verify if the element exists" do + before(:all) do + @page = Mock::Site::MockPage.new "foo" end - it "Click on the element" do + it "Verify if the element exists method exists" do + (@page.methods.map.include? :element_is_real?).should be_true end - it "Verify if the element is visible" do + it "Click on the element method exists" do + (@page.methods.map.include? :element_click).should be_true end - it "Verify if the element is enable" do + it "Verify if the element is visible method exists" do + (@page.methods.map.include? :element_is_visible?).should be_true end - it "Click with the right button on the element" do + it "Verify if the element is enable methods exists" do + (@page.methods.map.include? :element_is_enable?).should be_true end - it "Define extras for specific element" do + it "Click with the right button on the element method exists" do + (@page.methods.map.include? :element_right_click).should be_true end end end