Sha256: b838249f639696e914b30335ed503bc1a5600a840308c41cb3e29818d28cd744

Contents?: true

Size: 807 Bytes

Versions: 25

Compression:

Stored size: 807 Bytes

Contents

# encoding: utf-8
require File.expand_path("../spec_helper", __FILE__)

describe "Dds" do

  before :each do
    browser.goto(WatirSpec.files + "/definition_lists.html")
  end

  describe "#length" do
    it "returns the number of dds" do
      browser.dds.length.should == 11
    end
  end

  describe "#[]" do
    it "returns the dd at the given index" do
      browser.dds[2].title.should == "education"
    end
  end

  describe "#each" do
    it "iterates through dds correctly" do
      count = 0

      browser.dds.each_with_index do |d, index|
        d.name.should == browser.dd(:index, index+1).name
        d.id.should == browser.dd(:index, index+1).id
        d.class_name.should == browser.dd(:index, index+1).class_name

        count += 1
      end

      count.should > 0
    end
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
operawatir-0.7.pre4-jruby spec/watir2/dds_spec.rb
operawatir-0.7.pre3-jruby spec/watir2/dds_spec.rb
operawatir-0.7.pre2-jruby spec/watir2/dds_spec.rb
operawatir-0.7.pre1-jruby spec/watir2/dds_spec.rb
operawatir-0.6.pre1-jruby spec/watir2/dds_spec.rb
operawatir-0.5.1-jruby spec/watir2/dds_spec.rb
operawatir-0.5-jruby spec/watir2/dds_spec.rb
operawatir-0.5.pre3-jruby spec/watir2/dds_spec.rb
operawatir-0.5.pre2-jruby spec/watir2/dds_spec.rb
operawatir-0.5.pre1-jruby spec/watir2/dds_spec.rb
operawatir-0.4.3.pre1-jruby spec/watir2/dds_spec.rb
operawatir-0.4.2-jruby spec/watir2/dds_spec.rb
operawatir-0.4.1-jruby spec/watir2/dds_spec.rb
operawatir-0.4.1.pre7-jruby spec/watir2/dds_spec.rb
operawatir-0.4.1.pre6-jruby spec/watir2/dds_spec.rb
operawatir-0.4.1.pre5-jruby spec/watir2/dds_spec.rb
operawatir-0.4.1.pre4-jruby spec/watir2/dds_spec.rb
operawatir-0.4.1.pre3-jruby spec/watir2/dds_spec.rb
operawatir-0.4.1.pre2-jruby spec/watir2/dds_spec.rb
operawatir-0.4.1.pre1-jruby spec/watir2/dds_spec.rb