File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 14
14
from django .db import connections
15
15
from django .test .utils import modify_settings
16
16
from playwright .sync_api import sync_playwright
17
-
17
+ from logging import getLogger
18
18
from reactpy_django .utils import str_to_bool
19
19
20
20
if TYPE_CHECKING :
21
21
from daphne .testing import DaphneProcess
22
22
23
23
GITHUB_ACTIONS = os .getenv ("GITHUB_ACTIONS" , "False" )
24
-
24
+ _logger = getLogger ( __name__ )
25
25
26
26
class PlaywrightTestCase (ChannelsLiveServerTestCase ):
27
27
databases = {"default" }
@@ -115,6 +115,7 @@ def start_playwright_client(cls):
115
115
cls .browser = cls .playwright .chromium .launch (headless = bool (headless ))
116
116
cls .page = cls .browser .new_page ()
117
117
cls .page .set_default_timeout (10000 )
118
+ cls .page .on ("console" , lambda msg : _logger .error (f"error: { msg .text } " ) if msg .type == "error" else None )
118
119
119
120
@classmethod
120
121
def shutdown_playwright_client (cls ):
You can’t perform that action at this time.
0 commit comments