Sha256: 5193790a5fc3be4ee9764f14a12c4e0bf428da01211d8ce59f5124662b723d3b

Contents?: true

Size: 850 Bytes

Versions: 2

Compression:

Stored size: 850 Bytes

Contents

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

describe PageObject::Elements::Label do
  let(:label) { PageObject::Elements::Label }

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

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

    describe "interface" do
      it "should register with tag :label" do
        ::PageObject::Elements.element_class_for(:label).should == ::PageObject::Elements::Label
      end
    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/label_spec.rb
meeane-page-object-0.1.8 spec/page-object/elements/label_spec.rb