automation_helpers 4.1 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +2 -2
- data/README.md +13 -0
- data/lib/automation_helpers/drivers/v4/capabilities.rb +9 -0
- data/lib/automation_helpers/drivers/v4/local.rb +4 -5
- data/lib/automation_helpers/drivers.rb +2 -0
- data/lib/automation_helpers/extensions/string.rb +6 -1
- data/lib/automation_helpers/patches/base.rb +2 -0
- data/lib/automation_helpers/patches.rb +2 -0
- data/lib/automation_helpers/version.rb +1 -1
- metadata +40 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 154b3a0f5fc399e0c379455a963dd13d3094be200957ecff1740dccfdd75418c
|
4
|
+
data.tar.gz: ba4e03604da108f8a68661f3879f69180c4f35b27796cc41660a4ee51d25f47f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fc83981d84eabd3887d096b0ab415598aa5243b9027b6b0a8e1de2fb76520346db275fd9f51ea10642946646ae0319f214ab30af76fcc218fbe56c629c17165
|
7
|
+
data.tar.gz: 6cf8cf6feb9820e8b781d5830557d0d4aaf2ad1e5d370b2db1e0fb7ef8198a5fe012f67ae5d30184068eabb45cfeebaa053f6926cc99955239f5cdfe0cc378e3
|
data/LICENSE.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2020-
|
1
|
+
Copyright (c) 2020-2023, The SitePrism team & Marcelo Nicolosi Santos
|
2
2
|
|
3
3
|
All rights reserved.
|
4
4
|
|
@@ -10,4 +10,4 @@ Redistributions in binary form must reproduce the above copyright notice, this l
|
|
10
10
|
|
11
11
|
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
12
12
|
|
13
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
13
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
CHANGED
@@ -29,6 +29,19 @@ $ bundle
|
|
29
29
|
|
30
30
|
Either require all of the extensions required, or require individual bits and pieces
|
31
31
|
|
32
|
+
```shell
|
33
|
+
# Require all of the drivers/patches/extensions code
|
34
|
+
require 'automation_helpers'
|
35
|
+
# Require all driver code
|
36
|
+
require 'automation_helpers/drivers'
|
37
|
+
# Require just local drivers
|
38
|
+
require 'automation_helpers/drivers/local'
|
39
|
+
# Require all patches
|
40
|
+
require 'automation_helpers/patches'
|
41
|
+
# Require all extensions
|
42
|
+
require 'automation_helpers/extensions'
|
43
|
+
```
|
44
|
+
|
32
45
|
## Development
|
33
46
|
|
34
47
|
```
|
@@ -26,6 +26,7 @@ module AutomationHelpers
|
|
26
26
|
when :firefox; then firefox_capabilities
|
27
27
|
when :internet_explorer; then internet_explorer_capabilities
|
28
28
|
when :ios; then ios_capabilities(device_options)
|
29
|
+
when :safari; then safari_capabilities
|
29
30
|
else {}
|
30
31
|
end
|
31
32
|
end
|
@@ -96,6 +97,14 @@ module AutomationHelpers
|
|
96
97
|
else raise ArgumentError, "Your iOS Version is too low. Please don't use lower than iOS 11."
|
97
98
|
end
|
98
99
|
end
|
100
|
+
|
101
|
+
def safari_capabilities
|
102
|
+
AutomationHelpers.logger.warn('Altering Browser Name request to alleviate Capybara failure with STP.')
|
103
|
+
|
104
|
+
{
|
105
|
+
'browserName' => 'Safari Technology Preview'
|
106
|
+
}
|
107
|
+
end
|
99
108
|
end
|
100
109
|
end
|
101
110
|
end
|
@@ -69,11 +69,10 @@ module AutomationHelpers
|
|
69
69
|
#
|
70
70
|
# NB: Whilst using Safari TP this is required.
|
71
71
|
def desired_capabilities
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
72
|
+
if safari?
|
73
|
+
Capabilities.for(:safari)
|
74
|
+
else
|
75
|
+
::Selenium::WebDriver::Remote::Capabilities.new
|
77
76
|
end
|
78
77
|
end
|
79
78
|
|
@@ -7,7 +7,12 @@ class String
|
|
7
7
|
# Generates a single random letter from an array of the english alphabet
|
8
8
|
# Accepts an input to determine what case of alphabet you want
|
9
9
|
def self.alphabet_char(type = :upper)
|
10
|
-
|
10
|
+
case type
|
11
|
+
when :upper; then ('A'..'Z').to_a.sample
|
12
|
+
when :lower; then ('a'..'z').to_a.sample
|
13
|
+
when :both; then (('a'..'z').to_a + ('A'..'Z').to_a).sample
|
14
|
+
else raise ArgumentError, 'Invalid character type. Must be :upper (default), :lower or :both'
|
15
|
+
end
|
11
16
|
end
|
12
17
|
|
13
18
|
# @return [String]
|
@@ -27,6 +27,7 @@ module AutomationHelpers
|
|
27
27
|
# From what point should this patch start throwing deprecation notices
|
28
28
|
# If a date is provided, then after that date
|
29
29
|
# If a version from is provided, then all releases after that one (NB: You must provide a link to the gem version)
|
30
|
+
# Otherwise the patch is considered never to be deprecated
|
30
31
|
#
|
31
32
|
def deprecate?
|
32
33
|
if defined?(deprecation_notice_date)
|
@@ -42,6 +43,7 @@ module AutomationHelpers
|
|
42
43
|
# From what point should this patch start preventing usage deprecation notices
|
43
44
|
# If a date is provided, then after that date
|
44
45
|
# If a version from is provided, then all releases after that one (NB: You must provide a link to the gem version)
|
46
|
+
# Otherwise the patch is considered never to be prevented from being used
|
45
47
|
#
|
46
48
|
def prevent_usage?
|
47
49
|
if defined?(prevent_usage_date)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: automation_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Hill
|
@@ -9,29 +9,35 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-08-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capybara
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '3.30'
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '4'
|
21
24
|
type: :development
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
25
|
-
- - "
|
28
|
+
- - ">="
|
26
29
|
- !ruby/object:Gem::Version
|
27
30
|
version: '3.30'
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4'
|
28
34
|
- !ruby/object:Gem::Dependency
|
29
35
|
name: cucumber
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
31
37
|
requirements:
|
32
38
|
- - ">="
|
33
39
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
40
|
+
version: '7.0'
|
35
41
|
- - "<"
|
36
42
|
- !ruby/object:Gem::Version
|
37
43
|
version: '9'
|
@@ -41,7 +47,7 @@ dependencies:
|
|
41
47
|
requirements:
|
42
48
|
- - ">="
|
43
49
|
- !ruby/object:Gem::Version
|
44
|
-
version: '
|
50
|
+
version: '7.0'
|
45
51
|
- - "<"
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: '9'
|
@@ -51,112 +57,124 @@ dependencies:
|
|
51
57
|
requirements:
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
60
|
+
version: '2.7'
|
55
61
|
type: :development
|
56
62
|
prerelease: false
|
57
63
|
version_requirements: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
67
|
+
version: '2.7'
|
62
68
|
- !ruby/object:Gem::Dependency
|
63
69
|
name: parallel_tests
|
64
70
|
requirement: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
|
-
- - "
|
72
|
+
- - ">="
|
67
73
|
- !ruby/object:Gem::Version
|
68
74
|
version: '3.7'
|
75
|
+
- - "<"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '5'
|
69
78
|
type: :development
|
70
79
|
prerelease: false
|
71
80
|
version_requirements: !ruby/object:Gem::Requirement
|
72
81
|
requirements:
|
73
|
-
- - "
|
82
|
+
- - ">="
|
74
83
|
- !ruby/object:Gem::Version
|
75
84
|
version: '3.7'
|
85
|
+
- - "<"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '5'
|
76
88
|
- !ruby/object:Gem::Dependency
|
77
89
|
name: rspec
|
78
90
|
requirement: !ruby/object:Gem::Requirement
|
79
91
|
requirements:
|
80
92
|
- - "~>"
|
81
93
|
- !ruby/object:Gem::Version
|
82
|
-
version: '3.
|
94
|
+
version: '3.12'
|
83
95
|
type: :development
|
84
96
|
prerelease: false
|
85
97
|
version_requirements: !ruby/object:Gem::Requirement
|
86
98
|
requirements:
|
87
99
|
- - "~>"
|
88
100
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
101
|
+
version: '3.12'
|
90
102
|
- !ruby/object:Gem::Dependency
|
91
103
|
name: rubocop
|
92
104
|
requirement: !ruby/object:Gem::Requirement
|
93
105
|
requirements:
|
94
106
|
- - "~>"
|
95
107
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.
|
108
|
+
version: 1.45.0
|
97
109
|
type: :development
|
98
110
|
prerelease: false
|
99
111
|
version_requirements: !ruby/object:Gem::Requirement
|
100
112
|
requirements:
|
101
113
|
- - "~>"
|
102
114
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
115
|
+
version: 1.45.0
|
104
116
|
- !ruby/object:Gem::Dependency
|
105
117
|
name: rubocop-performance
|
106
118
|
requirement: !ruby/object:Gem::Requirement
|
107
119
|
requirements:
|
108
120
|
- - "~>"
|
109
121
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.
|
122
|
+
version: 1.18.0
|
111
123
|
type: :development
|
112
124
|
prerelease: false
|
113
125
|
version_requirements: !ruby/object:Gem::Requirement
|
114
126
|
requirements:
|
115
127
|
- - "~>"
|
116
128
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
129
|
+
version: 1.18.0
|
118
130
|
- !ruby/object:Gem::Dependency
|
119
131
|
name: rubocop-rspec
|
120
132
|
requirement: !ruby/object:Gem::Requirement
|
121
133
|
requirements:
|
122
134
|
- - "~>"
|
123
135
|
- !ruby/object:Gem::Version
|
124
|
-
version: 2.
|
136
|
+
version: 2.22.0
|
125
137
|
type: :development
|
126
138
|
prerelease: false
|
127
139
|
version_requirements: !ruby/object:Gem::Requirement
|
128
140
|
requirements:
|
129
141
|
- - "~>"
|
130
142
|
- !ruby/object:Gem::Version
|
131
|
-
version: 2.
|
143
|
+
version: 2.22.0
|
132
144
|
- !ruby/object:Gem::Dependency
|
133
145
|
name: selenium-webdriver
|
134
146
|
requirement: !ruby/object:Gem::Requirement
|
135
147
|
requirements:
|
136
|
-
- - "
|
148
|
+
- - ">="
|
137
149
|
- !ruby/object:Gem::Version
|
138
150
|
version: '4.0'
|
151
|
+
- - "<"
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '5'
|
139
154
|
type: :development
|
140
155
|
prerelease: false
|
141
156
|
version_requirements: !ruby/object:Gem::Requirement
|
142
157
|
requirements:
|
143
|
-
- - "
|
158
|
+
- - ">="
|
144
159
|
- !ruby/object:Gem::Version
|
145
160
|
version: '4.0'
|
161
|
+
- - "<"
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '5'
|
146
164
|
- !ruby/object:Gem::Dependency
|
147
165
|
name: webdrivers
|
148
166
|
requirement: !ruby/object:Gem::Requirement
|
149
167
|
requirements:
|
150
168
|
- - "~>"
|
151
169
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
170
|
+
version: '5.2'
|
153
171
|
type: :development
|
154
172
|
prerelease: false
|
155
173
|
version_requirements: !ruby/object:Gem::Requirement
|
156
174
|
requirements:
|
157
175
|
- - "~>"
|
158
176
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
177
|
+
version: '5.2'
|
160
178
|
description: Automation Patches / Extensions that allow you to extend your Ruby-based
|
161
179
|
testing frameworks
|
162
180
|
email:
|