mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add CSS class tests for check boxes and radio buttons
This commit is contained in:
@@ -26,6 +26,11 @@ async def test_radio_button_initial_state() -> None:
|
||||
False,
|
||||
True,
|
||||
]
|
||||
assert [button.has_class("-on") for button in pilot.app.query(RadioButton)] == [
|
||||
False,
|
||||
False,
|
||||
True,
|
||||
]
|
||||
assert pilot.app.events_received == []
|
||||
|
||||
|
||||
@@ -39,6 +44,11 @@ async def test_radio_button_toggle() -> None:
|
||||
True,
|
||||
False,
|
||||
]
|
||||
assert [button.has_class("-on") for button in pilot.app.query(RadioButton)] == [
|
||||
True,
|
||||
True,
|
||||
False,
|
||||
]
|
||||
await pilot.pause()
|
||||
assert pilot.app.events_received == [
|
||||
("rb1", True),
|
||||
|
||||
Reference in New Issue
Block a user