from .support import PyScriptTest
class TestPyButton(PyScriptTest):
def test_box(self):
self.pyscript_run(
"""
"""
)
pybox_element = self.page.query_selector_all("py-box")
assert len(pybox_element) == 2
assert pybox_element[1].get_attribute("class") == "py-box-child"
def test_deprecated_element(self):
self.pyscript_run(
"""
"""
)
banner = self.page.locator(".py-warning")
banner_content = banner.inner_text()
expected = (
"The element is deprecated, you should create a div "
'with "py-box" class name instead. For example: