Sha256: 504c9f119e0d73bee7dcc7c0dec9a49846c2c2273209eaa8f329ea9a529dc245

Contents?: true

Size: 1012 Bytes

Versions: 18

Compression:

Stored size: 1012 Bytes

Contents

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

describe PageObject::Elements::HiddenField do
  let(:hiddenfield) { PageObject::Elements::HiddenField }

  describe "when mapping how to find an element" do
    it "should map watir types to same" do
      [:class, :id, :index, :name, :tag_name, :text, :xpath].each do |t|
        identifier = hiddenfield.watir_identifier_for t => 'value'
        identifier.keys.first.should == t
      end
    end

    it "should map selenium types to watir" do
      identifier = hiddenfield.watir_identifier_for :css => 'value'
      identifier.keys.first.should == :tag_name
    end

    it "should map selenium types to same" do
      [:class, :css, :id, :name, :xpath, :index].each do |t|
        key, value = hiddenfield.selenium_identifier_for t => 'value'
        key.should == t
      end
    end

    it "should map watir types to selenium" do
      key, value = hiddenfield.selenium_identifier_for :tag_name => 'value'
      key.should == :css
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
page-object-0.5.4 spec/page-object/elements/hidden_field_spec.rb
page-object-0.5.3 spec/page-object/elements/hidden_field_spec.rb
page-object-0.5.2 spec/page-object/elements/hidden_field_spec.rb
page-object-0.5.1 spec/page-object/elements/hidden_field_spec.rb
page-object-0.5.0 spec/page-object/elements/hidden_field_spec.rb
page-object-0.4.4 spec/page-object/elements/hidden_field_spec.rb
page-object-0.4.3 spec/page-object/elements/hidden_field_spec.rb
page-object-0.4.2 spec/page-object/elements/hidden_field_spec.rb
page-object-0.4.1 spec/page-object/elements/hidden_field_spec.rb
page-object-0.4.0 spec/page-object/elements/hidden_field_spec.rb
page-object-0.3.2 spec/page-object/elements/hidden_field_spec.rb
page-object-0.3.1 spec/page-object/elements/hidden_field_spec.rb
page-object-0.3.0 spec/page-object/elements/hidden_field_spec.rb
page-object-0.2.5 spec/page-object/elements/hidden_field_spec.rb
page-object-0.2.4 spec/page-object/elements/hidden_field_spec.rb
page-object-0.2.3 spec/page-object/elements/hidden_field_spec.rb
page-object-0.2.2 spec/page-object/elements/hidden_field_spec.rb
page-object-0.2.1 spec/page-object/elements/hidden_field_spec.rb