Sha256: 037abd68ebf1e3988d52f4a2615b99eca642c04720b49a84ec61e62fbc5a8fc8

Contents?: true

Size: 834 Bytes

Versions: 18

Compression:

Stored size: 834 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, :name, :title].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, :title].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

18 entries across 18 versions & 1 rubygems

Version Path
page-object-0.8.7 spec/page-object/elements/div_spec.rb
page-object-0.8.6.1 spec/page-object/elements/div_spec.rb
page-object-0.8.6 spec/page-object/elements/div_spec.rb
page-object-0.8.5 spec/page-object/elements/div_spec.rb
page-object-0.8.4 spec/page-object/elements/div_spec.rb
page-object-0.8.3 spec/page-object/elements/div_spec.rb
page-object-0.8.2 spec/page-object/elements/div_spec.rb
page-object-0.8.1 spec/page-object/elements/div_spec.rb
page-object-0.8 spec/page-object/elements/div_spec.rb
page-object-0.7.6 spec/page-object/elements/div_spec.rb
page-object-0.7.5.1 spec/page-object/elements/div_spec.rb
page-object-0.7.5 spec/page-object/elements/div_spec.rb
page-object-0.7.4 spec/page-object/elements/div_spec.rb
page-object-0.7.3 spec/page-object/elements/div_spec.rb
page-object-0.7.2 spec/page-object/elements/div_spec.rb
page-object-0.7.1 spec/page-object/elements/div_spec.rb
page-object-0.7.0 spec/page-object/elements/div_spec.rb
page-object-0.6.9 spec/page-object/elements/div_spec.rb