mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 18:55:29 -05:00
Deprecate py-button, py-inputbox, py-box and py-title (#931)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user