mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 11:15:36 -05:00
* Create custom elements when the runtime finishes loading * Remove xfails and fix repl integration test * Fix commented ignore * Address Antonio's comments * Fix bad rebase * Make ure to wait for repl to be in attached state before asserting content * Move createCustomeElement up so it runs before we close the loader, xfail flaky d3 test * Fix xfail
23 lines
643 B
Python
23 lines
643 B
Python
from .support import PyScriptTest
|
|
|
|
|
|
class TestPyInputBox(PyScriptTest):
|
|
def test_input_box_typing(self):
|
|
self.pyscript_run(
|
|
"""
|
|
<py-inputbox label="my input">
|
|
import js
|
|
def on_keypress(evt):
|
|
if evt.key == "Enter":
|
|
js.console.log(evt.target.value)
|
|
</py-inputbox>
|
|
"""
|
|
)
|
|
assert self.console.log.lines == [self.PY_COMPLETE]
|
|
input = self.page.locator("input")
|
|
|
|
input.type("Hello")
|
|
input.press("Enter")
|
|
|
|
assert self.console.log.lines == [self.PY_COMPLETE, "Hello"]
|