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:
Jeff Glass
2023-01-05 07:29:20 -06:00
committed by GitHub
parent 77d98a565e
commit e1b4415193
3 changed files with 29 additions and 28 deletions

View File

@@ -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"