Sha256: 00aaaa390977851305beeeb9c53117ef318b1fb75e8ca86ce16dbfba463f9ec0

Contents?: true

Size: 994 Bytes

Versions: 3

Compression:

Stored size: 994 Bytes

Contents

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

describe PageObject::Elements::TextArea do
  let(:textarea) { PageObject::Elements::TextArea }
  
  describe "when mapping how to find an element" do
    it "should map watir types to same" do
      [:class, :id, :index, :name, :tag_name, :xpath].each do |t|
        identifier = textarea.watir_identifier_for t => 'value'
        identifier.keys.first.should == t
      end
    end

    it "should map selenium types to watir" do
      identifier = textarea.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 = textarea.selenium_identifier_for t => 'value'
        key.should == t
      end
    end
    
    it "should map watir types to selenium" do
      key, value = textarea.selenium_identifier_for :tag_name => 'value'
      key.should == :css
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
page-object-0.2 spec/page-object/elements/text_area_spec.rb
page-object-0.1.1 spec/page-object/elements/text_area_spec.rb
page-object-0.1 spec/page-object/elements/text_area_spec.rb