cuke_master 0.1.5 → 0.1.6
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/lib/cuke_master/steps.rb +15 -2
- data/lib/cuke_master/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: a867e55853fd00f55a00ba95414a086979ed9892
|
|
4
|
+
data.tar.gz: a732a3d9008864e0bcac4e2936236b529d7fe16f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e90e00e5c5b5f0b4ea41ac0c3c2fe42f65f3c4076eef1e37d052cadd6cca3303c2d3bcc22620d265aec37775deca140a2c0c4b6a1fd2b7d25fa9f5191a1865b
|
|
7
|
+
data.tar.gz: 53defeb22f1eb9937478c86b0a7d5ec3f66211919e310382b461e4aeea505c34b77add8fd1698b5f203740ac28396d928914572d2d7c6e3c04de72c8e607fe0d
|
data/lib/cuke_master/steps.rb
CHANGED
|
@@ -218,10 +218,23 @@ end
|
|
|
218
218
|
When(/^I attach file to field with attribute "([^"]*)" value "([^"]*)" with \
|
|
219
219
|
"([^"]*)"$/) do |attribute_name, attribute_value, file_path|
|
|
220
220
|
root_folder = Dir.pwd
|
|
221
|
+
|
|
222
|
+
page.execute_script \
|
|
223
|
+
"document
|
|
224
|
+
.querySelector(
|
|
225
|
+
\"input[#{attribute_name}*='#{attribute_value}']\"
|
|
226
|
+
).classList.remove('hide');"
|
|
227
|
+
|
|
228
|
+
page.execute_script \
|
|
229
|
+
"document
|
|
230
|
+
.querySelector(
|
|
231
|
+
\"input[#{attribute_name}*='#{attribute_value}']\"
|
|
232
|
+
).classList.remove('hidden');"
|
|
233
|
+
|
|
221
234
|
page.execute_script \
|
|
222
235
|
"document
|
|
223
236
|
.querySelector(
|
|
224
|
-
|
|
237
|
+
\"input[#{attribute_name}*='#{attribute_value}']\"
|
|
225
238
|
).style.display = 'block';"
|
|
226
239
|
|
|
227
240
|
el = first(:xpath,
|
|
@@ -241,7 +254,7 @@ attribute \"#{attribute_name}\" ~= \"#{attribute_value}\""
|
|
|
241
254
|
page.execute_script \
|
|
242
255
|
"document
|
|
243
256
|
.querySelector(
|
|
244
|
-
'input[#{attribute_name}
|
|
257
|
+
'input[#{attribute_name}*=\"#{attribute_value}\"]'
|
|
245
258
|
).name = 'uploaded_file_#{unique_name}';"
|
|
246
259
|
attach_file "uploaded_file_#{unique_name}",
|
|
247
260
|
"#{root_folder}/uploads/#{file_path}",
|
data/lib/cuke_master/version.rb
CHANGED