defmodule ToweropsWeb.Components.SkeletonsTest do use ExUnit.Case, async: true import Phoenix.LiveViewTest alias ToweropsWeb.Components.Skeletons describe "skeleton_card/1" do test "renders with default class" do html = render_component(&Skeletons.skeleton_card/1, %{class: nil}) assert html =~ "animate-pulse" assert html =~ "rounded-lg" end test "applies extra class" do html = render_component(&Skeletons.skeleton_card/1, %{class: "my-extra"}) assert html =~ "my-extra" end end describe "skeleton_table/1" do test "renders default rows and cols" do html = render_component(&Skeletons.skeleton_table/1, %{}) assert html =~ "animate-pulse" end test "honors explicit rows" do html = render_component(&Skeletons.skeleton_table/1, %{rows: 3, cols: 2}) assert html =~ "animate-pulse" end end describe "skeleton_stat/1" do test "renders" do html = render_component(&Skeletons.skeleton_stat/1, %{}) assert html =~ "animate-pulse" end end describe "skeleton_dashboard/1" do test "renders" do html = render_component(&Skeletons.skeleton_dashboard/1, %{}) assert html =~ "animate-pulse" end end end