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

Commit 8c9ae7c

Browse files
authored
Merge pull request #23 from applitools/develop
Develop to master
2 parents f14acb5 + cb0699e commit 8c9ae7c

File tree

24 files changed

+106
-90
lines changed

24 files changed

+106
-90
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 4.0.1
2+
current_version = 4.0.2
33
commit = True
44
tag = True
55

eyes_common/README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
Eyes Core Python SDK
2-
=============
1+
Eyes Common Python SDK
2+
======================
33

4-
Applitools Eyes Core SDK For Python
4+
Applitools Eyes Common SDK For Python
55

66

77
Installation
88
------------
99

10-
Install the eyes-core SDK.
10+
Install the eyes-common SDK.
1111

1212
::
1313

14-
pip install eyes-core
14+
pip install eyes-common
1515

1616
Usage
1717
-----
1818

19-
It could be used to create own Appltiools SDK
19+
It could be used to create own Applitools SDK
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.0.1"
1+
__version__ = "4.0.2"

eyes_common/applitools/common/config/configuration.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
__all__ = ("BatchInfo", "Configuration")
1515

16-
MINIMUM_MATCH_TIMEOUT = 0.6 # seconds
17-
DEFAULT_TIMEOUT = 60 * 5 # seconds
16+
MINIMUM_MATCH_TIMEOUT_MS = 600
17+
DEFAULT_TIMEOUT_MS = 60 * 5 * 1000
1818
DEFAULT_SERVER_URL = "https://eyesapi.applitools.com"
1919

2020

@@ -54,7 +54,7 @@ def _to_rectangle(d):
5454

5555
@attr.s
5656
class Configuration(object):
57-
DEFAULT_MATCH_TIMEOUT = 2 # sec
57+
DEFAULT_MATCH_TIMEOUT_MS = 2000
5858

5959
batch = attr.ib(default=None) # type: Optional[BatchInfo]
6060
branch_name = attr.ib(
@@ -83,7 +83,7 @@ class Configuration(object):
8383
host_os = attr.ib(default=None)
8484
properties = attr.ib(factory=list)
8585
hide_scrollbars = attr.ib(default=False)
86-
match_timeout = attr.ib(default=DEFAULT_MATCH_TIMEOUT)
86+
match_timeout = attr.ib(default=DEFAULT_MATCH_TIMEOUT_MS) # ms
8787
match_level = attr.ib(default=MatchLevel.STRICT, converter=MatchLevel)
8888
is_disabled = attr.ib(default=False)
8989
save_new_tests = attr.ib(default=True)
@@ -96,15 +96,16 @@ class Configuration(object):
9696
default_match_settings = attr.ib(default=ImageMatchSettings())
9797
hide_caret = attr.ib(init=False, default=None)
9898
stitching_overlap = attr.ib(init=False, default=50)
99+
99100
api_key = attr.ib(factory=lambda: os.environ.get("APPLITOOLS_API_KEY", None))
100101
server_url = attr.ib(default=DEFAULT_SERVER_URL)
101-
timeout = attr.ib(default=DEFAULT_TIMEOUT)
102+
timeout = attr.ib(default=DEFAULT_TIMEOUT_MS) # ms
102103

103104
@match_timeout.validator
104105
def validate1(self, attribute, value):
105-
if 0 < value < MINIMUM_MATCH_TIMEOUT:
106+
if 0 < value < MINIMUM_MATCH_TIMEOUT_MS:
106107
raise ValueError(
107-
"Match timeout must be at least {} sec.".format(MINIMUM_MATCH_TIMEOUT)
108+
"Match timeout must be at least {} ms.".format(MINIMUM_MATCH_TIMEOUT_MS)
108109
)
109110

110111
@viewport_size.validator

eyes_common/applitools/common/config/selenium_configuration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818

1919
@attr.s
2020
class SeleniumConfiguration(Configuration):
21-
DEFAULT_WAIT_BEFORE_SCREENSHOTS = 1 # sec
21+
DEFAULT_WAIT_BEFORE_SCREENSHOTS_MS = 1000 # ms
2222

2323
force_full_page_screenshot = attr.ib(default=False) # type: bool
2424
wait_before_screenshots = attr.ib(
25-
default=DEFAULT_WAIT_BEFORE_SCREENSHOTS
26-
) # type: int
25+
default=DEFAULT_WAIT_BEFORE_SCREENSHOTS_MS
26+
) # type: int # ms
2727
stitch_mode = attr.ib(default=StitchMode.Scroll) # type: StitchMode
2828
hide_scrollbars = attr.ib(default=False) # type: bool
2929
hide_caret = attr.ib(default=False) # type: bool

eyes_common/applitools/common/visual_grid.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ def from_response(cls, url, response):
247247
@attr.s
248248
class RenderRequest(object):
249249
webhook = attr.ib(metadata={JsonInclude.NON_NONE: True}) # type: Text
250+
agent_id = attr.ib(metadata={JsonInclude.THIS: True})
250251
url = attr.ib(metadata={JsonInclude.NON_NONE: True}) # type: Text
251252
dom = attr.ib(repr=False, metadata={JsonInclude.NON_NONE: True}) # type: RGridDom
252253
resources = attr.ib(repr=False, metadata={JsonInclude.NON_NONE: True}) # type: dict

eyes_core/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Eyes Core Python SDK
2-
=============
2+
====================
33

44
Applitools Eyes Core SDK For Python
55

@@ -16,4 +16,4 @@ Install the eyes-core SDK.
1616
Usage
1717
-----
1818

19-
It could be used to create own Appltiools SDK
19+
It could be used to create own Applitools SDK
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.0.1"
1+
__version__ = "4.0.2"

eyes_core/applitools/core/eyes_base.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,8 @@ def _log_open_base(self):
494494
logger.debug(
495495
"Eyes server URL is '{}'".format(self._server_connector.server_url)
496496
)
497-
logger.debug("Timeout = {} sec".format(self.configuration.timeout))
498-
logger.debug("match_timeout = {} sec".format(self.configuration.match_timeout))
497+
logger.debug("Timeout = {} ms".format(self.configuration.timeout))
498+
logger.debug("match_timeout = {} ms".format(self.configuration.match_timeout))
499499
logger.debug(
500500
"Default match settings = '{}' ".format(
501501
self.configuration.default_match_settings
@@ -667,9 +667,9 @@ def _try_post_dom_snapshot(self, dom_json):
667667
def _match_window(self, region_provider, tag, ignore_mismatch, check_settings):
668668
# type: (RegionProvider, Text, bool, CheckSettings) -> MatchResult
669669
# Update retry timeout if it wasn't specified.
670-
retry_timeout = -1 # type: Num
670+
retry_timeout_ms = -1 # type: Num
671671
if check_settings:
672-
retry_timeout = check_settings.values.timeout
672+
retry_timeout_ms = check_settings.values.timeout
673673

674674
get_config_value = general_utils.use_default_if_none_factory(
675675
self.configuration.default_match_settings, self.configuration
@@ -691,7 +691,7 @@ def _match_window(self, region_provider, tag, ignore_mismatch, check_settings):
691691
)
692692

693693
region = region_provider.get_region()
694-
logger.debug("params: ([{}], {}, {})".format(region, tag, retry_timeout))
694+
logger.debug("params: ([{}], {}, {})".format(region, tag, retry_timeout_ms))
695695

696696
result = self._match_window_task.match_window(
697697
self._user_inputs,
@@ -700,7 +700,7 @@ def _match_window(self, region_provider, tag, ignore_mismatch, check_settings):
700700
self._should_match_once_on_timeout,
701701
ignore_mismatch,
702702
check_settings,
703-
retry_timeout,
703+
retry_timeout_ms,
704704
)
705705
return result
706706

eyes_core/applitools/core/fluent/check_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class CheckSettingsValues(object):
2929
"""
3030

3131
target_region = attr.ib(init=False, default=None) # type: Optional[Region]
32-
timeout = attr.ib(init=False, default=-1) # type: Num # seconds
32+
timeout = attr.ib(init=False, default=-1) # type: Num # milliseconds
3333

3434
ignore_caret = attr.ib(init=False, default=False) # type: bool
3535
stitch_content = attr.ib(init=False, default=False) # type: bool

0 commit comments

Comments
 (0)