Sha256: 21296e8dbe81f363367ce967ec7ea3d14855235b8d81aa12c925b7bbe059f693

Contents?: true

Size: 861 Bytes

Versions: 7

Compression:

Stored size: 861 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'
        expect(identifier.keys.first).to eql 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'
        expect(key).to eql t
      end
    end

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

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
page-object-1.2.0 spec/page-object/elements/list_item_spec.rb
page-object-1.1.1 spec/page-object/elements/list_item_spec.rb
page_object-1.1.3 spec/page-object/elements/list_item_spec.rb
page_object-1.1.2 spec/page-object/elements/list_item_spec.rb
page_object-1.1.1 spec/page-object/elements/list_item_spec.rb
page-object-1.1.0 spec/page-object/elements/list_item_spec.rb
page-object-1.0.3 spec/page-object/elements/list_item_spec.rb