Sha256: 526331fb040d6dd77bff2743bee6b3ac34c34a795c7a146d5a8458a169e7320c

Contents?: true

Size: 1.55 KB

Versions: 25

Compression:

Stored size: 1.55 KB

Contents

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

bug "WTR-358", :watir do

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

    describe "#length" do
      it "returns the correct number of table tfoots (page context)" do
        browser.tfoots.length.should == 1
      end

      it "returns the correct number of table tfoots (table context)" do
        browser.table(:index, 1).tfoots.length.should == 1
      end
    end

    describe "#[]" do
      it "returns the row at the given index (page context)" do
        browser.tfoots[1].id.should == "tax_totals"
      end

      it "returns the row at the given index (table context)" do
        browser.table(:index, 1).tfoots[1].id.should == "tax_totals"
      end
    end

    describe "#each" do
      it "iterates through table tfoots correctly (page context)" do
        count = 0

        browser.tfoots.each_with_index do |tfoot, index|
          tfoot.name.should == browser.tfoot(:index, index+1).name
          tfoot.id.should == browser.tfoot(:index, index+1).id

          count += 1
        end

        count.should > 0
      end

      it "iterates through table tfoots correctly (table context)" do
        table = browser.table(:index, 1)
        count = 0

        table.tfoots.each_with_index do |tfoot, index|
          tfoot.name.should == table.tfoot(:index, index+1).name
          tfoot.id.should == table.tfoot(:index, index+1).id

          count += 1
        end

        count.should > 0
      end
    end
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

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