Przeglądaj źródła

pytest: check if timing problem

Rodja Trappe 2 lat temu
rodzic
commit
5f1fbee1f3
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      tests/test_element.py

+ 1 - 0
tests/test_element.py

@@ -11,6 +11,7 @@ def test_keyboard(screen: Screen):
     ui.keyboard(on_key=lambda e: result.set_text(f'{e.key, e.action}'))
     ui.keyboard(on_key=lambda e: result.set_text(f'{e.key, e.action}'))
 
 
     screen.open('/')
     screen.open('/')
+    screen.wait(0.5)
     assert any(s.endswith('keyboard.js') for s in screen.get_attributes('script', 'src'))
     assert any(s.endswith('keyboard.js') for s in screen.get_attributes('script', 'src'))
     assert screen.get_tags('span')  # NOTE keyboard dom element is a span
     assert screen.get_tags('span')  # NOTE keyboard dom element is a span
     ActionChains(screen.selenium).send_keys('t').perform()
     ActionChains(screen.selenium).send_keys('t').perform()