Sha256: 64351b6989b3a8243ee3b1dbcecd103ce8396c8bf1d727f8918bddae61625aef

Contents?: true

Size: 812 Bytes

Versions: 7

Compression:

Stored size: 812 Bytes

Contents

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

describe PageObject::Elements::Bold do
  let(:bold) { PageObject::Elements::Bold }

  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 = bold.watir_identifier_for t => 'value'
        expect(identifier.keys.first).to eql t
      end
    end

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

  describe "interface" do

    it "should register with tag :b" do
      expect(::PageObject::Elements.element_class_for(:b)).to eql ::PageObject::Elements::Bold
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
page-object-1.2.0 spec/page-object/elements/bold_spec.rb
page-object-1.1.1 spec/page-object/elements/bold_spec.rb
page_object-1.1.3 spec/page-object/elements/bold_spec.rb
page_object-1.1.2 spec/page-object/elements/bold_spec.rb
page_object-1.1.1 spec/page-object/elements/bold_spec.rb
page-object-1.1.0 spec/page-object/elements/bold_spec.rb
page-object-1.0.3 spec/page-object/elements/bold_spec.rb