Skip to content

Commit

Permalink
Show results as a table
Browse files Browse the repository at this point in the history
  • Loading branch information
bitscraps committed Feb 28, 2021
1 parent d80f483 commit 0cc95bf
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
3 changes: 3 additions & 0 deletions app/assets/stylesheets/global.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
html, body {
font-family: 'Source Code Pro', monospace;
}
31 changes: 24 additions & 7 deletions app/views/failures/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
<%= link_to 'download as CSV', failures_path(format: :csv) %>

<% @failures.each do |failure| %>
<h1><%= failure.test_name %></h1>
<h2><%= failure.test_file %>:<%= failure.line_number %></h2>
<p>
<%= simple_format(failure.failure) %>
</p>
<% end %>
<table>
<thead>
<tr>
<td>Project</td>
<td>Build #</td>
<td>Branch</td>
<td>Job</td>
<td>Test</td>
<td>File</td>
</tr>tr>
</thead>
<tbody>
<% @failures.each do |failure| %>
<tr>
<td><%= failure.repo_name %></td>
<td><%= failure.build_number %></td>
<td><%= failure.branch %></td>
<td><%= failure.circle_job %></td>
<td><%= failure.test_name %></td>
<td><%= failure.test_file %>:<%= failure.line_number %></td>
</tr>tr>
<% end %>
</tbody>
</table>
4 changes: 4 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>

<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap" rel="stylesheet">

</head>

<body>
Expand Down

0 comments on commit 0cc95bf

Please sign in to comment.