quke 0.3.1 → 0.3.2
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/.config.example.yml +9 -0
- data/CHANGELOG.md +17 -0
- data/lib/quke/configuration.rb +28 -8
- data/lib/quke/driver_configuration.rb +1 -1
- data/lib/quke/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd7aa28081edfc9cce4400842782f1c8e853a1b7
|
4
|
+
data.tar.gz: d99e4eacf100a69a276323a80617c15d8534fdb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cea424d7ee59455d0496808b0b7c6e442984f37db9c834b8c06e75d24c11b6d1414a007fa83a1f988c7e3f1c5c395a880d102912c14b64140ca209f395819ece
|
7
|
+
data.tar.gz: 3d41f20f1c49d414f44f0bd573b8540bcfae9bdecfd4dc1e974cad8d6751f75569e075a52799df4045e13072deb1cf249a12d1c3ab19cb8de0b23b7b3c3a26d6
|
data/.config.example.yml
CHANGED
@@ -39,6 +39,15 @@ max_wait_time: 5
|
|
39
39
|
# you have is not supported by the site.
|
40
40
|
user_agent: "Mozilla/5.0 (MSIE 10.0; Windows NT 6.1; Trident/5.0)"
|
41
41
|
|
42
|
+
# Currently only supported when using the phantomjs driver (ignored by the
|
43
|
+
# others). In phantomjs if a site has a javascript error we can configure it
|
44
|
+
# to throw an error which will cause the test to fail. Quke by default sets this
|
45
|
+
# to true, however you can override it by setting this flag to false.
|
46
|
+
# For example you may be dealing with a legacy site and JavaScript errors
|
47
|
+
# are out of your scope. You still want to test other aspects of the site
|
48
|
+
# but not let these errors prevent you from using phantomjs.
|
49
|
+
javascript_errors: false
|
50
|
+
|
42
51
|
# Anything you place under the 'custom' node in the `.config.yml` file will be
|
43
52
|
# available within your steps and page objects by calling
|
44
53
|
# `Quke::Quke.config.custom`. So using the example below we could access its
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [Unreleased](https://github.com/DEFRA/quke/tree/HEAD)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/DEFRA/quke/compare/v0.3.1...HEAD)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Update version number \(forgot during last change!\) [\#62](https://github.com/DEFRA/quke/pull/62) ([Cruikshanks](https://github.com/Cruikshanks))
|
10
|
+
|
11
|
+
## [v0.3.1](https://github.com/DEFRA/quke/tree/v0.3.1) (2017-06-12)
|
12
|
+
[Full Changelog](https://github.com/DEFRA/quke/compare/v0.3.0...v0.3.1)
|
13
|
+
|
14
|
+
**Merged pull requests:**
|
15
|
+
|
16
|
+
- Refactor some proxy logic to make code simpler [\#61](https://github.com/DEFRA/quke/pull/61) ([Cruikshanks](https://github.com/Cruikshanks))
|
17
|
+
- Add ability to set user-agent to use [\#60](https://github.com/DEFRA/quke/pull/60) ([Cruikshanks](https://github.com/Cruikshanks))
|
18
|
+
- \[ci skip\] Updating CHANGELOG.md [\#56](https://github.com/DEFRA/quke/pull/56) ([Cruikshanks](https://github.com/Cruikshanks))
|
19
|
+
|
3
20
|
## [v0.3.0](https://github.com/DEFRA/quke/tree/v0.3.0) (2017-03-07)
|
4
21
|
[Full Changelog](https://github.com/DEFRA/quke/compare/v0.2.8...v0.3.0)
|
5
22
|
|
data/lib/quke/configuration.rb
CHANGED
@@ -116,6 +116,19 @@ module Quke #:nodoc:
|
|
116
116
|
@data['user_agent']
|
117
117
|
end
|
118
118
|
|
119
|
+
# Return the value set for +javascript_errors+.
|
120
|
+
#
|
121
|
+
# Currently only supported when using the phantomjs driver (ignored by the
|
122
|
+
# others). In phantomjs if a site has a javascript error we can configure it
|
123
|
+
# to throw an error which will cause the test to fail. Quke by default sets
|
124
|
+
# this to true, however you can override it by setting this flag to false.
|
125
|
+
# For example you may be dealing with a legacy site and JavaScript errors
|
126
|
+
# are out of your scope. You still want to test other aspects of the site
|
127
|
+
# but not let these errors prevent you from using phantomjs.
|
128
|
+
def javascript_errors
|
129
|
+
@data['javascript_errors']
|
130
|
+
end
|
131
|
+
|
119
132
|
# Return the hash of +browserstack+ options.
|
120
133
|
#
|
121
134
|
# If you select the browserstack driver, there are a number of options you
|
@@ -170,14 +183,21 @@ module Quke #:nodoc:
|
|
170
183
|
# rubocop:disable Metrics/PerceivedComplexity
|
171
184
|
def default_data!(data)
|
172
185
|
data.merge(
|
173
|
-
'features_folder' =>
|
174
|
-
'app_host' =>
|
175
|
-
'driver' =>
|
176
|
-
'pause' =>
|
177
|
-
'stop_on_error' =>
|
178
|
-
'max_wait_time' =>
|
179
|
-
'user_agent' =>
|
180
|
-
|
186
|
+
'features_folder' => (data['features'] || 'features').downcase.strip,
|
187
|
+
'app_host' => (data['app_host'] || '').downcase.strip,
|
188
|
+
'driver' => (data['driver'] || 'phantomjs').downcase.strip,
|
189
|
+
'pause' => (data['pause'] || '0').to_s.downcase.strip.to_i,
|
190
|
+
'stop_on_error' => (data['stop_on_error'] || 'false').to_s.downcase.strip,
|
191
|
+
'max_wait_time' => (data['max_wait_time'] || Capybara.default_max_wait_time).to_s.downcase.strip.to_i,
|
192
|
+
'user_agent' => (data['user_agent'] || '').strip,
|
193
|
+
# Because we want to default to 'true', but allow users to override it
|
194
|
+
# with 'false' it causes us to mess with the logic. Essentially if the
|
195
|
+
# user does enter false (either as a string or as a boolean) the result
|
196
|
+
# will be 'true', so we flip it back to 'false' with !.
|
197
|
+
# Else the condition fails and we get 'false', which when flipped gives
|
198
|
+
# us 'true', which is what we want the default value to be
|
199
|
+
'javascript_errors' => !(data['javascript_errors'].to_s.downcase.strip == 'false'),
|
200
|
+
'custom' => (data['custom'] || nil)
|
181
201
|
)
|
182
202
|
end
|
183
203
|
# rubocop:enable Metrics/AbcSize
|
@@ -52,7 +52,7 @@ module Quke #:nodoc:
|
|
52
52
|
# https://github.com/teampoltergeist/poltergeist#customization
|
53
53
|
{
|
54
54
|
# Javascript errors will get re-raised in our tests causing them to fail
|
55
|
-
js_errors:
|
55
|
+
js_errors: config.javascript_errors,
|
56
56
|
# How long in seconds we'll wait for response when communicating with
|
57
57
|
# Phantomjs
|
58
58
|
timeout: 30,
|
data/lib/quke/version.rb
CHANGED