@@ -57,6 +57,9 @@ def test_webagg_core_no_toolbar():
57
57
def test_webagg_general (random_port , page ):
58
58
from playwright .sync_api import expect
59
59
60
+ # Listen for all console logs.
61
+ page .on ("console" , lambda msg : print (msg .text ))
62
+
60
63
fig , ax = plt .subplots (facecolor = 'w' )
61
64
62
65
# Don't start the Tornado event loop, but use the existing event loop
@@ -87,6 +90,9 @@ def test_webagg_general(random_port, page):
87
90
88
91
@pytest .mark .backend ('webagg' )
89
92
def test_webagg_resize (random_port , page ):
93
+ # Listen for all console logs.
94
+ page .on ("console" , lambda msg : print (msg .text ))
95
+
90
96
fig , ax = plt .subplots (facecolor = 'w' )
91
97
orig_bbox = fig .bbox .frozen ()
92
98
@@ -120,6 +126,9 @@ def test_webagg_resize(random_port, page):
120
126
def test_webagg_toolbar (random_port , page , toolbar ):
121
127
from playwright .sync_api import expect
122
128
129
+ # Listen for all console logs.
130
+ page .on ("console" , lambda msg : print (msg .text ))
131
+
123
132
with warnings .catch_warnings ():
124
133
warnings .filterwarnings ('ignore' , message = 'Treat the new Tool classes' ,
125
134
category = UserWarning )
@@ -178,6 +187,9 @@ def test_webagg_toolbar(random_port, page, toolbar):
178
187
def test_webagg_toolbar_save (random_port , page ):
179
188
from playwright .sync_api import expect
180
189
190
+ # Listen for all console logs.
191
+ page .on ("console" , lambda msg : print (msg .text ))
192
+
181
193
fig , ax = plt .subplots (facecolor = 'w' )
182
194
183
195
# Don't start the Tornado event loop, but use the existing event loop
@@ -202,6 +214,9 @@ def test_webagg_toolbar_save(random_port, page):
202
214
def test_webagg_toolbar_pan (random_port , page ):
203
215
from playwright .sync_api import expect
204
216
217
+ # Listen for all console logs.
218
+ page .on ("console" , lambda msg : print (msg .text ))
219
+
205
220
fig , ax = plt .subplots (facecolor = 'w' )
206
221
ax .plot ([3 , 2 , 1 ])
207
222
orig_lim = ax .viewLim .frozen ()
@@ -314,6 +329,9 @@ def test_webagg_toolbar_pan(random_port, page):
314
329
def test_webagg_toolbar_zoom (random_port , page ):
315
330
from playwright .sync_api import expect
316
331
332
+ # Listen for all console logs.
333
+ page .on ("console" , lambda msg : print (msg .text ))
334
+
317
335
fig , ax = plt .subplots (facecolor = 'w' )
318
336
ax .plot ([3 , 2 , 1 ])
319
337
orig_lim = ax .viewLim .frozen ()
0 commit comments