Add tests
Some checks failed
/ Text (push) Failing after 15s
/ Checkout (push) Successful in 1m3s

This commit is contained in:
david 2024-07-22 22:40:56 +02:00
parent 363dfaa7d3
commit cdea0e1218
14 changed files with 116 additions and 52 deletions

View file

@ -21,7 +21,7 @@
<i class="bi bi-pencil text-warning"></i>
<% end %>
</h3>
<%= link_to tag.i(class: "bi bi-#{edit_mode ? "pencil" : "pencil"}"), edit_mode ? success_criterion : [:edit, success_criterion], class: "btn btn-#{edit_mode ? "link text-warning" : "link text-secondary"}" %>
<%= success_criterion_edit_button(success_criterion, edit_mode) %>
<div class="flex-fill d-flex justify-content-end">
<button class="btn btn-link text-body"
data-controller="collapse-chevron-toggler"

View file

@ -0,0 +1 @@
<%= turbo_stream.delete dom_id(@success_criterion) %>

View file

@ -27,13 +27,13 @@
<td><%= link_to(success_criterion.title, url_for(success_criterion)) %></td>
<td><%= link_to(truncate(strip_tags(success_criterion.description_html)), url_for(success_criterion)) %></td>
<td><%= link_to(truncate(success_criterion.description_html.to_plain_text), url_for(success_criterion)) %></td>
<td><%= link_to(success_criterion.level, url_for(success_criterion)) %></td>
<td><%= link_to(success_criterion.result, url_for(success_criterion)) %></td>
<td><%= link_to(truncate(strip_tags(success_criterion.comment_html)), url_for(success_criterion)) %></td>
<td><%= link_to(truncate(success_criterion.comment_html.to_plain_text), url_for(success_criterion)) %></td>
</tr>
<% end %>