mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-23 12:12:59 -05:00
* bring Makefile to root folder * add back the print to console when pyscript is ready * fix build path on tests, link to core.js and overall timeout since it now loads faster * fix and mark some tests accordingly * change default timeout to 20s * review tests and skip what is a known regression * more tests review until pycondif and skip what is a known regression * fix pyodide version used on tests * remove display from config test since it's not testing anything more than console already tests and display as its own tests * disable config tests that rely on the banner * skip REPL tests since it's not included in pyscript NEXT * skip PyTerminal tests since it's not included in pyscript NEXT * skip more tests relying on Element * Fix wrong script type from py-script to py * review more tests related to attributes and add test for worker * skip spashscreen tests * wrap up reviews on remaining tests * update core * update display tests to use import * fix more tests and skip some that have known issues * skip other 2 tests that fail because the test framework injects values that cause the config to fail * fix getPySrc test due to changed interface * another round of fixes and commenting on specific tests --------- Co-authored-by: Fabio Pliger <fpliger@anaconda.com>
48 lines
1.5 KiB
Python
48 lines
1.5 KiB
Python
import pytest
|
|
from playwright.sync_api import expect
|
|
|
|
from .support import PyScriptTest, skip_worker
|
|
|
|
pytest.skip(
|
|
reason="FIX TESTS: These tests should reflect new PyScript and remove/change css ",
|
|
allow_module_level=True,
|
|
)
|
|
|
|
|
|
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/pyscript.css" />
|
|
</head>
|
|
<body>
|
|
<py-config>hello</py-config>
|
|
<py-script>hello</py-script>
|
|
<py-repl>hello</py-repl>
|
|
</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()
|
|
expect(self.page.locator("py-repl")).to_be_hidden()
|
|
|
|
@skip_worker("FIXME: display()")
|
|
def test_pyscript_defined(self):
|
|
"""Test elements have visibility that should"""
|
|
self.pyscript_run(
|
|
"""
|
|
<py-config>
|
|
name = "foo"
|
|
</py-config>
|
|
<py-script>display("hello")</py-script>
|
|
<py-repl>display("hello")</py-repl>
|
|
"""
|
|
)
|
|
expect(self.page.locator("py-config")).to_be_hidden()
|
|
expect(self.page.locator("py-script")).to_be_visible()
|
|
expect(self.page.locator("py-repl")).to_be_visible()
|