Sha256: c0b4c008b50199bbdcf473d894d286b05f0b9cccd8a4a01a88f0889fc9e2f6ab

Contents?: true

Size: 890 Bytes

Versions: 5

Compression:

Stored size: 890 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

5 entries across 5 versions & 1 rubygems

Version Path
page-object-lds-0.0.14 spec/page-object/elements/list_item_spec.rb
page-object-lds-0.0.13 spec/page-object/elements/list_item_spec.rb
page-object-lds-0.0.12 spec/page-object/elements/list_item_spec.rb
page-object-lds-0.0.11 spec/page-object/elements/list_item_spec.rb
page-object-lds-0.0.1 spec/page-object/elements/list_item_spec.rb