Sha256: 8ca685ea91a01829e2f8cc110a543fef854dbe60911d622411ca8069d28e031f
Contents?: true
Size: 1 KB
Versions: 7
Compression:
Stored size: 1 KB
Contents
require 'spec_helper' require 'druid/elements' describe Druid::Elements::Area do context "when mapping how to find an element" do it "should map watir types to same" do [:class, :id, :index, :name, :xpath].each do |t| identifier = Druid::Elements::Area.identifier_for t => 'value' expect(identifier.keys.first).to eql t end end end context "implementation" do let(:element) { double('element') } let(:area) { Druid::Elements::Area.new(element) } it "should know its coords" do expect(element).to receive(:attribute_value).with(:coords).and_return("1,2,3,4") expect(area.coords).to eql "1,2,3,4" end it "should know its shape" do expect(element).to receive(:attribute_value).with(:shape).and_return("circle") expect(area.shape).to eql "circle" end it "should know its href" do expect(element).to receive(:attribute_value).with(:href).and_return("twitter.com") expect(area.href).to eql "twitter.com" end end end
Version data entries
7 entries across 7 versions & 1 rubygems