Sha256: 2d7fe6e385c2504e5dec3e327c9b7f1ce2bb81a3e7c60d6c7228c2cc9af34956

Contents?: true

Size: 1016 Bytes

Versions: 2

Compression:

Stored size: 1016 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

2 entries across 2 versions & 1 rubygems

Version Path
symbiont-0.2.1 spec/symbiont/web_objects/link_spec.rb
symbiont-0.2.0 spec/symbiont/web_objects/link_spec.rb