1
0

test_time.py 457 B

12345678910111213141516171819
  1. from nicegui import ui
  2. from nicegui.testing import Screen
  3. def test_time(screen: Screen):
  4. t = ui.time(value='01:23')
  5. ui.label().bind_text_from(t, 'value')
  6. screen.open('/')
  7. screen.should_contain('01:23')
  8. screen.wait(0.2)
  9. screen.click('8')
  10. screen.should_contain('08:23')
  11. screen.wait(0.2)
  12. screen.click('45')
  13. screen.should_contain('08:45')
  14. screen.wait(0.2)
  15. screen.click('PM')
  16. screen.should_contain('20:45')