Sha256: 521c2f2330bd8aa0b65c4d02ac55fc7a0fe5f1d3ab0a6b058665f1d0028992ac

Contents?: true

Size: 968 Bytes

Versions: 6

Compression:

Stored size: 968 Bytes

Contents

require 'spec_helper'

describe Symbiont::WebObjects::Button do
  describe "implementation" do
    let(:button_object) { double('button_object') }
    let(:button) { Symbiont::WebObjects::Button }
    
    it "should reference standard usable selectors" do
      [:class, :id, :name, :index, :xpath].each do |s|
        locator = button.provide_locator_for s => 'value'
        locator.keys.first.should == s
      end
    end
    
    it "should reference specific usable selectors" do
      [:value, :text].each do |s|
        locator = button.provide_locator_for s => 'value'
        locator.keys.first.should == s
      end
    end
    
    it "should register with a submit type" do
      ::Symbiont::WebObjects.get_class_for(:input, :submit).should == ::Symbiont::WebObjects::Button
    end
    
    it "should register with a button type" do
      ::Symbiont::WebObjects.get_class_for(:input, :button).should == ::Symbiont::WebObjects::Button
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
symbiont-0.1.9 spec/symbiont/web_objects/button_spec.rb
symbiont-0.1.8 spec/symbiont/web_objects/button_spec.rb
symbiont-0.1.7 spec/symbiont/web_objects/button_spec.rb
symbiont-0.1.6 spec/symbiont/web_objects/button_spec.rb
symbiont-0.1.5 spec/symbiont/web_objects/button_spec.rb
symbiont-0.1.4 spec/symbiont/web_objects/button_spec.rb