Sha256: 8eea0c7a1929cb59f0e443b7814b8634f0b02e9c516d2ab13df1853fb08fe1a1

Contents?: true

Size: 846 Bytes

Versions: 16

Compression:

Stored size: 846 Bytes

Contents

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

describe PageObject::Elements::Div do
  let(:div) { PageObject::Elements::Div }

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

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

    describe "interface" do
      it "should register with tag :div" do
        ::PageObject::Elements.element_class_for(:div).should == ::PageObject::Elements::Div
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

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