4
4
5
5
from PIL import Image , ImageFile
6
6
from botcity .web import WebBot , By
7
+ from pytest import xfail
7
8
8
9
9
10
def test_context (web : WebBot ):
@@ -41,7 +42,7 @@ def test_display_size(web: WebBot):
41
42
web .set_screen_resolution (1280 , 720 )
42
43
(w , h ) = web .display_size ()
43
44
44
- assert w in [1280 , 1264 , 1223 ]
45
+ assert w in [1280 , 1264 , 1223 , 1256 ]
45
46
46
47
47
48
def test_javascript (web : WebBot ):
@@ -232,10 +233,13 @@ def test_set_screen_resolution(web: WebBot):
232
233
233
234
page_size = web .find_element ('page-size' , By .ID ).text
234
235
width = page_size .split ('x' )[0 ]
235
- assert width == '500'
236
+ assert width in [ '500' , '476' ]
236
237
237
238
238
239
def test_wait_for_downloads (web : WebBot ):
240
+ if web .browser .lower () in 'edge' and os .getenv ('CI' ) is not None :
241
+ xfail (reason = f"Edge is not working properly for some tests in CI" )
242
+
239
243
fake_bin_path = conftest .get_fake_bin_path (web = web )
240
244
241
245
web .browse (conftest .INDEX_PAGE )
@@ -248,6 +252,9 @@ def test_wait_for_downloads(web: WebBot):
248
252
249
253
250
254
def test_wait_for_file (web : WebBot ):
255
+ if web .browser .lower () in 'edge' and os .getenv ('CI' ) is not None :
256
+ xfail (reason = f"Edge is not working properly for some tests in CI" )
257
+
251
258
fake_bin_path = conftest .get_fake_bin_path (web = web )
252
259
253
260
web .browse (conftest .INDEX_PAGE )
0 commit comments