Sha256: f4e2661d008c938e4ade7f5c84a69d8f536a22f229da2e16fbbef7f4c3cd7f28

Contents?: true

Size: 836 Bytes

Versions: 7

Compression:

Stored size: 836 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'
        expect(identifier.keys.first).to eql 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'
        expect(key).to eql t
      end
    end

    describe "interface" do
      it "should register with tag :label" do
        expect(::PageObject::Elements.element_class_for(:label)).to eql ::PageObject::Elements::Label
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

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