Sha256: c6277fd53a2e0b678a4c34302c9a23c6a536ba915aa4b64523a7750aa5f2b14d

Contents?: true

Size: 785 Bytes

Versions: 5

Compression:

Stored size: 785 Bytes

Contents

require 'spec_helper'
require 'druid/elements'

describe Druid::Elements::Link do
  describe "when mapping how to find an element" do
    it "should map watir types to same" do
      [:class, :href, :id, :name, :text, :xpath, :css, :title].each do |t|
        identifier = Druid::Elements::Link.identifier_for t => 'value'
        expect(identifier.keys.first).to eql t
      end
    end

    it "should map selenium types to watir" do
      [:link, :link_text].each do |t|
        identifier = Druid::Elements::Link.identifier_for t => 'value'
        expect(identifier.keys.first).to eql :text
      end
    end
  end

  describe "interface" do
    it "should register with tag :a" do
      expect(Druid::Elements.element_class_for(:a)).to be Druid::Elements::Link
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
druid-ts-1.1.8 spec/druid/elements/link_spec.rb
druid-ts-1.1.7 spec/druid/elements/link_spec.rb
druid-ts-1.1.6 spec/druid/elements/link_spec.rb
druid-ts-1.1.5 spec/druid/elements/link_spec.rb
druid-ts-1.1.4 spec/druid/elements/link_spec.rb