Sha256: dab1e227ca7d2e7112eb3f466e37977dca1c5e595441e2647bff429d17581344

Contents?: true

Size: 807 Bytes

Versions: 7

Compression:

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

7 entries across 7 versions & 2 rubygems

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