Sha256: 31cc9c81f7cef8992034a0f89b4e155f9f1f6ac23d70ddcc88628bc1707e6d4c

Contents?: true

Size: 1.01 KB

Versions: 9

Compression:

Stored size: 1.01 KB

Contents

require 'spec_helper'
require 'druid/elements'

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

  describe "interface" do
    it "should register with type :submit" do
      expect(Druid::Elements.element_class_for(:input, :submit)).to be Druid::Elements::Button
    end

    it "should register with type :image" do
      expect(Druid::Elements.element_class_for(:input, :image)).to be Druid::Elements::Button
    end

    it "should register with type :button" do
      expect(Druid::Elements.element_class_for(:input, :button)).to be Druid::Elements::Button
    end

    it "should register with type :reset" do
      expect(Druid::Elements.element_class_for(:input, :reset)).to be Druid::Elements::Button
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
druid-ts-1.2.2 spec/druid/elements/button_spec.rb
druid-ts-1.2.1 spec/druid/elements/button_spec.rb
druid-ts-1.2.0 spec/druid/elements/button_spec.rb
druid-ts-1.1.8 spec/druid/elements/button_spec.rb
druid-ts-1.1.7 spec/druid/elements/button_spec.rb
druid-ts-1.1.6 spec/druid/elements/button_spec.rb
druid-ts-1.1.5 spec/druid/elements/button_spec.rb
druid-ts-1.1.4 spec/druid/elements/button_spec.rb
druid-ts-1.1.3 spec/druid/elements/button_spec.rb