Sha256: 1f839544165ea8274e93130e8494c7729bf6d1eb4a33ca1d91c58fbed47db8a8

Contents?: true

Size: 1.5 KB

Versions: 44

Compression:

Stored size: 1.5 KB

Contents

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

describe PageObject::Elements::Heading do
  let(:heading) { PageObject::Elements::Heading }

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

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

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

    it "should register with tag :h2" do
      ::PageObject::Elements.element_class_for(:h2).should == ::PageObject::Elements::Heading
    end

    it "should register with tag :h3" do
      ::PageObject::Elements.element_class_for(:h3).should == ::PageObject::Elements::Heading
    end

    it "should register with tag :h4" do
      ::PageObject::Elements.element_class_for(:h4).should == ::PageObject::Elements::Heading
    end

    it "should register with tag :h5" do
      ::PageObject::Elements.element_class_for(:h5).should == ::PageObject::Elements::Heading
    end

    it "should register with tag :h6" do
      ::PageObject::Elements.element_class_for(:h6).should == ::PageObject::Elements::Heading
    end
  end
end

Version data entries

44 entries across 44 versions & 2 rubygems

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