Skip to content

Commit

Permalink
Modal test is affected by hidden class
Browse files Browse the repository at this point in the history
  • Loading branch information
mitkins committed Feb 17, 2025
1 parent 8dffa11 commit 8f90930
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/petal_components/modal.ex
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,6 @@ defmodule PetalComponents.Modal do
max_width_class = "pc-modal__box--#{opts.max_width}"
custom_classes = opts.class

[max_width_class, base_classes, custom_classes]
[base_classes, max_width_class, custom_classes]
end
end
4 changes: 2 additions & 2 deletions test/petal/modal_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ defmodule PetalComponents.ModalTest do
<.modal class="h-full"></.modal>
""")

assert html =~ "\"pc-modal__box--md pc-modal__box h-full\""
assert html =~ "\"hidden pc-modal__box pc-modal__box--md h-full\""

html =
rendered_to_string(~H"""
<.modal></.modal>
""")

assert html =~ "\"pc-modal__box--md pc-modal__box \""
assert html =~ "\"hidden pc-modal__box pc-modal__box--md \""
end
end

0 comments on commit 8f90930

Please sign in to comment.