Sha256: fe8c99a1e86b4aee50ad1418a1dd9899e1e351fd8686098fb089a6e4475272bc

Contents?: true

Size: 776 Bytes

Versions: 7

Compression:

Stored size: 776 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, :xpath].each do |t|
        identifier = span.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 = span.selenium_identifier_for t => 'value'
        key.should == t
      end
    end
  end

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
page-object-0.6.5 spec/page-object/elements/span_spec.rb
page-object-0.6.4 spec/page-object/elements/span_spec.rb
page-object-0.6.3 spec/page-object/elements/span_spec.rb
page-object-0.6.2 spec/page-object/elements/span_spec.rb
page-object-0.6.1 spec/page-object/elements/span_spec.rb
page-object-0.6 spec/page-object/elements/span_spec.rb
page-object-0.5.5 spec/page-object/elements/span_spec.rb