Skip to content

Commit e8ab88e

Browse files
committed
improve test to avoid discrepancy between firefox and chrome
1 parent ff5b126 commit e8ab88e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_unwrap_width.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
from math import ceil, floor
23
from pathlib import Path
34

45
import pytest
@@ -38,8 +39,8 @@ def test_should_render_template_check_container_size(page: Page):
3839
expect(pdf_container).to_be_visible()
3940

4041
b_box = pdf_container.bounding_box()
41-
assert b_box['width'] == 400
42-
assert b_box['height'] >= 4216 # Firefox returns 4216.000091552734, while Chome 4216
42+
assert floor(b_box['width']) == 400
43+
assert floor(b_box['height']) == 4216 # Firefox returns 4216.000091552734, while Chome 4216
4344

4445
pdf_viewer = iframe_frame.locator('div[id="pdfViewer"]')
4546
expect(pdf_viewer).to_be_visible()

0 commit comments

Comments
 (0)