Sha256: 753531daab196e3f293aef1d9e8d0e641421f5a3f018cbaa49df89d66f8feea6

Contents?: true

Size: 777 Bytes

Versions: 1

Compression:

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

1 entries across 1 versions & 1 rubygems

Version Path
druid-ts-1.1.3 spec/druid/elements/link_spec.rb