Class: Rutema::UI::VerticalTableFormatter

Inherits:
Ruport::Formatter::HTML
  • Object
show all
Defined in:
lib/rutemaweb/ruport_formatter.rb

Overview

Formats the test scenario data into a vertical folding structure

Instance Method Summary collapse

Instance Method Details

#build_row(data = self.data) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/rutemaweb/ruport_formatter.rb', line 23

def build_row(data = self.data)
  output << "<table class=\"vtable\"><colgroup><col width=\"100\"><col></colgroup>\n"
  output << "<tr><td>#{data['status']}</td><td colspan=\"2\"><h3>#{data['number']} - #{data['name']}</h3></td></tr>"
  output << "<tr><td>duration:</td><td>#{data['duration']}</td></tr>\n"
  %w(output error).each { |k| output << "<tr><td colspan=\"2\"><div onclick=\"toggleContentFolding(this)\">#{k} - click me<pre style=\"display:none;\">#{data.get(k)}</pre></div></td></tr>\n" if data.get(k).size > 0 }
  output << "</table>\n"
end

#build_table_bodyObject



11
12
13
14
15
# File 'lib/rutemaweb/ruport_formatter.rb', line 11

def build_table_body
  data.each do |row|
    build_row(row)
  end
end


20
21
# File 'lib/rutemaweb/ruport_formatter.rb', line 20

def build_table_footer
end

#build_table_headerObject



17
18
# File 'lib/rutemaweb/ruport_formatter.rb', line 17

def build_table_header
end