Sha256: 420809edc14d05c532da3b152b893665703c9716b368090c529e54394aad4779

Contents?: true

Size: 1.19 KB

Versions: 12

Compression:

Stored size: 1.19 KB

Contents

require 'spec_helper'
require 'druid/elements'

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

  describe "interface" do
    it "should register with tag :h1" do
      expect(Druid::Elements.element_class_for(:h1)).to be Druid::Elements::Heading
    end

    it "should register with tag :h2" do
      expect(Druid::Elements.element_class_for(:h2)).to be Druid::Elements::Heading
    end

    it "should register with tag :h3" do
      expect(Druid::Elements.element_class_for(:h3)).to be Druid::Elements::Heading
    end

    it "should register with tag :h4" do
      expect(Druid::Elements.element_class_for(:h4)).to be Druid::Elements::Heading
    end

    it "should register with tag :h5" do
      expect(Druid::Elements.element_class_for(:h5)).to be Druid::Elements::Heading
    end

    it "should register with tag :h6" do
      expect(Druid::Elements.element_class_for(:h6)).to be Druid::Elements::Heading
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

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