Sha256: 53a187c3477e3192ed18758d77733da3faec9382fd1973c0023293fb84c8a3bd

Contents?: true

Size: 999 Bytes

Versions: 6

Compression:

Stored size: 999 Bytes

Contents

require 'spec_helper'

describe Symbiont::WebObjects::Link do
  describe "implementation" do
    let(:link_object) { double('link_object') }
    let(:link) { Symbiont::WebObjects::Link }
    
    it "should reference standard usable selectors" do
      [:class, :id, :name, :index, :xpath].each do |s|
        locator = link.provide_locator_for s => 'value'
        locator.keys.first.should == s
      end
    end
    
    it "should reference specific usable selectors" do
      [:href, :text, :title, :css].each do |s|
        locator = link.provide_locator_for s => 'value'
        locator.keys.first.should == s
      end
    end
    
    it "should reference mappable selectors" do
      [:link, :link_text].each do |s|
        locator = link.provide_locator_for s => 'value'
        locator.keys.first.should == :text
      end
    end
    
    it "should register with an anchor tag" do
      ::Symbiont::WebObjects.get_class_for(:a).should == ::Symbiont::WebObjects::Link
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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