<commit_before><% test_script_results = test_run.test_script_results %>
<div class='test-run'>
  <h3>
    <span class='right'>
      <%= l(test_run.created_at, format: :long) %>
      <%= "(#{test_run.user.user_name})" %>
    </span>
  </h3>
  <% if test_run.created_at == latest_date %>
    <%= link_to 'Hide Results', 'javascript:void(0)', onclick: 'toggleResult(this);', class: 'collapse'%>
  <% else %>
    <%= link_to 'Show Results', 'javascript:void(0)', onclick: 'toggleResult(this);', class: 'expand' %>
  <% end %>
  <div id="<%=test_run.created_at.to_s.delete(' ')%>">
    <% if test_script_results.empty? %>
      TODO Test run is enqueued for execution (or lost) + button to stop it
    <% else %>
      <div id="test_results" class="sub_block"><commit_msg>Added button for stopping tests<commit_after><% test_script_results = test_run.test_script_results %>
<div class='test-run'>
  <h3>
    <span class='right'>
      <%= l(test_run.created_at, format: :long) %>
      <%= "(#{test_run.user.user_name})" %>
    </span>
  </h3>
  <% if test_run.created_at == latest_date %>
    <%= link_to 'Hide Results', 'javascript:void(0)', onclick: 'toggleResult(this);', class: 'collapse'%>
  <% else %>
    <%= link_to 'Show Results', 'javascript:void(0)', onclick: 'toggleResult(this);', class: 'expand' %>
  <% end %>
  <div id="<%=test_run.created_at.to_s.delete(' ')%>">
    <% if test_script_results.empty? %>
      Test run with id <%= test_run.id.to_s %> is in progress .. (created at: <%= test_run.created_at.to_s %>)

      <%= link_to t('automated_tests.stop_tests') ,
                  stop_tests_assignment_submission_result_path + "?test_run_id=" + test_run.id.to_s,
                  class: 'button stop_tests left' %>
    <% else %>
      <div id="test_results" class="sub_block">
{'fraction_non_alphanumeric': 0.19299221357063404, 'fraction_numerical': 0.004449388209121246, 'mean_word_length': 3.849056603773585, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 42, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5385660', 'n_tokens_mistral': 677, 'n_tokens_neox': 631, 'n_words': 122}