Sha256: 4f90f2e6993b9baf1bf9a05fc3a5b5bdfbdf822c579b75e903f0edafab05a8b3

Contents?: true

Size: 1.28 KB

Versions: 12

Compression:

Stored size: 1.28 KB

Contents

# encoding: utf-8
require File.dirname(__FILE__) + '/spec_helper'

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, 0).tfoots.length.should == 1
      end
    end

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

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

    describe "#each" do
      it "iterates through table tfoots correctly (page context)" do
        browser.tfoots.each_with_index do |tfoot, index|
          tfoot.id.should == browser.tfoot(:index, index).id
        end
      end

      it "iterates through table tfoots correctly (table context)" do
        table = browser.table(:index, 0)
        table.tfoots.each_with_index do |tfoot, index|
          tfoot.id.should == table.tfoot(:index, index).id
        end
      end
    end
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
watir-webdriver-0.0.6 spec/watirspec/table_footers_spec.rb
watir-webdriver-0.0.5 spec/watirspec/table_footers_spec.rb
watir-webdriver-0.0.4 spec/watirspec/table_footers_spec.rb
watir-webdriver-0.0.3 spec/watirspec/table_footers_spec.rb
watir-webdriver-0.0.2 spec/watirspec/table_footers_spec.rb
watir-webdriver-0.0.1 spec/watirspec/table_footers_spec.rb
watir-webdriver-0.0.1.dev7 spec/watirspec/table_footers_spec.rb
watir-webdriver-0.0.1.dev5 spec/watirspec/table_footers_spec.rb
watir-webdriver-0.0.1.dev4 spec/watirspec/table_footers_spec.rb
watir-webdriver-0.0.1.dev3 spec/watirspec/table_footers_spec.rb
watir-webdriver-0.0.1.dev2 spec/watirspec/table_footers_spec.rb
watir-webdriver-0.0.1.dev spec/watirspec/table_footers_spec.rb