File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
tests/playwright/examples Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 44from pathlib import PurePath
55from typing import Literal
66
7- from playwright .sync_api import ConsoleMessage , Page
7+ from playwright .sync_api import ConsoleMessage , Page , expect
88
99from shiny .run import ShinyAppProc , run_shiny_app
1010
1515reruns = 1 if is_interactive else 3
1616reruns_delay = 0
1717
18+ SHINY_INIT_TIMEOUT = 30_000
19+ ERROR_ELEMENT_TIMEOUT = 1_000
1820
1921def get_apps (path : str ) -> typing .List [str ]:
2022 full_path = pyshiny_root / path
@@ -250,3 +252,8 @@ def on_console_msg(msg: ConsoleMessage) -> None:
250252 + " had JavaScript console errors!\n "
251253 + "* " .join (console_errors )
252254 )
255+
256+ # check for shiny output errors
257+ expect (page .locator (".shiny-busy" )).to_have_count (0 , timeout = SHINY_INIT_TIMEOUT )
258+ error_locator = page .locator (".shiny-output-error" )
259+ expect (error_locator ).to_have_count (0 , timeout = ERROR_ELEMENT_TIMEOUT )
You can’t perform that action at this time.
0 commit comments