Skip to content

Commit

Permalink
move tiny dimensions tests to page.py instead of background.py
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagowfx committed Jun 13, 2023
1 parent e02bbab commit 47621c2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions webdriver/tests/bidi/browsing_context/print/page.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
import pytest

from tests.support.image import px_to_cm

pytestmark = pytest.mark.asyncio


@pytest.mark.parametrize(
"page, orientation, expected_dimensions",
[
(None, "portrait", {"width": 21.59, "height": 27.94}),
({}, "portrait",{"width": 21.59, "height": 27.94}),
({}, "portrait", {"width": 21.59, "height": 27.94}),
({"width": 4.5}, "portrait", {"width": 4.5, "height": 27.94}),
({"height": 23}, "portrait", {"width": 21.59, "height": 23}),
({"width": 4.5, "height": 12}, "portrait", {"width": 4.5, "height": 12}),
({"height": 12}, "portrait", {"width": 21.59, "height": 12}),
(None, "landscape", {"width": 27.94, "height": 21.59}),
({}, "landscape",{"width": 27.94, "height": 21.59}),
({}, "landscape", {"width": 27.94, "height": 21.59}),
({"width": 4.5}, "landscape", {"width": 27.94, "height": 4.5}),
({"height": 23}, "landscape", {"width": 23, "height": 21.59}),
({"width": 4.5, "height": 12}, "landscape", {"width": 12, "height": 4.5}),
({"height": 12}, "landscape", {"width": 12, "height": 21.59}),
({"width": px_to_cm(1), "height": px_to_cm(2)}, "portrait", {"width": px_to_cm(1), "height": px_to_cm(2)}),
({"width": px_to_cm(1), "height": px_to_cm(2)}, "landscape", {"width": px_to_cm(2), "height": px_to_cm(1)}),
],
)
async def test_page(
Expand Down

0 comments on commit 47621c2

Please sign in to comment.