Sha256: 73eb7bd915b200c0bb7b8587e597735fae60ce52df5599cdc477561d371960bd

Contents?: true

Size: 864 Bytes

Versions: 2

Compression:

Stored size: 864 Bytes

Contents

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

describe PageObject::Elements::Paragraph do
  let(:paragraph) { PageObject::Elements::Paragraph }

  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 = paragraph.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].each do |t|
        key, value = paragraph.selenium_identifier_for t => 'value'
        key.should == t
      end
    end
  end
  
  describe "interface" do

    it "should register with type :checkbox" do
      ::PageObject::Elements.element_class_for(:p).should == ::PageObject::Elements::Paragraph
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
meeane-page-object-0.1.10 spec/page-object/elements/paragraph_spec.rb
meeane-page-object-0.1.8 spec/page-object/elements/paragraph_spec.rb