Slightly imporved pyrepl (#1296)

* removed unnecessary getAttribute
  * removed unnecessary shadow and ShadowDOM in general, as it was never used
  * dropped redundant constructor
  * removed unnecessary usage of the label element
  * fixed redundant always-same buttons IDs
This commit is contained in:
Andrea Giammarchi
2023-03-24 11:42:45 +01:00
committed by GitHub
parent 543a27271f
commit c8becca044
3 changed files with 11 additions and 39 deletions

View File

@@ -24,9 +24,8 @@ class TestPyRepl(PyScriptTest):
<py-repl></py-repl>
"""
)
py_repl = self.page.query_selector("py-repl")
py_repl = self.page.query_selector("py-repl .py-repl-box")
assert py_repl
assert "Python" in py_repl.inner_text()
def test_execute_preloaded_source(self):
"""
@@ -69,7 +68,7 @@ class TestPyRepl(PyScriptTest):
</py-repl>
"""
)
self.page.wait_for_selector("#runButton")
self.page.wait_for_selector("py-repl .py-repl-run-button")
self.page.keyboard.press("Shift+Enter")
wait_for_render(self.page, "*", "hello world")