Sha256: b7d2357a4a938ce5fd5f5c2e32374e78446f29d6d54ca0ba0d5cc60df31ad78b

Contents?: true

Size: 845 Bytes

Versions: 31

Compression:

Stored size: 845 Bytes

Contents

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

describe PageObject::Elements::ListItem do
  let(:list_item) { PageObject::Elements::ListItem }

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

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

    describe "interface" do
      it "should register as tag_name :li" do
        ::PageObject::Elements.element_class_for(:li).should == ::PageObject::Elements::ListItem
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
meeane-page-object-0.1.11 spec/page-object/elements/list_item_spec.rb
page-object-1.0.2 spec/page-object/elements/list_item_spec.rb
page-object-1.0.1 spec/page-object/elements/list_item_spec.rb
page-object-1.0 spec/page-object/elements/list_item_spec.rb
page-object-0.9.8 spec/page-object/elements/list_item_spec.rb
page-object-0.9.7 spec/page-object/elements/list_item_spec.rb
page-object-0.9.6 spec/page-object/elements/list_item_spec.rb
page-object-0.9.5 spec/page-object/elements/list_item_spec.rb
page-object-0.9.4 spec/page-object/elements/list_item_spec.rb
page-object-0.9.3 spec/page-object/elements/list_item_spec.rb
page-object-0.9.2 spec/page-object/elements/list_item_spec.rb
page-object-0.9.1 spec/page-object/elements/list_item_spec.rb
page-object-0.9.0 spec/page-object/elements/list_item_spec.rb
page-object-0.8.10 spec/page-object/elements/list_item_spec.rb
page-object-0.8.9 spec/page-object/elements/list_item_spec.rb
page-object-0.8.8 spec/page-object/elements/list_item_spec.rb
page-object-0.8.7 spec/page-object/elements/list_item_spec.rb
page-object-0.8.6.1 spec/page-object/elements/list_item_spec.rb
page-object-0.8.6 spec/page-object/elements/list_item_spec.rb
page-object-0.8.5 spec/page-object/elements/list_item_spec.rb