test_user.py 534 B

12345678910111213141516171819202122232425
  1. from nicegui import ui
  2. from .user import User
  3. def test_rendering_page(user: User):
  4. ui.label('test label')
  5. with ui.row().classes('positive'):
  6. ui.input('test input', placeholder='some placeholder')
  7. with ui.column():
  8. ui.label('1')
  9. ui.label('2')
  10. ui.label('3')
  11. user.open('/')
  12. assert user.page() == '''Title: NiceGUI
  13. test label
  14. row [class: items-start positive]
  15. test input: some placeholder [class: no-wrap items-start standard labeled]
  16. column [class: items-start]
  17. 1
  18. 2
  19. 3
  20. '''