mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add tests for selection navigation in a radioset with no buttons pressed
This commit is contained in:
@@ -79,6 +79,15 @@ async def test_radioset_inner_navigation():
|
|||||||
pilot.app.query_one("#from_buttons", RadioSet).pressed_button
|
pilot.app.query_one("#from_buttons", RadioSet).pressed_button
|
||||||
== pilot.app.query_one("#from_buttons").children[landing]
|
== pilot.app.query_one("#from_buttons").children[landing]
|
||||||
)
|
)
|
||||||
|
async with RadioSetApp().run_test() as pilot:
|
||||||
|
assert pilot.app.screen.focused is None
|
||||||
|
await pilot.press("tab")
|
||||||
|
assert pilot.app.screen.focused is pilot.app.screen.query_one("#from_buttons")
|
||||||
|
await pilot.press("tab")
|
||||||
|
assert pilot.app.screen.focused is pilot.app.screen.query_one("#from_strings")
|
||||||
|
assert pilot.app.query_one("#from_strings", RadioSet)._selected == 0
|
||||||
|
await pilot.press("down")
|
||||||
|
assert pilot.app.query_one("#from_strings", RadioSet)._selected == 1
|
||||||
|
|
||||||
|
|
||||||
async def test_radioset_breakout_navigation():
|
async def test_radioset_breakout_navigation():
|
||||||
|
|||||||
Reference in New Issue
Block a user