Sha256: 5d1a7408fa8a0e46f99c885e9571d6cc6aaa1f71e0bb19aecf1f91148c17ca05

Contents?: true

Size: 822 Bytes

Versions: 7

Compression:

Stored size: 822 Bytes

Contents

require 'spec_helper'
require 'page-object/elements'

describe PageObject::Elements::Form do
  describe "interface" do
    let(:form_element) { double('form_element') }

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

    context "for watir" do
      it "should submit a form" do
        form = PageObject::Elements::Form.new(form_element, :platform => :watir_webdriver)
        expect(form_element).to receive(:submit)
        form.submit
      end
    end

    context "for selenium" do
      it "should submit a form" do
        form = PageObject::Elements::Form.new(form_element, :platform => :selenium_webdriver)
        expect(form_element).to receive(:submit)
        form.submit
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
page-object-1.2.0 spec/page-object/elements/form_spec.rb
page-object-1.1.1 spec/page-object/elements/form_spec.rb
page_object-1.1.3 spec/page-object/elements/form_spec.rb
page_object-1.1.2 spec/page-object/elements/form_spec.rb
page_object-1.1.1 spec/page-object/elements/form_spec.rb
page-object-1.1.0 spec/page-object/elements/form_spec.rb
page-object-1.0.3 spec/page-object/elements/form_spec.rb