class Wrapybara::TableHead

Attributes

element[R]
parent[R]

Public Class Methods

new(table) click to toggle source
# File lib/wrapybara/elements/table_head.rb, line 7
def initialize(table)
        @parent = table
        @element = table.element.find('thead') rescue nil
end

Public Instance Methods

cell(*args) click to toggle source
# File lib/wrapybara/elements/table_head.rb, line 20
def cell(*args)
        TableCell.new(self, args)
end
has_column?(label) click to toggle source
# File lib/wrapybara/elements/table_head.rb, line 24
def has_column?(label)
        self.cell(label).exists?
end
should_exist() click to toggle source
Calls superclass method Wrapybara::Element#should_exist
# File lib/wrapybara/elements/table_head.rb, line 12
def should_exist
        super "Expected table #{self.parent_identifier} to have a head"
end
should_have_cells(labels) click to toggle source
# File lib/wrapybara/elements/table_head.rb, line 28
def should_have_cells(labels)
        labels.each do |label|
                self.cell(label).should_exist
        end
end
should_not_exist() click to toggle source
Calls superclass method Wrapybara::Element#should_not_exist
# File lib/wrapybara/elements/table_head.rb, line 16
def should_not_exist
        super "Did not expect table #{self.parent_identifier} to have a head"
end
should_not_have_cells(labels) click to toggle source
# File lib/wrapybara/elements/table_head.rb, line 34
def should_not_have_cells(labels)
        labels.each do |label|
                self.cell(label).should_not_exist
        end
end