Sha256: 3e437ce9fe3930e1f2cc2cfbcde4c309470372f68d442b36981cdc582a670cf1

Contents?: true

Size: 771 Bytes

Versions: 3

Compression:

Stored size: 771 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].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

3 entries across 3 versions & 1 rubygems

Version Path
druid-ts-1.1.2 spec/druid/elements/link_spec.rb
druid-ts-1.1.1 spec/druid/elements/link_spec.rb
druid-ts-1.1.0 spec/druid/elements/link_spec.rb