Files
pyscript/pyscript.core/tests/integration/test_style.py
Antonio Cuni b9a1227e47 Unskip some tests, delete others (#1742)
Clean up a bit the testsuite and integration tests.
Highlights:

- Some of the @skipped tests just worked -- I unskipped them
- some worked after some small tweak to adapt to the new pyscript next
- some are still skipped, but I tweaked the skip message to be more precise and descriptive
- Moreover, I killed/removed the ones which no longer make sense in the context of pyscript next; in particular, I removed all the ones which tested Element (which is now gone) and the one which tested py-config features which are no longer needed (e.g., multiple interpreters).

The testsuite passes locally.
2023-09-25 18:14:20 +02:00

25 lines
745 B
Python

import pytest
from playwright.sync_api import expect
from .support import PyScriptTest, skip_worker
class TestStyle(PyScriptTest):
def test_pyscript_not_defined(self):
"""Test raw elements that are not defined for display:none"""
doc = """
<html>
<head>
<link rel="stylesheet" href="build/core.css" />
</head>
<body>
<py-config>hello</py-config>
<py-script>hello</script>
</body>
</html>
"""
self.writefile("test-not-defined-css.html", doc)
self.goto("test-not-defined-css.html")
expect(self.page.locator("py-config")).to_be_hidden()
expect(self.page.locator("py-script")).to_be_hidden()