Skip to content

Commit 8f90930

Browse files
committed
Modal test is affected by hidden class
1 parent 8dffa11 commit 8f90930

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/petal_components/modal.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,6 @@ defmodule PetalComponents.Modal do
157157
max_width_class = "pc-modal__box--#{opts.max_width}"
158158
custom_classes = opts.class
159159

160-
[max_width_class, base_classes, custom_classes]
160+
[base_classes, max_width_class, custom_classes]
161161
end
162162
end

test/petal/modal_test.exs

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ defmodule PetalComponents.ModalTest do
117117
<.modal class="h-full"></.modal>
118118
""")
119119

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

122122
html =
123123
rendered_to_string(~H"""
124124
<.modal></.modal>
125125
""")
126126

127-
assert html =~ "\"pc-modal__box--md pc-modal__box \""
127+
assert html =~ "\"hidden pc-modal__box pc-modal__box--md \""
128128
end
129129
end

0 commit comments

Comments
 (0)