After we add these, we can update the specs to use them instead of using `have_content`. `have_content` checks for content anywhere in the page, and the specs should be checking for error/notice messages in a specific place. This also makes it easier to debug failing specs, since you can more easily see what the flash notice/error being displayed is.
25 lines
865 B
Plaintext
25 lines
865 B
Plaintext
<% if flash["notice"] %>
|
|
<div class="-mt-6 mb-2 rounded-md bg-green-50 p-4">
|
|
<div class="flex">
|
|
<div class="flex-shrink-0">
|
|
<%== render("components/icon", locals: { name: "hero-check-circle-mini", classes: "h-5 w-5 text-green-400" }) %>
|
|
</div>
|
|
<div class="ml-3">
|
|
<h3 id="flash-notice" class="text-sm font-medium text-green-800"><%= flash["notice"] %></h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
<% if flash["error"] %>
|
|
<div class="-mt-6 mb-2 rounded-md bg-red-50 p-4">
|
|
<div class="flex">
|
|
<div class="flex-shrink-0">
|
|
<%== render("components/icon", locals: { name: "hero-x-circle-mini", classes: "h-5 w-5 text-red-400" }) %>
|
|
</div>
|
|
<div class="ml-3">
|
|
<h3 id="flash-error" class="text-sm font-medium text-red-800"><%= flash["error"] %></h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% end %>
|