Sha256: 41a01382b024244826171d3395391e0a400c3928c9789681669ed35b3f5b532f

Contents?: true

Size: 756 Bytes

Versions: 12

Compression:

Stored size: 756 Bytes

Contents

require 'spec_helper'
require 'druid/elements'

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

  describe "interface" do
    let(:element) { double 'element' }
    let(:form) { Druid::Elements::Form.new(element) }

    it "should submit a form" do
      expect(element).to receive(:submit)
      form.submit
    end

    it "should register with tag_name :form" do
       expect(Druid::Elements.element_class_for(:form)).to be Druid::Elements::Form
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
druid-ts-1.2.2 spec/druid/elements/form_spec.rb
druid-ts-1.2.1 spec/druid/elements/form_spec.rb
druid-ts-1.2.0 spec/druid/elements/form_spec.rb
druid-ts-1.1.8 spec/druid/elements/form_spec.rb
druid-ts-1.1.7 spec/druid/elements/form_spec.rb
druid-ts-1.1.6 spec/druid/elements/form_spec.rb
druid-ts-1.1.5 spec/druid/elements/form_spec.rb
druid-ts-1.1.4 spec/druid/elements/form_spec.rb
druid-ts-1.1.3 spec/druid/elements/form_spec.rb
druid-ts-1.1.2 spec/druid/elements/form_spec.rb
druid-ts-1.1.1 spec/druid/elements/form_spec.rb
druid-ts-1.1.0 spec/druid/elements/form_spec.rb