Skip to content
This repository was archived by the owner on Aug 10, 2022. It is now read-only.

Commit 8f8d8e0

Browse files
committed
Update test to check if match_level applied after was passed to checksettings
1 parent e6fd50c commit 8f8d8e0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/unit/eyes_core/test_match_window_task.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
FloatingMatchSettings,
77
MatchWindowData,
88
Region,
9+
MatchLevel,
910
)
1011
from applitools.core import CheckSettings, MatchWindowTask
1112

@@ -41,6 +42,9 @@ def test_perform_match_with_no_regions(
4142
match_window_data = smw.call_args[0][1] # type: MatchWindowData
4243
ims = match_window_data.options.image_match_settings
4344

45+
assert (
46+
match_window_data.options.image_match_settings.match_level == MatchLevel.STRICT
47+
)
4448
assert match_window_data.user_inputs == []
4549
assert ims.ignore == []
4650
assert ims.layout == []
@@ -55,8 +59,12 @@ def test_perform_match_collect_regions_from_screenshot(
5559
ignore_region = Region(5, 6, 7, 8)
5660
max_offset = 25
5761
floating_region = Region(0, 1, 2, 3)
62+
content_region = Region(1, 2, 2, 1)
5863
check_settings = (
59-
CheckSettings().ignore(ignore_region).floating(max_offset, floating_region)
64+
CheckSettings()
65+
.ignore(ignore_region)
66+
.floating(max_offset, floating_region)
67+
.content(content_region)
6068
)
6169
with patch("applitools.core.server_connector.ServerConnector.match_window") as smw:
6270
mwt.perform_match(
@@ -70,6 +78,8 @@ def test_perform_match_collect_regions_from_screenshot(
7078
match_window_data = smw.call_args[0][1] # type: MatchWindowData
7179
ims = match_window_data.options.image_match_settings
7280

81+
assert ims.content == [content_region]
82+
assert ims.match_level == MatchLevel.CONTENT
7383
assert ims.ignore == [ignore_region]
7484

7585
assert ims.floating == [

0 commit comments

Comments
 (0)