Sha256: 9914090e883d19dfda15ed8274726a1bca2cf88db52049da896ede6add098405

Contents?: true

Size: 880 Bytes

Versions: 38

Compression:

Stored size: 880 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, :text, :xpath, :value].each do |t|
        identifier = hiddenfield.watir_identifier_for t => 'value'
        identifier.keys.first.should == t
      end
    end

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

  describe "interface" do
    it "should register with type :hidden" do
      ::PageObject::Elements.element_class_for(:input, :hidden).should == ::PageObject::Elements::HiddenField
    end
  end
end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
meeane-page-object-0.1.11 spec/page-object/elements/hidden_field_spec.rb
page-object-1.0.2 spec/page-object/elements/hidden_field_spec.rb
page-object-1.0.1 spec/page-object/elements/hidden_field_spec.rb
page-object-1.0 spec/page-object/elements/hidden_field_spec.rb
page-object-0.9.8 spec/page-object/elements/hidden_field_spec.rb
page-object-0.9.7 spec/page-object/elements/hidden_field_spec.rb
page-object-0.9.6 spec/page-object/elements/hidden_field_spec.rb
page-object-0.9.5 spec/page-object/elements/hidden_field_spec.rb
page-object-0.9.4 spec/page-object/elements/hidden_field_spec.rb
page-object-0.9.3 spec/page-object/elements/hidden_field_spec.rb
page-object-0.9.2 spec/page-object/elements/hidden_field_spec.rb
page-object-0.9.1 spec/page-object/elements/hidden_field_spec.rb
page-object-0.9.0 spec/page-object/elements/hidden_field_spec.rb
page-object-0.8.10 spec/page-object/elements/hidden_field_spec.rb
page-object-0.8.9 spec/page-object/elements/hidden_field_spec.rb
page-object-0.8.8 spec/page-object/elements/hidden_field_spec.rb
page-object-0.8.7 spec/page-object/elements/hidden_field_spec.rb
page-object-0.8.6.1 spec/page-object/elements/hidden_field_spec.rb
page-object-0.8.6 spec/page-object/elements/hidden_field_spec.rb
page-object-0.8.5 spec/page-object/elements/hidden_field_spec.rb