File tree 1 file changed +8
-1
lines changed
tests/playwright/examples
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 4
4
from pathlib import PurePath
5
5
from typing import Literal
6
6
7
- from playwright .sync_api import ConsoleMessage , Page
7
+ from playwright .sync_api import ConsoleMessage , Page , expect
8
8
9
9
from shiny .run import ShinyAppProc , run_shiny_app
10
10
15
15
reruns = 1 if is_interactive else 3
16
16
reruns_delay = 0
17
17
18
+ SHINY_INIT_TIMEOUT = 30_000
19
+ ERROR_ELEMENT_TIMEOUT = 1_000
18
20
19
21
def get_apps (path : str ) -> typing .List [str ]:
20
22
full_path = pyshiny_root / path
@@ -250,3 +252,8 @@ def on_console_msg(msg: ConsoleMessage) -> None:
250
252
+ " had JavaScript console errors!\n "
251
253
+ "* " .join (console_errors )
252
254
)
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