Sha256: d88a5f9cf15c9c3937bc05cbbfba17bb328bb59aaebab7588a1d2f63b70ad5e6

Contents?: true

Size: 1.84 KB

Versions: 67

Compression:

Stored size: 1.84 KB

Contents

<%# Partial template used to display a status.
  # Expects the following variables to be set:
  # * *@status_test_name* (String): The test name
  # * *@status_test_criteria* (Hash<Symbol,Object>): The test criteria (options to give to the signatures of methods retrieving test data, like errors_for)
  # * *@max_errors* (Integer): Number max of errors to be displayed
%>
<% if should_have_been_tested?(@status_test_name, **@status_test_criteria) %>
  <%
    errors = errors_for(@status_test_name, **@status_test_criteria)
    color, title =
      if missing_tests_for(@status_test_name, **@status_test_criteria)
        ['Grey', 'Not run']
      elsif errors.empty?
        ['Green', 'Success']
      elsif select_tests(@status_test_name, **@status_test_criteria).any? { |test| test.expected_failure.nil? && !test.errors.empty? }
        ['Red', 'Errors']
      else
        ['Yellow', 'Expected errors']
      end
  %>
  <div class="content-wrapper">
    <p>
      <ac:structured-macro ac:name="status" ac:schema-version="1">
        <ac:parameter ac:name="colour"><%= color %></ac:parameter>
        <ac:parameter ac:name="title"><%= title %></ac:parameter>
      </ac:structured-macro>
      <% unless errors.empty? %>
        <ac:structured-macro ac:name="expand" ac:schema-version="1">
          <ac:parameter ac:name="title">Errors</ac:parameter>
          <ac:rich-text-body>
            <div style="text-align: left;">
              <ul>
                <% errors[0..@max_errors - 1].each do |error| %>
                  <li><%= CGI.escapeHTML(error[0..@max_error_message_length - 1]) %></li>
                <% end %>
                <% if errors.size > @max_errors %>
                  <li>...</li>
                <% end %>
              </ul>
            </div>
          </ac:rich-text-body>
        </ac:structured-macro>
      <% end %>
    </p>
  </div>
<% end %>

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
hybrid_platforms_conductor-33.9.5 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.9.4 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.9.2 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.9.1 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.9.0 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.8.4 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.8.3 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.8.2 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.8.1 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.8.0 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.7.4 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.7.3 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.7.2 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.7.1 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.7.0 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.6.0 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.5.1 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.5.0 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.4.0 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb
hybrid_platforms_conductor-33.3.0 lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/_confluence_errors_status.html.erb