mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 10:47:35 -05:00
Fix Flaky test_execute_on_shift_enter (#1097)
* Wait for text to render in DOM before 'assert', to fix timing issue.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from .support import PyScriptTest
|
||||
from .support import PyScriptTest, wait_for_render
|
||||
|
||||
|
||||
class TestPyRepl(PyScriptTest):
|
||||
@@ -65,6 +65,7 @@ class TestPyRepl(PyScriptTest):
|
||||
)
|
||||
self.page.wait_for_selector("#runButton")
|
||||
self.page.keyboard.press("Shift+Enter")
|
||||
wait_for_render(self.page, "*", "hello world")
|
||||
|
||||
assert self.console.log.lines[0] == self.PY_COMPLETE
|
||||
assert self.console.log.lines[-1] == "hello world"
|
||||
|
||||
Reference in New Issue
Block a user