Bläddra i källkod

move input tests into single file

Falko Schindler 2 år sedan
förälder
incheckning
a20e3acd36
2 ändrade filer med 11 tillägg och 14 borttagningar
  1. 0 14
      tests/input.py
  2. 11 0
      tests/test_input.py

+ 0 - 14
tests/input.py

@@ -1,14 +0,0 @@
-from nicegui import ui
-
-from .screen import Screen
-
-
-def test_input_with_multi_word_error_message(screen: Screen):
-    input = ui.input(label='some input')
-    ui.button('set error', on_click=lambda: input.props('error error-message="Some multi word error message"'))
-
-    screen.open('/')
-    screen.should_not_contain('Some multi word error message')
-
-    screen.click('set error')
-    screen.should_contain('Some multi word error message')

+ 11 - 0
tests/test_input.py

@@ -66,3 +66,14 @@ def test_input_validation(screen: Screen):
     element.send_keys(' Doe')
     screen.wait(0.5)
     screen.should_not_contain('Too short')
+
+
+def test_input_with_multi_word_error_message(screen: Screen):
+    input = ui.input(label='some input')
+    ui.button('set error', on_click=lambda: input.props('error error-message="Some multi word error message"'))
+
+    screen.open('/')
+    screen.should_not_contain('Some multi word error message')
+
+    screen.click('set error')
+    screen.should_contain('Some multi word error message')