spec/page-object/elements/canvas_spec.rb in page-object-1.1.1 vs spec/page-object/elements/canvas_spec.rb in page-object-1.2.0
- old
+ new
@@ -20,20 +20,21 @@
end
end
context "implementation" do
let(:canvas_element) { double('canvas_element') }
+ let(:wd) { double('wd') }
context "when using selenium" do
let(:selenium_canvas) { PageObject::Elements::Canvas.new(canvas_element, :platform => :selenium_webdriver) }
it "should know its width" do
- expect(canvas_element).to receive(:attribute).with(:width).and_return("400")
+ expect(canvas_element).to receive(:size).and_return({'width' => 400})
expect(selenium_canvas.width).to eql 400
end
it "should know its height" do
- expect(canvas_element).to receive(:attribute).with(:height).and_return("100")
+ expect(canvas_element).to receive(:size).and_return({'height' => 100})
expect(selenium_canvas.height).to eql 100
end
end
end
end