File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1414from django .db import connections
1515from django .test .utils import modify_settings
1616from playwright .sync_api import sync_playwright
17-
17+ from logging import getLogger
1818from reactpy_django .utils import str_to_bool
1919
2020if TYPE_CHECKING :
2121 from daphne .testing import DaphneProcess
2222
2323GITHUB_ACTIONS = os .getenv ("GITHUB_ACTIONS" , "False" )
24-
24+ _logger = getLogger ( __name__ )
2525
2626class PlaywrightTestCase (ChannelsLiveServerTestCase ):
2727 databases = {"default" }
@@ -115,6 +115,7 @@ def start_playwright_client(cls):
115115 cls .browser = cls .playwright .chromium .launch (headless = bool (headless ))
116116 cls .page = cls .browser .new_page ()
117117 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 )
118119
119120 @classmethod
120121 def shutdown_playwright_client (cls ):
You can’t perform that action at this time.
0 commit comments