Skip to content

Commit

Permalink
Added testing for spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
Declow committed Jan 19, 2025
1 parent c94625d commit 01b4ef2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/elements/test_spinner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from uiwiz import ui


def test_spinner():
spin = None
with ui.button("Click me") as btn:
spin = ui.spinner(btn)
assert f"#{spin.id}" == btn.attributes["hx-indicator"]


def test_spinner_multiple():
spin = None
tx = ui.textarea("Hello")
with ui.button("Click me") as btn:
spin = ui.spinner(btn, tx)
assert f"#{spin.id}" == btn.attributes["hx-indicator"]
assert f"#{spin.id}" == tx.attributes["hx-indicator"]

0 comments on commit 01b4ef2

Please sign in to comment.