Sha256: f09684c8c8ac442df85fbfe06924df35eb5830e39196f7aef50fe2bdcce8bb47

Contents?: true

Size: 833 Bytes

Versions: 5

Compression:

Stored size: 833 Bytes

Contents

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

describe PageObject::Elements::Span do
  let(:span) { PageObject::Elements::Span }

  describe "when mapping how to find an element" do
    it "should map watir types to same" do
      [:class, :id, :index, :text, :title, :xpath].each do |t|
        identifier = span.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, :title, :xpath].each do |t|
        key, value = span.selenium_identifier_for t => 'value'
        expect(key).to eql t
      end
    end
  end

  it "should register with tag_name :span" do
    expect(::PageObject::Elements.element_class_for(:span)).to eql ::PageObject::Elements::Span
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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