Skip to content

Commit 56e299b

Browse files
committed
Add moar tests
1 parent 74580f9 commit 56e299b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/components_guide_web/components/calendar_component.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ defmodule ComponentsGuideWeb.CalendarComponent do
4444
<%= day %>
4545
</td>
4646
<% else %>
47-
<td class="bg-black"></td>
47+
<td role="presentation" class="bg-black"></td>
4848
<% end %>
4949
<% end %>
5050
</tr>

test/collected_live_web/components/calendar_component_test.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ defmodule ComponentsGuideWeb.CalendarComponentTest do
1919

2020
assert 7 == count(el, "thead th")
2121
assert 6 == count(el, "tbody tr")
22+
assert 30 == count(el, "tbody td:not([role=presentation])")
2223
end
2324

2425
@tag assigns: [date: ~D[2022-04-15]]
@@ -31,6 +32,7 @@ defmodule ComponentsGuideWeb.CalendarComponentTest do
3132
test "January 3 2022", %{el: el} do
3233
current_date = el |> find("td[aria-current=date]")
3334
assert "3" == current_date |> text() |> String.trim()
35+
assert 31 == count(el, "tbody td:not([role=presentation])")
3436
end
3537
end
3638
end

0 commit comments

Comments
 (0)