Sha256: bb71d6036aec9a472e1209d80336474cfb6ff61ec24cb1d018de46714a34f03f

Contents?: true

Size: 1.05 KB

Versions: 10

Compression:

Stored size: 1.05 KB

Contents

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

describe "Table" do

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

  describe "#locate" do
    it "is not nil for existing tables" do
      browser.table(:id, 'axis_example').locate.should_not be_nil
    end
  end

  it "finds table data cells through #parent" do
    browser.span(:id => "cell-child").parent.should be_kind_of(Celerity::TableCell)
  end

  describe "#cells" do
    it "doesn't find cells in nested tables" do
      browser.table(:id => "outer").cells.length.should == 6
    end

    it "doesn't find cells in nested tables (for rows)" do
      browser.table(:id => "outer").row(:id => "outer_second").cells.length.should == 2
    end
  end

  describe "#tds" do
    it "doesn't find cells in nested tables" do
      browser.table(:id => "outer").tds.length.should == 6
    end

    it "doesn't find cells in nested tables (for rows)" do
      browser.table(:id => "outer").row(:id => "outer_second").tds.length.should == 2
    end
  end

end

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
celerity_thingista-0.9.3 spec/table_spec.rb
celerity_thingista-0.9.2 spec/table_spec.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/spec/table_spec.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/spec/table_spec.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/spec/table_spec.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/spec/table_spec.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/spec/table_spec.rb
celerity-0.9.2 spec/table_spec.rb
celerity-0.9.1 spec/table_spec.rb
no-click-exception-celerity-0.9.0 spec/table_spec.rb