Simplify tests with pytest-playwright (#523)

* Simplify tests with pytest-playwright

* Add pytest-playwright to pip

* Fix simple_clock example

* Attempt to make example tests more robust

* Make pre-commit happy

* Revert accidental change to simple_clock pyscript resources

* Another attempt at reducing flakeyness

* Do not wait until page load event is fired

* Remove pointless py-config

Co-authored-by: mariana <marianameireles@protonmail.com>
This commit is contained in:
Philipp Rudiger
2022-06-21 19:28:05 +02:00
committed by GitHub
parent 1c7ef6622b
commit 829cc9f6f9
5 changed files with 43 additions and 52 deletions

View File

@@ -14,13 +14,6 @@
- paths:
- ./utils.py
</py-env>
<py-config>
autoclose_loader: false
runtimes:
- src: "https://cdn.jsdelivr.net/pyodide/v0.20.0/full/pyodide.js"
name: pyodide-0.20
lang: python
</py-config>
</head>
<body>
@@ -42,7 +35,7 @@ async def foo():
while True:
await asyncio.sleep(1)
output = now()
pyscript.write("outputDiv2", output)
Element("outputDiv2").write(output)
out3 = Element("outputDiv3")
if output[-1] in ["0", "4", "8"]: