eyes_calabash 6.4.2 → 6.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +92 -0
- data/LICENSE +26 -0
- data/README.md +483 -0
- data/eyes_calabash.gemspec +12 -4
- data/lib/applitools/calabash/eyes_calabash_screenshot.rb +8 -74
- data/lib/applitools/eyes_calabash/version.rb +1 -1
- data/lib/eyes_calabash.rb +1 -0
- metadata +15 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2707a121135debdc840fec15ba5323901b8a40e6e85a49dd29d6a051a4b0b409
|
4
|
+
data.tar.gz: dd5b77b1ec982b7280860334b98f36b48c267fd51c4fdea756d05c88cdc0eab4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b32c6907b3d555cb6a371047dbcf9d827e8688022253317fba309ce854b3d154c99c1dc0a54762f3cde11dcd04d5f9162e9a3db3796304551c7166fc8e6c64c
|
7
|
+
data.tar.gz: f2a81ee3e3e3c9d185f87635f22e59b2c9acd1e927fe514ffd1d83fcc8c8d01cac6ce678c8f8ac009836ebee2a43bac0b9c51c3a7065c852db6ba5bb5835f3f1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,97 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [6.4.4](https://github.com/Applitools-Dev/sdk/compare/ruby/eyes_calabash@6.4.3...ruby/eyes_calabash@6.4.4) (2025-06-15)
|
4
|
+
|
5
|
+
|
6
|
+
### Dependencies
|
7
|
+
|
8
|
+
* @applitools/dom-snapshot bumped to 4.11.22
|
9
|
+
#### Bug Fixes
|
10
|
+
|
11
|
+
* css media query group conditions | FLD-3151 ([#3023](https://github.com/Applitools-Dev/sdk/issues/3023)) ([56ec107](https://github.com/Applitools-Dev/sdk/commit/56ec107bcda6a5a330d19c278267d73de5d86d8b))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
* @applitools/req bumped to 1.7.13
|
16
|
+
|
17
|
+
* @applitools/dom-capture bumped to 11.5.6
|
18
|
+
|
19
|
+
* @applitools/spec-driver-webdriver bumped to 1.2.6
|
20
|
+
|
21
|
+
* @applitools/screenshoter bumped to 3.11.5
|
22
|
+
|
23
|
+
* @applitools/nml-client bumped to 1.9.5
|
24
|
+
#### Bug Fixes
|
25
|
+
|
26
|
+
* nml-client depends on core-base ([#2995](https://github.com/Applitools-Dev/sdk/issues/2995)) ([1f7cf69](https://github.com/Applitools-Dev/sdk/commit/1f7cf6930709a40a498dd1f525132648aa593af0))
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
* @applitools/tunnel-client bumped to 1.8.0
|
31
|
+
#### Features
|
32
|
+
|
33
|
+
* update build script to include individual zip creation ([#3008](https://github.com/Applitools-Dev/sdk/issues/3008)) ([46a0cfc](https://github.com/Applitools-Dev/sdk/commit/46a0cfcc472ab69384560095d90a7fa58b4b9186))
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
* @applitools/ufg-client bumped to 1.16.12
|
38
|
+
#### Bug Fixes
|
39
|
+
|
40
|
+
* remove safari-early-access browser version for js sdks | AD-10226 ([#3034](https://github.com/Applitools-Dev/sdk/issues/3034)) ([7ca09f5](https://github.com/Applitools-Dev/sdk/commit/7ca09f5c0c271570142058ea766533b86434dc2e))
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
* @applitools/core-base bumped to 1.25.4
|
45
|
+
#### Bug Fixes
|
46
|
+
|
47
|
+
* Differentiate Between Invalid and Missing API Key Errors ([6ac17d4](https://github.com/Applitools-Dev/sdk/commit/6ac17d40d7aff45b3de5c949dc7d4673b9739bfd))
|
48
|
+
* export issues for ts js with legacy solution ([#3016](https://github.com/Applitools-Dev/sdk/issues/3016)) ([a3a9daf](https://github.com/Applitools-Dev/sdk/commit/a3a9daf9c3361bb1f253499c1335a1434ec520d1))
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
* @applitools/test-server bumped to 1.2.3
|
53
|
+
#### Bug Fixes
|
54
|
+
|
55
|
+
* basic auth protected resources | FLD-2761 | FMRI-120 ([#2444](https://github.com/Applitools-Dev/sdk/issues/2444)) ([b48cf49](https://github.com/Applitools-Dev/sdk/commit/b48cf49dec50bbf1ed2ba111608a48cf09962565))
|
56
|
+
* export issues for ts js with legacy solution ([#3016](https://github.com/Applitools-Dev/sdk/issues/3016)) ([a3a9daf](https://github.com/Applitools-Dev/sdk/commit/a3a9daf9c3361bb1f253499c1335a1434ec520d1))
|
57
|
+
* storybook navigation timeouts ([#2701](https://github.com/Applitools-Dev/sdk/issues/2701)) ([64e3a40](https://github.com/Applitools-Dev/sdk/commit/64e3a40a524ae76ec457ae9c2d1170fbaea5e982))
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
* @applitools/ec-client bumped to 1.10.15
|
62
|
+
|
63
|
+
* @applitools/core bumped to 4.40.0
|
64
|
+
#### Features
|
65
|
+
|
66
|
+
* update build script to include individual zip creation ([#3008](https://github.com/Applitools-Dev/sdk/issues/3008)) ([46a0cfc](https://github.com/Applitools-Dev/sdk/commit/46a0cfcc472ab69384560095d90a7fa58b4b9186))
|
67
|
+
|
68
|
+
|
69
|
+
#### Bug Fixes
|
70
|
+
|
71
|
+
* css media query group conditions | FLD-3151 ([#3023](https://github.com/Applitools-Dev/sdk/issues/3023)) ([56ec107](https://github.com/Applitools-Dev/sdk/commit/56ec107bcda6a5a330d19c278267d73de5d86d8b))
|
72
|
+
* export issues for ts js with legacy solution ([#3016](https://github.com/Applitools-Dev/sdk/issues/3016)) ([a3a9daf](https://github.com/Applitools-Dev/sdk/commit/a3a9daf9c3361bb1f253499c1335a1434ec520d1))
|
73
|
+
* extractLatestCommitInfo | FLD-3217 ([#3039](https://github.com/Applitools-Dev/sdk/issues/3039)) ([3f72a23](https://github.com/Applitools-Dev/sdk/commit/3f72a230fa0166046ea85ae004cfb544de86e628))
|
74
|
+
* handle error when sending started message in tunnel manager server ([#3019](https://github.com/Applitools-Dev/sdk/issues/3019)) ([2cdaad8](https://github.com/Applitools-Dev/sdk/commit/2cdaad896fd679187449b69abe529b006f6255ee))
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
* eyes_universal bumped to 4.40.0
|
79
|
+
|
80
|
+
* eyes_core bumped to 6.7.2
|
81
|
+
|
82
|
+
|
83
|
+
## [6.4.3](https://github.com/Applitools-Dev/sdk/compare/ruby/eyes_calabash@6.4.2...ruby/eyes_calabash@6.4.3) (2025-05-22)
|
84
|
+
|
85
|
+
|
86
|
+
### Dependencies
|
87
|
+
|
88
|
+
* eyes_universal bumped to 4.38.0
|
89
|
+
#### Features
|
90
|
+
|
91
|
+
* adding the mac-arm64 binary ([#2975](https://github.com/Applitools-Dev/sdk/issues/2975)) ([95d647f](https://github.com/Applitools-Dev/sdk/commit/95d647ff4a451309d985a786f7cec544d926f0e5))
|
92
|
+
* eyes_core bumped to 6.7.1
|
93
|
+
|
94
|
+
|
3
95
|
## [6.4.2](https://github.com/Applitools-Dev/sdk/compare/ruby/eyes_calabash@6.4.1...ruby/eyes_calabash@6.4.2) (2025-04-17)
|
4
96
|
|
5
97
|
|
data/LICENSE
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
- -
|
2
|
+
SDK LICENSE AGREEMENT
|
3
|
+
IMPORTANT - PLEASE READ CAREFULLY THE TERMS OF THIS LICENSE AGREEMENT ("AGREEMENT"). BY INSTALLING, ACCESSING AND/OR USING THE SOFTWARE (AS DEFINED BELOW), YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT YOU, OR THE COMPANY YOU REPRESENT, ("YOU" OR "LICENSEE") ARE ENTERING INTO A LEGAL AGREEMENT WITH APPLITOOLS LTD. AND ITS AFFILIATES ("APPLITOOLS"), AND HAVE UNDERSTOOD AND AGREE TO COMPLY WITH, AND BE LEGALLY BOUND BY, THE TERMS AND CONDITIONS OF THIS AGREEMENT. YOU HEREBY WAIVE ANY RIGHTS OR REQUIREMENTS UNDER ANY LAWS OR REGULATIONS IN ANY JURISDICTION WHICH REQUIRE AN ORIGINAL (NON-ELECTRONIC) SIGNATURE OR DELIVERY OR RETENTION OF NON-ELECTRONIC RECORDS, TO THE EXTENT PERMITTED UNDER APPLICABLE LAW.
|
4
|
+
THE SOFTWARE MAY BE USED SOLELY FOR YOUR PERSONAL, NON-COMMERCIAL PURPOSES. FOR COMMERCIAL PURPOSES PLEASE CONTACT THE REGIONAL APPLITOOLS BUSINESS REPRESENTATIVE.
|
5
|
+
1. Definitions. For purposes of this Agreement, the following capitalized terms shall have the following meaning:
|
6
|
+
1. "Documentation" means the user's guides and technical manuals delivered by Applitools to Licensee.
|
7
|
+
2. "Feedback" means suggestions, comments or feedback (whether orally or in writing) with respect to the Software.
|
8
|
+
3. "Intellectual Property Rights" means all intangible legal rights, titles and interests evidenced by or embodied in all: (i) inventions (regardless of patentability and whether or not reduced to practice), improvements thereto, patents, patent applications, patent disclosures, together with all reissuances, continuations, continuations in part, revisions, extensions and reexaminations thereof; (ii) trademarks, service marks, trade dress, logos, trade names, corporate names, together with translations, adaptations, derivations and combinations thereof, including goodwill associated therewith, and applications, registrations, and renewals in connection therewith; (iii) any work of authorship, regardless of copyrightable, copyrightable works, copyrights (including moral rights), and applications, registrations and renewals in connection therewith; (iv) mask works and applications, registrations and renewals in connection therewith; (v) trade secrets and Confidential Information; and (vi) other proprietary rights and any other similar rights, in each case on a worldwide basis, and copies and tangible embodiments thereof, in whatever form or medium.
|
9
|
+
4. "License" means the right to use the Software pursuant to Section 2.1 to this Agreement.
|
10
|
+
5. "Software" means Applitools' software development kit software in object or source code version, Documentation and any updates and upgrade thereto (to the extent delivered).
|
11
|
+
1. License
|
12
|
+
1. Grant of License. Subject to the terms and conditions of this Agreement, Applitools grants You, during the Term, a personal, non-exclusive, non-sublicensable, non-transferable, revocable license to: (i) use the Software solely for Your own personal (non-commercial) use and (ii) use and display Applitools' Marks solely for the purpose of publicizing or advertising that You are using the Software.
|
13
|
+
2. Documentation. Applitools may make available Documentation to Licensee for Licensee to use solely in connection with Licensee's use of the Software during the term of this Agreement. Licensee may print or copy the Documentation as needed for its own purposes provided that all copyright notices are included therein. The Documentation shall be considered the Confidential Information of Applitools.
|
14
|
+
1. Reservation of Rights; Use Restrictions. Other than the rights explicitly granted in this Agreement, Licensee shall have no other rights, express or implied, in the Software. Without limiting the generality of the foregoing, Licensee agrees and undertakes not to: (i) allow any third party to use the Software in any manner, including but not limited to, sell, lease, sublicense or distribute the Software, or any part thereof; (ii) modify, revise, or alter the Software or reverse engineer, decompile, disassemble or otherwise reduce to human-perceivable form the Software's source code; (iii) copy or allow copies of the Software to be made; (iv) remove, alter or obscure any proprietary notice or identification, including copyright, trademark, patent or other notices, contained in or displayed on or via the Software; (v) use the Software to violate any applicable laws, rules or regulations, or for any unlawful, harmful, irresponsible, or inappropriate purpose, or in any manner that breaches this Agreement, and/or (vi) represent that it possesses any proprietary interest in the Software.
|
15
|
+
1. Third Party Software. Licensee acknowledges and agrees that any third party software ("Third Party Software") that provided with the Software is provided under the terms of the license attached/linked thereto or, if no such license is attached, such Third Party Software is provided for free and on "AS IS" basis. Applitools is not liable for any losses or damages which may occur resulting from the use of any Third Party Software. Applitools does not possess any proprietary interest in such Third Party Software.
|
16
|
+
1. Open Source Licenses. The Software includes certain open source code software and materials (as shall be listed in the documentation of the Software) ("Open Source Software") that are subject to their respective open source licenses ("Open Source Licenses"). Such Open Source Licenses contain a list of conditions with respect to warranty, copyright policy and other provisions. By executing this Agreement, Licensee undertakes to strictly comply with the terms and condition of the Open Source Licenses, as may be amended from time to time. In order to comply with the Open Source Licenses, Licensee shall read the respective licenses or notices, such list of Open Source Licenses may be amended from time to time by Applitools, at its sole discretion. In the event of any inconsistencies or conflicting provisions between the provisions of the Open Source Licenses and the provisions of this Agreement, the provisions of the Open Source Licenses shall prevail. Without derogating from the generality of the foregoing, it is clarified that any Open Source Software is provided on an "AS IS" basis, without indemnity or warranty of any kind, whether express or implied. For clarity, the representations and warranties set forth in Section 4 hereunder shall not apply to any Open Source Software.
|
17
|
+
1. Title & Ownership. APPLITOOLS DOES NOT SELL OR TRANSFER TITLE IN THE SOFTWARE, OR ANY PART THEREOF, TO LICENSEE. The Documentation, Software (excluding any Open Source Software and Third Party Software therein which are owned by their respective licensors) and/or any copies thereof, including without limitation any derivative works made (regardless of whether such derivative works were made and/or developed pursuant to the request and/or specifications of Licensee, and irrespective of any support and/or assistance Applitools may, will or had received from Licensee, or any third party on its behalf, with respect thereto), as well as any updates or upgrades thereto, if provided to Applitools pursuant to this Agreement, shall remain Applitools' sole and exclusive property. All Intellectual Property Rights evidenced by or embodied in and/or attached/connected/related to the Software, or part thereof, are and shall be owned solely and exclusively by Applitools. Nothing in this Agreement shall constitute a waiver of Applitools' Intellectual Property Rights under any law, or be in any way construed or interpreted as such. It is further agreed that to the extent Licensee provides Applitools with Feedback, Licensee acknowledges that any and all rights, including Intellectual Property Rights in such Feedback shall belong exclusively to Applitools and Licensee hereby irrevocably and unconditionally transfers and assigns to Applitools all intellectual property rights in such Feedback and waives any and all moral rights that Licensee may have in respect thereto. It is further understood that use of Feedback, if any, may be made by Applitools at its sole discretion, and that Applitools in no way shall be obliged to make use of any kind of the Feedback or part thereof.
|
18
|
+
1. Warranty. Applitools warrants that to its knowledge it has the right to grant the license under this Agreement. Applitools' sole liability for any breach of this warranty or any other warranty under this Agreement shall be, at Applitools' sole discretion: (i) to replace or repair the Software or the applicable portion thereof; or (ii) to terminate this Agreement.
|
19
|
+
2. Warranty Exclusions. The warranties set forth in Section 4 are contingent upon Licensee's proper use of the Software, and shall not apply to damage caused by abuse, misuse, alteration, neglect or unauthorized repair or installation, or by the use or attempted use of Software other than that supplied and supported by Applitools. Applitools will use reasonable commercial efforts to repair or replace the Software or the applicable portion thereof, pursuant to the foregoing warranty within thirty (30) days of being so notified.
|
20
|
+
1. Warranty Disclaimers. AS BETWEEN LICENSEE AND APPLITOOLS, EXCEPT AS SET IN SECTION 4, THE SOFTWARE IS PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS WITHOUT WARRANTIES OF ANY KIND INCLUDING, WITHOUT LIMITATION, REPRESENTATIONS, WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR INTENDED OR PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, THAT THE SOFTWARE WILL MEET LICENSEE'S REQUIREMENTS OR EXPECTATIONS OR WILL ACHIEVE ANY SPECIFIC RESULTS AND THOSE ARISING BY STATUTE OR FROM A COURSE OF DEALING OR USAGE OF TRADE. Applicable law may not allow the exclusion of certain warranties, so to that extent such exclusions may not apply.
|
21
|
+
1. High Risk Activities. You acknowledge that the Software is not fault tolerant and is not designed, manufactured, or intended for use or resale as on-line control equipment in hazardous or high risk environments and activities requiring fail-safe performance (such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines and/or devices, or weapons systems) in which the failure of the Software could lead directly to death, personal injury, or severe physical or environmental damage, and You agree not to use or allow the use of the Software or any portion thereof for, or in connection with, any such environment or activity.
|
22
|
+
1. Indemnify. You agree that Applitools shall have no liability whatsoever for any use made of the Software by You or any third party. You hereby agree to defend, indemnify and hold harmless Applitools and its affiliates and their respective officers, directors, agents and employees from any and all claims, damages, liabilities, costs, and expenses (including attorney's fees) arising from claims related to Your use of the Software as well as from Your failure to comply with this Agreement.
|
23
|
+
1. Limitation of Liability. UNDER NO CIRCUMSTANCES SHALL APPLITOOLS AND/OR ITS AFFILIATES BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR FOR ANY LOSS OF DATA, REVENUE, BUSINESS OR REPUTATION, THAT ARISES UNDER OR IN CONNECTION WITH THIS AGREEMENT, OR THAT RESULTS FROM THE USE OF, OR THE INABILITY TO USE, THE SOFTWARE. APPLITOOLS'S TOTAL AGGREGATE LIABILITY FOR ANY AND ALL DIRECT DAMAGES AND LOSSES THAT ARISE UNDER OR IN CONNECTION WITH THIS AGREEMENT SHALL NOT IN ANY CIRCUMSTANCE EXCEED THE AMOUNT OF 100.00 (ONE HUNDRED) UNITED STATES DOLLARS. THE FOREGOING LIMITATIONS AND EXCLUSIONS IN THIS SECTION 7 SHALL APPLY: (I) EVEN IF APPLITOOLS HAS BEEN ADVISED OF THE POSSIBILITY OF ANY DAMAGES OR LOSSES; (II) EVEN IF ANY REMEDY SET FORTH HEREIN FAILS OF ITS ESSENTIAL PURPOSE; AND (III) REGARDLESS OF THE BASIS OR THEORY OF LIABILITY.
|
24
|
+
1. Export Laws. Licensee agrees to comply fully with all U.S., EU, Israeli, and all applicable export laws and regulations to ensure that neither the Software nor any technical data related thereto are exported or re-exported directly or indirectly in violation of, or used for any purposes prohibited by, such laws and regulations. For clarity, and without derogating from Section 11 below, in case of any change of any applicable law, policy or regulation, which might affect Applitools' business, Applitools will have the right to terminate this Agreement and the license granted hereunder and the Licensee shall have no claims regarding such termination.
|
25
|
+
1. Term and Termination. This Agreement shall continue until terminated as set forth in this section (the "Term"). You may terminate this Agreement at any time by removing the Software from Your system and destroying all copies of the Software and Documentation relating to the Software. Unauthorized copying of the Software or otherwise failing to comply with this Agreement will result in automatic immediate termination of this Agreement and will make available to Applitools legal remedies. Applitools reserves the right to terminate this Agreement and the License at any time and without notice. Upon termination of this Agreement, the License will terminate and You: (i) will cease any and all rights to use the Software, and (ii) will remove the Software from all hard drives, networks and other storage media and destroy all copies of the Software in your possession or under your control. The provisions of Sections 2.3, 2.4, 2.5, 6, 7, 8, 9, 10, 11 and 12 shall survive the termination, expiration or other ending of this Agreement.
|
26
|
+
1. Miscellaneous. This Agreement represents the complete agreement concerning the Software between You and Applitools and supersedes all prior agreements and representations between You and Applitools. If any provision of this Agreement is held to be unenforceable for any reason, such provision shall be reformed only to the extent necessary to make it enforceable. Any waiver of any provision of this Agreement will be effective only if in writing and signed by Applitools. This Agreement is personal to You and may not be assigned or transferred for any reason whatsoever without the consent of Applitools and any action or conduct in violation of the foregoing shall be void and without effect. Applitools expressly reserves the right to assign this Agreement and to delegate any of its obligations hereunder. This Agreement are governed by and construed under the laws of the State of Israel, excluding its conflicts of law rules. You expressly agree that the exclusive jurisdiction for any claim or action arising out of or relating to this Agreement shall be the courts located in Tel Aviv, Israel, and You further agree and submit to the exercise of personal jurisdiction of such courts for the purpose of litigating any such claim or action. In any action or proceeding to enforce rights under this Agreement, the prevailing party shall be entitled to recover costs and attorneys' fees.
|
data/README.md
ADDED
@@ -0,0 +1,483 @@
|
|
1
|
+
# Applitools Eyes Calabash SDK
|
2
|
+
|
3
|
+
[](https://badge.fury.io/rb/eyes_calabash)
|
4
|
+
|
5
|
+
> **⚠️ DEPRECATION NOTICE**: The Calabash framework is no longer actively maintained. Microsoft discontinued their contributions after iOS 11 and Android 8 support, and Visual Studio App Center (which integrated with Calabash) is retiring on March 31, 2025. For mobile visual testing, we strongly recommend using the [Applitools Eyes Appium SDK](../eyes_appium) instead, which provides better support and active development for mobile applications.
|
6
|
+
|
7
|
+
The Applitools Eyes Calabash SDK brings visual testing to your Calabash mobile automation. Test native mobile apps on Android and iOS with AI-powered visual validations.
|
8
|
+
|
9
|
+
## Table of Contents
|
10
|
+
1. [Overview](#overview)
|
11
|
+
2. [Installation](#installation)
|
12
|
+
3. [Quick Start](#quick-start)
|
13
|
+
4. [Key Components](#key-components)
|
14
|
+
- [Eyes Class](#eyes-class)
|
15
|
+
- [Target Class](#target-class)
|
16
|
+
- [Screenshot Management](#screenshot-management)
|
17
|
+
- [Environment Detection](#environment-detection)
|
18
|
+
- [Scrollable Content Handling](#scrollable-content-handling)
|
19
|
+
5. [Advanced Usage](#advanced-usage)
|
20
|
+
- [Region-Based Testing](#region-based-testing)
|
21
|
+
- [Full Page Capture](#full-page-capture)
|
22
|
+
- [Ignoring Regions](#ignoring-regions)
|
23
|
+
- [Debug Screenshots](#debug-screenshots)
|
24
|
+
- [Device Pixel Ratio](#device-pixel-ratio)
|
25
|
+
6. [Integration with Cucumber](#integration-with-cucumber)
|
26
|
+
- [Step Definitions](#step-definitions)
|
27
|
+
- [Hooks](#hooks)
|
28
|
+
- [RSpec Matchers](#rspec-matchers)
|
29
|
+
7. [Platform-Specific Features](#platform-specific-features)
|
30
|
+
- [Android Specifics](#android-specifics)
|
31
|
+
- [iOS Specifics](#ios-specifics)
|
32
|
+
8. [Best Practices](#best-practices)
|
33
|
+
9. [Common Pitfalls](#common-pitfalls)
|
34
|
+
10. [FAQ](#faq)
|
35
|
+
|
36
|
+
## Overview
|
37
|
+
|
38
|
+
The Applitools Eyes Calabash SDK integrates visual testing with Calabash mobile automation framework. It enables you to capture and validate the visual appearance of your mobile applications on both Android and iOS platforms.
|
39
|
+
|
40
|
+
### Key Features
|
41
|
+
|
42
|
+
- **Cross-Platform Support**: Works with both Android and iOS applications
|
43
|
+
- **Cucumber Integration**: Pre-defined step definitions for easy test writing
|
44
|
+
- **Scrollable Content**: Automatic capture of scrollable views
|
45
|
+
- **Platform Detection**: Automatically adapts to the target platform
|
46
|
+
- **Region-Based Testing**: Focus on specific UI elements
|
47
|
+
- **RSpec Matchers**: Custom matchers for visual validation
|
48
|
+
- **Debug Support**: Save screenshots for troubleshooting
|
49
|
+
|
50
|
+
The SDK handles platform-specific complexities such as screenshot capturing, element detection, and scrollable content stitching, allowing you to focus on writing tests rather than dealing with implementation details.
|
51
|
+
|
52
|
+
## Installation
|
53
|
+
|
54
|
+
Add the gem to your Gemfile:
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
gem 'eyes_calabash'
|
58
|
+
```
|
59
|
+
|
60
|
+
Or install it directly:
|
61
|
+
|
62
|
+
```bash
|
63
|
+
gem install eyes_calabash
|
64
|
+
```
|
65
|
+
|
66
|
+
### Dependencies
|
67
|
+
|
68
|
+
The Eyes Calabash SDK has the following dependencies:
|
69
|
+
- `eyes_core` - Core Applitools functionality
|
70
|
+
- `calabash-android` or `calabash-cucumber` for iOS tests
|
71
|
+
|
72
|
+
> **Note:** The SDK operates with minimal dependencies for better compatibility across different environments.
|
73
|
+
|
74
|
+
## Quick Start
|
75
|
+
|
76
|
+
Here's a simple example of using Eyes Calabash in a Cucumber feature file:
|
77
|
+
|
78
|
+
```gherkin
|
79
|
+
Feature: Visual Testing with Calabash
|
80
|
+
|
81
|
+
Scenario: Check the home screen
|
82
|
+
Given I start the app
|
83
|
+
And I use Eyes with app name "My App" and test name "Home Screen Test"
|
84
|
+
Then I check the window with tag "Home Screen"
|
85
|
+
And I close Eyes session
|
86
|
+
```
|
87
|
+
|
88
|
+
These steps are automatically provided by the SDK. Behind the scenes, they execute the following Ruby code:
|
89
|
+
|
90
|
+
```ruby
|
91
|
+
require 'eyes_calabash'
|
92
|
+
|
93
|
+
# Initialize Eyes
|
94
|
+
eyes = Applitools::Calabash::Eyes.new
|
95
|
+
eyes.api_key = ENV['APPLITOOLS_API_KEY']
|
96
|
+
|
97
|
+
# Start the test
|
98
|
+
eyes.open(app_name: 'My App', test_name: 'Home Screen Test')
|
99
|
+
|
100
|
+
# Perform a visual validation
|
101
|
+
eyes.check('Home Screen', Applitools::Calabash::Target.new)
|
102
|
+
|
103
|
+
# Close the test
|
104
|
+
eyes.close
|
105
|
+
```
|
106
|
+
|
107
|
+
## Key Components
|
108
|
+
|
109
|
+
### Eyes Class
|
110
|
+
|
111
|
+
The `Applitools::Calabash::Eyes` class is the main entry point for the SDK. It provides methods for:
|
112
|
+
|
113
|
+
- Starting test sessions with `open`
|
114
|
+
- Capturing and comparing screenshots with `check`
|
115
|
+
- Ending test sessions with `close`
|
116
|
+
- Setting capture options like viewport size, match level, etc.
|
117
|
+
|
118
|
+
It automatically detects whether you're running on Android or iOS and adjusts its behavior accordingly.
|
119
|
+
|
120
|
+
### Target Class
|
121
|
+
|
122
|
+
The `Applitools::Calabash::Target` class defines what to capture during a check operation:
|
123
|
+
|
124
|
+
```ruby
|
125
|
+
# Check the entire screen
|
126
|
+
eyes.check('Home Screen', Applitools::Calabash::Target.new)
|
127
|
+
|
128
|
+
# Check with full page capturing (scrolling)
|
129
|
+
eyes.check('Scrollable Screen', Applitools::Calabash::Target.new.fully)
|
130
|
+
|
131
|
+
# Check a specific element
|
132
|
+
element = query("* marked:'username'").first
|
133
|
+
calabash_element = Applitools::Calabash::CalabashElement.new(element)
|
134
|
+
eyes.check('Username Field', Applitools::Calabash::Target.new.region(calabash_element))
|
135
|
+
```
|
136
|
+
|
137
|
+
### Screenshot Management
|
138
|
+
|
139
|
+
The SDK provides platform-specific screenshot handling:
|
140
|
+
|
141
|
+
- Android-specific screenshot capture
|
142
|
+
- iOS-specific screenshot capture
|
143
|
+
|
144
|
+
These features handle capturing screenshots at the right resolution, accounting for device pixel ratios, and managing debug screenshot captures.
|
145
|
+
|
146
|
+
### Environment Detection
|
147
|
+
|
148
|
+
The `EnvironmentDetector` class automatically determines whether your test is running on Android or iOS, ensuring the right platform-specific code is used.
|
149
|
+
|
150
|
+
### Scrollable Content Handling
|
151
|
+
|
152
|
+
One of the most powerful features is the ability to capture scrollable content with the `fully` method:
|
153
|
+
|
154
|
+
```ruby
|
155
|
+
# Capture a scrollable view by automatically scrolling and stitching
|
156
|
+
eyes.check('Full Page', Applitools::Calabash::Target.new.fully)
|
157
|
+
```
|
158
|
+
|
159
|
+
The SDK includes specialized algorithms for different scrollable containers:
|
160
|
+
- Android ScrollView
|
161
|
+
- iOS UITableView
|
162
|
+
|
163
|
+
## Advanced Usage
|
164
|
+
|
165
|
+
### Standardized Screenshot Handling
|
166
|
+
|
167
|
+
The SDK offers standardized screenshot handling:
|
168
|
+
|
169
|
+
```ruby
|
170
|
+
# Initialize Eyes
|
171
|
+
eyes = Applitools::Calabash::Eyes.new
|
172
|
+
|
173
|
+
# Perform a check with optimized processing
|
174
|
+
eyes.check('Home Screen', Applitools::Calabash::Target.new)
|
175
|
+
```
|
176
|
+
|
177
|
+
Benefits include:
|
178
|
+
- Cross-platform consistency
|
179
|
+
- Platform-optimized image processing
|
180
|
+
- Accurate region identification
|
181
|
+
- Efficient execution
|
182
|
+
|
183
|
+
> **Note:** The SDK maintains backward compatibility with existing tests.
|
184
|
+
|
185
|
+
### Region-Based Testing
|
186
|
+
|
187
|
+
You can check specific regions of the screen by using the Calabash query mechanism:
|
188
|
+
|
189
|
+
```ruby
|
190
|
+
# Find an element using Calabash's query and create a Calabash Element
|
191
|
+
element = query("* marked:'submit_button'").first
|
192
|
+
calabash_element = Applitools::Calabash::CalabashElement.new(element)
|
193
|
+
|
194
|
+
# Check just that element
|
195
|
+
eyes.check('Submit Button', Applitools::Calabash::Target.new.region(calabash_element))
|
196
|
+
```
|
197
|
+
|
198
|
+
### Full Page Capture
|
199
|
+
|
200
|
+
For scrollable content, use the `fully` method on the Target class:
|
201
|
+
|
202
|
+
```ruby
|
203
|
+
# This will automatically scroll and capture the entire content
|
204
|
+
eyes.check('Scrollable Content', Applitools::Calabash::Target.new.fully)
|
205
|
+
```
|
206
|
+
|
207
|
+
The SDK automatically detects common scrollable containers and uses the appropriate scrolling algorithm.
|
208
|
+
|
209
|
+
### Ignoring Regions
|
210
|
+
|
211
|
+
To ignore specific regions during comparison:
|
212
|
+
|
213
|
+
```ruby
|
214
|
+
# Find an element to ignore (like a dynamic timestamp) and create a Calabash Element
|
215
|
+
timestamp_element = query("* marked:'timestamp'").first
|
216
|
+
calabash_timestamp = Applitools::Calabash::CalabashElement.new(timestamp_element)
|
217
|
+
|
218
|
+
# Ignore this element during the check
|
219
|
+
target = Applitools::Calabash::Target.new.ignore(calabash_timestamp)
|
220
|
+
eyes.check('Home Screen', target)
|
221
|
+
```
|
222
|
+
|
223
|
+
### Debug Screenshots
|
224
|
+
|
225
|
+
For troubleshooting, you can enable debug screenshots:
|
226
|
+
|
227
|
+
```ruby
|
228
|
+
eyes.debug_screenshots = true
|
229
|
+
```
|
230
|
+
|
231
|
+
This will save additional screenshots during the check process to help diagnose issues.
|
232
|
+
|
233
|
+
### Device Pixel Ratio
|
234
|
+
|
235
|
+
The SDK automatically handles device pixel ratio (display density) on different devices, but you can also set it manually if needed:
|
236
|
+
|
237
|
+
```ruby
|
238
|
+
eyes.device_pixel_ratio = 2.0
|
239
|
+
```
|
240
|
+
|
241
|
+
## Integration with Cucumber
|
242
|
+
|
243
|
+
### Step Definitions
|
244
|
+
|
245
|
+
The SDK provides pre-defined step definitions for use in your Cucumber features:
|
246
|
+
|
247
|
+
```gherkin
|
248
|
+
# Initialize Eyes
|
249
|
+
Given I use Eyes with app name "My App" and test name "My Test"
|
250
|
+
|
251
|
+
# Set the viewport size
|
252
|
+
And I set the viewport size to 320x480
|
253
|
+
|
254
|
+
# Check operations
|
255
|
+
Then I check the window with tag "Home Screen"
|
256
|
+
And I check the element "username_field" with tag "Username Field"
|
257
|
+
And I check the window fully with tag "Full Page"
|
258
|
+
|
259
|
+
# Close Eyes
|
260
|
+
And I close Eyes session
|
261
|
+
```
|
262
|
+
|
263
|
+
### Hooks
|
264
|
+
|
265
|
+
You can use Cucumber hooks to set up and tear down Eyes sessions:
|
266
|
+
|
267
|
+
```ruby
|
268
|
+
# env.rb or hooks.rb
|
269
|
+
Before do |scenario|
|
270
|
+
@eyes = Applitools::Calabash::Eyes.new
|
271
|
+
@eyes.api_key = ENV['APPLITOOLS_API_KEY']
|
272
|
+
end
|
273
|
+
|
274
|
+
After do |scenario|
|
275
|
+
@eyes.abort_if_not_closed
|
276
|
+
end
|
277
|
+
```
|
278
|
+
|
279
|
+
### RSpec Matchers
|
280
|
+
|
281
|
+
The SDK includes RSpec matchers for visual validation:
|
282
|
+
|
283
|
+
```ruby
|
284
|
+
# Match a specific element against the baseline
|
285
|
+
expect(element).to visually_match('Username Field')
|
286
|
+
|
287
|
+
# Match the entire screen
|
288
|
+
expect(screen).to visually_match('Home Screen')
|
289
|
+
```
|
290
|
+
|
291
|
+
## Platform-Specific Features
|
292
|
+
|
293
|
+
### Android Specifics
|
294
|
+
|
295
|
+
The SDK includes specialized support for Android:
|
296
|
+
|
297
|
+
- Automatic handling of Android's activity hierarchy
|
298
|
+
- Support for ScrollView and ListView scrollable elements
|
299
|
+
- Android-specific step definitions in Cucumber
|
300
|
+
|
301
|
+
### iOS Specifics
|
302
|
+
|
303
|
+
For iOS, the SDK provides:
|
304
|
+
|
305
|
+
- Support for UITableView and UIScrollView scrollable elements
|
306
|
+
- Handling of iOS status bar and navigation bar
|
307
|
+
- iOS-specific step definitions in Cucumber
|
308
|
+
|
309
|
+
## Best Practices
|
310
|
+
|
311
|
+
1. **API Key Management**: Always use environment variables for your API key
|
312
|
+
```ruby
|
313
|
+
eyes.api_key = ENV['APPLITOOLS_API_KEY']
|
314
|
+
```
|
315
|
+
|
316
|
+
2. **Error Handling**: Always include proper cleanup in Cucumber hooks
|
317
|
+
```ruby
|
318
|
+
After do |scenario|
|
319
|
+
@eyes.abort_if_not_closed
|
320
|
+
end
|
321
|
+
```
|
322
|
+
|
323
|
+
3. **Meaningful Test Names**: Use descriptive names for your tests and checks
|
324
|
+
```ruby
|
325
|
+
eyes.open(app_name: 'Banking App', test_name: 'Login Flow - Android')
|
326
|
+
eyes.check('Login Form', target)
|
327
|
+
```
|
328
|
+
|
329
|
+
4. **Batch Tests**: Group related tests in a batch
|
330
|
+
```ruby
|
331
|
+
batch = Applitools::BatchInfo.new('Login Flow Tests')
|
332
|
+
eyes.batch = batch
|
333
|
+
```
|
334
|
+
|
335
|
+
5. **Scrollable Content**: When testing scrollable content, use the `fully` method
|
336
|
+
```ruby
|
337
|
+
eyes.check('Feed Screen', Applitools::Calabash::Target.new.fully)
|
338
|
+
```
|
339
|
+
|
340
|
+
6. **Stable Identifiers**: Use stable identifiers for elements in your application to ensure consistent testing
|
341
|
+
```ruby
|
342
|
+
# Good - uses a stable identifier
|
343
|
+
element = query("* marked:'login_button'").first
|
344
|
+
|
345
|
+
# Avoid - potentially unstable
|
346
|
+
element = query("button index:0").first
|
347
|
+
```
|
348
|
+
|
349
|
+
7. **Viewport Configuration**: Set a consistent viewport size for tests
|
350
|
+
```ruby
|
351
|
+
eyes.open(
|
352
|
+
app_name: 'My App',
|
353
|
+
test_name: 'My Test',
|
354
|
+
viewport_size: { width: 375, height: 667 }
|
355
|
+
)
|
356
|
+
```
|
357
|
+
|
358
|
+
## Common Pitfalls
|
359
|
+
|
360
|
+
1. **Missing API Key**: Forgetting to set the API key
|
361
|
+
```ruby
|
362
|
+
# This must be set before calling eyes.open
|
363
|
+
eyes.api_key = ENV['APPLITOOLS_API_KEY']
|
364
|
+
```
|
365
|
+
|
366
|
+
2. **Resource Cleanup**: Failing to close Eyes or abort if an exception occurs
|
367
|
+
```ruby
|
368
|
+
# Always include in After hook or ensure block
|
369
|
+
eyes.abort_if_not_closed
|
370
|
+
```
|
371
|
+
|
372
|
+
3. **Element Not Found**: Trying to check elements that don't exist
|
373
|
+
```ruby
|
374
|
+
# Always check that your queries return results
|
375
|
+
elements = query("* marked:'login_button'")
|
376
|
+
if elements.any?
|
377
|
+
calabash_element = Applitools::Calabash::CalabashElement.new(elements.first)
|
378
|
+
eyes.check('Login Button', Applitools::Calabash::Target.new.region(calabash_element))
|
379
|
+
else
|
380
|
+
puts "Warning: Login button not found"
|
381
|
+
end
|
382
|
+
```
|
383
|
+
|
384
|
+
4. **Scrollable Content Issues**: Not waiting for scrolling to complete
|
385
|
+
```ruby
|
386
|
+
# Always ensure animations have completed before visual checks
|
387
|
+
wait_for_none_animating
|
388
|
+
eyes.check('Scrollable Content', Applitools::Calabash::Target.new.fully)
|
389
|
+
```
|
390
|
+
|
391
|
+
5. **Device Orientation**: Inconsistent device orientation between tests
|
392
|
+
```ruby
|
393
|
+
# Set a consistent orientation before visual testing
|
394
|
+
rotate_device("portrait")
|
395
|
+
eyes.check('Home Screen', Applitools::Calabash::Target.new)
|
396
|
+
```
|
397
|
+
|
398
|
+
6. **Custom Screenshot Handling**: Working with screenshots
|
399
|
+
```ruby
|
400
|
+
# Recommended: Use public API methods for screenshot handling
|
401
|
+
eyes.check('Home Screen', Applitools::Calabash::Target.new)
|
402
|
+
|
403
|
+
# Avoid: Directly accessing internal implementation details
|
404
|
+
# Use the public API for more stable behavior
|
405
|
+
```
|
406
|
+
|
407
|
+
## FAQ
|
408
|
+
|
409
|
+
### How do I set my API key?
|
410
|
+
|
411
|
+
```ruby
|
412
|
+
eyes.api_key = ENV['APPLITOOLS_API_KEY']
|
413
|
+
```
|
414
|
+
|
415
|
+
It's recommended to use environment variables rather than hardcoding API keys.
|
416
|
+
|
417
|
+
### Can I use Eyes Calabash with both Android and iOS?
|
418
|
+
|
419
|
+
Yes, the SDK automatically detects which platform you're running on and adjusts its behavior accordingly. The same code works for both platforms.
|
420
|
+
|
421
|
+
### How do I handle dynamic content that changes between test runs?
|
422
|
+
|
423
|
+
You can use the ignore regions feature:
|
424
|
+
|
425
|
+
```ruby
|
426
|
+
# Find the dynamic element
|
427
|
+
dynamic_element = query("* marked:'timestamp'").first
|
428
|
+
calabash_dynamic = Applitools::Calabash::CalabashElement.new(dynamic_element)
|
429
|
+
|
430
|
+
# Ignore this element during checks
|
431
|
+
target = Applitools::Calabash::Target.new.ignore(calabash_dynamic)
|
432
|
+
eyes.check('Home Screen', target)
|
433
|
+
```
|
434
|
+
|
435
|
+
### How do I check scrollable content like a feed or a long form?
|
436
|
+
|
437
|
+
Use the `fully` method:
|
438
|
+
|
439
|
+
```ruby
|
440
|
+
eyes.check('Feed Screen', Applitools::Calabash::Target.new.fully)
|
441
|
+
```
|
442
|
+
|
443
|
+
This will automatically scroll through the content and stitch the screenshots together.
|
444
|
+
|
445
|
+
### What if my app has custom scrollable containers?
|
446
|
+
|
447
|
+
The SDK supports common containers like Android ScrollView and iOS UITableView. For custom containers, you may need to implement your own scrolling in Calabash before visual checks.
|
448
|
+
|
449
|
+
### How do I debug visual test failures?
|
450
|
+
|
451
|
+
1. Enable debug screenshots:
|
452
|
+
```ruby
|
453
|
+
eyes.debug_screenshots = true
|
454
|
+
```
|
455
|
+
|
456
|
+
2. Check the Applitools dashboard for visual differences.
|
457
|
+
|
458
|
+
3. Use this code to log more information:
|
459
|
+
```ruby
|
460
|
+
Applitools::EyesLogger.log_handler = Logger.new(STDOUT)
|
461
|
+
Applitools::EyesLogger.log_handler.level = Logger::DEBUG
|
462
|
+
```
|
463
|
+
|
464
|
+
### How do I handle different device screen sizes and resolutions?
|
465
|
+
|
466
|
+
The SDK automatically handles device pixel ratios. For handling different screen sizes, you can use baseline branches:
|
467
|
+
|
468
|
+
```ruby
|
469
|
+
# Set a branch name based on the device type
|
470
|
+
eyes.branch_name = "iPhone8"
|
471
|
+
# or
|
472
|
+
eyes.branch_name = "SamsungGalaxyS9"
|
473
|
+
```
|
474
|
+
|
475
|
+
### Can I use Eyes Calabash with Calabash-Android and Calabash-iOS?
|
476
|
+
|
477
|
+
Yes, the SDK is designed to work with both platforms and will automatically detect which one you're using.
|
478
|
+
|
479
|
+
## License
|
480
|
+
|
481
|
+
This SDK is distributed under the Applitools SDK License Agreement. See the [LICENSE](LICENSE) file for more details.
|
482
|
+
|
483
|
+
**Important:** This SDK may be used solely for your personal, non-commercial purposes. For commercial use, please contact your Applitools representative or visit [applitools.com](https://applitools.com) to obtain a commercial license.
|
data/eyes_calabash.gemspec
CHANGED
@@ -10,17 +10,25 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.version = Applitools::EyesCalabash::VERSION
|
11
11
|
spec.authors = ['Applitools Team']
|
12
12
|
spec.email = ['team@applitools.com']
|
13
|
-
spec.description = 'Provides SDK for writing Applitools Calabash tests.'
|
14
|
-
spec.summary = 'Applitools Ruby Calabash SDK'
|
13
|
+
spec.description = 'Provides SDK for writing Applitools Calabash tests. DEPRECATED: Calabash is no longer actively maintained. Please use eyes_appium for mobile testing.'
|
14
|
+
spec.summary = 'Applitools Ruby Calabash SDK (DEPRECATED - use eyes_appium instead)'
|
15
15
|
spec.homepage = 'https://www.applitools.com'
|
16
|
-
spec.license = '
|
16
|
+
spec.license = 'Proprietary'
|
17
17
|
|
18
18
|
spec.metadata['yard.run'] = 'yri' # use "yard" to build full HTML docs.
|
19
|
+
spec.post_install_message = <<-MESSAGE
|
20
|
+
WARNING: eyes_calabash is deprecated!
|
21
|
+
The Calabash framework is no longer actively maintained by Microsoft.
|
22
|
+
Visual Studio App Center (which integrated with Calabash) is retiring on March 31, 2025.
|
23
|
+
Please migrate to eyes_appium for mobile visual testing, which provides better support and active development.
|
24
|
+
MESSAGE
|
19
25
|
|
20
26
|
spec.files = `git ls-files lib/applitools/calabash`.split($RS) + [
|
21
27
|
'lib/eyes_calabash.rb',
|
22
28
|
'lib/applitools/calabash_steps.rb',
|
23
29
|
'lib/applitools/eyes_calabash/version.rb',
|
30
|
+
'LICENSE',
|
31
|
+
'README.md',
|
24
32
|
'CHANGELOG.md',
|
25
33
|
'eyes_calabash.gemspec',
|
26
34
|
'Rakefile',
|
@@ -31,5 +39,5 @@ Gem::Specification.new do |spec|
|
|
31
39
|
spec.add_dependency 'cucumber'
|
32
40
|
spec.add_dependency 'file_utils'
|
33
41
|
spec.add_dependency 'rspec-expectations'
|
34
|
-
spec.add_dependency 'eyes_core', "= 6.7.
|
42
|
+
spec.add_dependency 'eyes_core', "= 6.7.2"
|
35
43
|
end
|
@@ -1,80 +1,14 @@
|
|
1
|
-
# frozen_string_literal:
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Empty placeholder for backward compatibility
|
4
|
+
# This class has been removed as its functionality is now handled by the Universal SDK
|
5
|
+
|
6
|
+
require 'applitools/core/eyes_screenshot'
|
2
7
|
|
3
8
|
module Applitools
|
4
9
|
module Calabash
|
10
|
+
# Empty placeholder class to maintain backward compatibility
|
5
11
|
class EyesCalabashScreenshot < Applitools::EyesScreenshot
|
6
|
-
SCREENSHOT_AS_IS = Applitools::EyesScreenshot::COORDINATE_TYPES[:screenshot_as_is].freeze
|
7
|
-
CONTEXT_RELATIVE = Applitools::EyesScreenshot::COORDINATE_TYPES[:context_relative].freeze
|
8
|
-
DRIVER = 'DRIVER'.freeze
|
9
|
-
|
10
|
-
attr_reader :scale_factor
|
11
|
-
|
12
|
-
def initialize(image, options = {})
|
13
|
-
super image
|
14
|
-
@scale_factor = options[:scale_factor] || 1
|
15
|
-
# return if (location = options[:location]).nil?
|
16
|
-
# Applitools::ArgumentGuard.is_a? location, 'options[:location]', Applitools::Location
|
17
|
-
# @bounds = Applitools::Region.new location.x, location.y, image.width, image.height
|
18
|
-
end
|
19
|
-
|
20
|
-
def sub_screenshot(region, coordinates_type, throw_if_clipped = false, force_nil_if_clipped = false)
|
21
|
-
Applitools::ArgumentGuard.not_nil region, 'region'
|
22
|
-
Applitools::ArgumentGuard.not_nil coordinates_type, 'coordinates_type'
|
23
|
-
|
24
|
-
sub_screen_region = intersected_region region, coordinates_type, SCREENSHOT_AS_IS
|
25
|
-
|
26
|
-
if sub_screen_region.empty? || (throw_if_clipped && !region.size_equals?(sub_screen_region))
|
27
|
-
return nil if force_nil_if_clipped
|
28
|
-
raise Applitools::OutOfBoundsException, "Region #{sub_screen_region} (#{coordinates_type}) is out of " \
|
29
|
-
" screenshot bounds #{bounds}"
|
30
|
-
end
|
31
|
-
|
32
|
-
sub_screenshot_image = Applitools::Screenshot.from_any_image(
|
33
|
-
image.crop(
|
34
|
-
sub_screen_region.left, sub_screen_region.top, sub_screen_region.width, sub_screen_region.height
|
35
|
-
).to_datastream.to_blob
|
36
|
-
)
|
37
|
-
|
38
|
-
self.class.new sub_screenshot_image, scale_factor: scale_factor
|
39
|
-
end
|
40
|
-
|
41
|
-
def location_in_screenshot(_location, _coordinates_type)
|
42
|
-
raise(
|
43
|
-
Applitools::EyesError,
|
44
|
-
'Call to :convert_location is prohibited for Applitools::Calabash::EyesCalabashScreenshot'
|
45
|
-
)
|
46
|
-
end
|
47
|
-
|
48
|
-
def intersected_region(region, from, to = CONTEXT_RELATIVE)
|
49
|
-
Applitools::ArgumentGuard.not_nil region, 'region'
|
50
|
-
Applitools::ArgumentGuard.not_nil from, 'coordinates Type (from)'
|
51
|
-
return Applitools::Region.new(0, 0, 0, 0) if region.empty?
|
52
|
-
intersected_region = convert_region_location region, from, to
|
53
|
-
intersected_region.intersect bounds
|
54
|
-
intersected_region
|
55
|
-
end
|
56
|
-
|
57
|
-
def convert_location(_location, _from, _to)
|
58
|
-
raise(
|
59
|
-
Applitools::EyesError,
|
60
|
-
'Call to :convert_location is prohibited for Applitools::Calabash::EyesCalabashScreenshot'
|
61
|
-
)
|
62
|
-
end
|
63
|
-
|
64
|
-
abstract_method :convert_region_location, false
|
65
|
-
|
66
|
-
def scale_it!
|
67
|
-
width = (image.width.to_f / scale_factor).to_i
|
68
|
-
height = (image.height.to_f / scale_factor).to_i
|
69
|
-
image.resample_bicubic!(width, height)
|
70
|
-
self
|
71
|
-
end
|
72
|
-
|
73
|
-
private
|
74
|
-
|
75
|
-
def bounds
|
76
|
-
@bounds ||= Applitools::Region.new(0, 0, image.width, image.height)
|
77
|
-
end
|
78
12
|
end
|
79
13
|
end
|
80
|
-
end
|
14
|
+
end
|
data/lib/eyes_calabash.rb
CHANGED
@@ -14,6 +14,7 @@ module Applitools
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.require_environment(requirement, env)
|
17
|
+
load_dir = File.dirname(File.expand_path(__FILE__))
|
17
18
|
dirname = File.dirname(requirement)
|
18
19
|
filename = File.basename(requirement)
|
19
20
|
filename += '.rb' unless /^.*\.rb$/ =~ filename
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eyes_calabash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.4.
|
4
|
+
version: 6.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Applitools Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -58,15 +58,16 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 6.7.
|
61
|
+
version: 6.7.2
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 6.7.
|
69
|
-
description: Provides SDK for writing Applitools Calabash tests.
|
68
|
+
version: 6.7.2
|
69
|
+
description: 'Provides SDK for writing Applitools Calabash tests. DEPRECATED: Calabash
|
70
|
+
is no longer actively maintained. Please use eyes_appium for mobile testing.'
|
70
71
|
email:
|
71
72
|
- team@applitools.com
|
72
73
|
executables: []
|
@@ -74,6 +75,8 @@ extensions: []
|
|
74
75
|
extra_rdoc_files: []
|
75
76
|
files:
|
76
77
|
- CHANGELOG.md
|
78
|
+
- LICENSE
|
79
|
+
- README.md
|
77
80
|
- Rakefile
|
78
81
|
- eyes_calabash.gemspec
|
79
82
|
- lib/applitools/calabash/calabash_element.rb
|
@@ -105,10 +108,14 @@ files:
|
|
105
108
|
- lib/eyes_calabash.rb
|
106
109
|
homepage: https://www.applitools.com
|
107
110
|
licenses:
|
108
|
-
-
|
111
|
+
- Proprietary
|
109
112
|
metadata:
|
110
113
|
yard.run: yri
|
111
|
-
post_install_message:
|
114
|
+
post_install_message: |
|
115
|
+
WARNING: eyes_calabash is deprecated!
|
116
|
+
The Calabash framework is no longer actively maintained by Microsoft.
|
117
|
+
Visual Studio App Center (which integrated with Calabash) is retiring on March 31, 2025.
|
118
|
+
Please migrate to eyes_appium for mobile visual testing, which provides better support and active development.
|
112
119
|
rdoc_options: []
|
113
120
|
require_paths:
|
114
121
|
- lib
|
@@ -126,5 +133,5 @@ requirements: []
|
|
126
133
|
rubygems_version: 3.1.6
|
127
134
|
signing_key:
|
128
135
|
specification_version: 4
|
129
|
-
summary: Applitools Ruby Calabash SDK
|
136
|
+
summary: Applitools Ruby Calabash SDK (DEPRECATED - use eyes_appium instead)
|
130
137
|
test_files: []
|