Sha256: cc122976e3ed80443c57aebe9618fc777246fc85bc09df2a6895e63fec73619a

Contents?: true

Size: 811 Bytes

Versions: 10

Compression:

Stored size: 811 Bytes

Contents

require 'spec_helper'
require 'page-object/elements'

describe PageObject::Elements::Div do
  let(:div) { PageObject::Elements::Div }

  describe "when mapping how to find an element" do
    it "should map watir types to same" do
      [:class, :id, :text, :index, :xpath].each do |t|
        identifier = div.watir_identifier_for t => 'value'
        identifier.keys.first.should == t
      end
    end

    it "should map selenium types to same" do
      [:class, :id, :text, :index, :name, :xpath].each do |t|
        key, value = div.selenium_identifier_for t => 'value'
        key.should == t
      end
    end

    describe "interface" do
      it "should register with tag :div" do
        ::PageObject::Elements.element_class_for(:div).should == ::PageObject::Elements::Div
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
page-object-0.6.8 spec/page-object/elements/div_spec.rb
page-object-0.6.7 spec/page-object/elements/div_spec.rb
page-object-0.6.6 spec/page-object/elements/div_spec.rb
page-object-0.6.5 spec/page-object/elements/div_spec.rb
page-object-0.6.4 spec/page-object/elements/div_spec.rb
page-object-0.6.3 spec/page-object/elements/div_spec.rb
page-object-0.6.2 spec/page-object/elements/div_spec.rb
page-object-0.6.1 spec/page-object/elements/div_spec.rb
page-object-0.6 spec/page-object/elements/div_spec.rb
page-object-0.5.5 spec/page-object/elements/div_spec.rb