Deprecate py-button, py-inputbox, py-box and py-title (#931)

This commit is contained in:
Fábio Rosado
2022-11-14 16:29:28 +00:00
committed by GitHub
parent be9b9f66d3
commit adfa9a9b05
15 changed files with 179 additions and 24 deletions

View File

@@ -20,3 +20,23 @@ class TestPyInputBox(PyScriptTest):
input.press("Enter")
assert self.console.log.lines == [self.PY_COMPLETE, "Hello"]
def test_deprecated_element(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>
"""
)
banner = self.page.locator(".py-warning")
banner_content = banner.inner_text()
expected = (
"The element <py-input> is deprecated, "
'use <input class="py-input"> instead.'
)
assert banner_content == expected