test_splitter.py 508 B

1234567891011121314151617
  1. from nicegui import ui
  2. from nicegui.testing import Screen
  3. def test_splitter(screen: Screen):
  4. with ui.splitter() as splitter:
  5. with splitter.before:
  6. ui.label('Left hand side.')
  7. with splitter.after:
  8. ui.label('Right hand side.')
  9. ui.label().bind_text_from(splitter, 'value')
  10. screen.open('/')
  11. screen.should_contain('Left hand side.')
  12. screen.should_contain('Right hand side.')
  13. screen.should_contain('50')
  14. # TODO: programmatically move splitter