effective_test_bot 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8916fd859c891dfc94211148166080d47f389d6
|
4
|
+
data.tar.gz: c169dfb60da9420fe436f9bf87aab60cc2e2b405
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c783031691e9777190e9324df2095c804b9af0651003995eebbab47ca8c0e2d0ec3213745ded7fd9bfafa5b5c9aa657ec183c245d4cebf4e546dd331713eb1e9
|
7
|
+
data.tar.gz: 93877759a09977b9417b4e8873be3481be89ca0eaf8d4a03e633dd7ae64734b825fa06aae6653f773b63351f9bf386a784e48e20009b5ddfb8a4ee3b5fb4d146
|
@@ -28,7 +28,7 @@ module TestBotable
|
|
28
28
|
|
29
29
|
def normalize_test_bot_options!(options)
|
30
30
|
raise 'expected options to be a Hash' unless options.kind_of?(Hash)
|
31
|
-
raise 'expected key :user to be a User' unless options[:user].kind_of?(User)
|
31
|
+
raise 'expected key :user to be a User' unless (options[:user].kind_of?(User) || options[:user] == false)
|
32
32
|
#raise 'expected key :current_test to be a String' unless options[:current_test].kind_of?(String)
|
33
33
|
|
34
34
|
# Controller stuff
|
@@ -20,13 +20,7 @@ module TestBotable
|
|
20
20
|
module ClassMethods
|
21
21
|
|
22
22
|
def wizard_test(from:, to: nil, user: _test_bot_user(), label: nil, **options)
|
23
|
-
|
24
|
-
if to.present?
|
25
|
-
options[:current_test] = label || "#{from} to #{to}"
|
26
|
-
else
|
27
|
-
options[:current_test] = label || "#{from}"
|
28
|
-
end
|
29
|
-
|
23
|
+
options[:current_test] = label || (to.present? ? "#{from} to #{to}" : from.to_s)
|
30
24
|
return if EffectiveTestBot.skip?(options[:current_test])
|
31
25
|
|
32
26
|
method_name = test_bot_method_name('wizard_test', options[:current_test])
|
@@ -3,7 +3,7 @@ require 'faker'
|
|
3
3
|
|
4
4
|
module EffectiveTestBotFormFiller
|
5
5
|
DIGITS = ('1'..'9').to_a
|
6
|
-
LETTERS = (
|
6
|
+
LETTERS = %w(A B C E G H J K L M N P R S T V X Y)
|
7
7
|
|
8
8
|
# Fill a boostrap tabs based form
|
9
9
|
def fill_bootstrap_tabs_form(fills = {}, boostrap_tab_elements = nil)
|
@@ -327,7 +327,13 @@ module EffectiveTestBotFormFiller
|
|
327
327
|
# http://stackoverflow.com/questions/5188240/using-selenium-to-imitate-dragging-a-file-onto-an-upload-element/11203629#11203629
|
328
328
|
def upload_effective_asset(field, file)
|
329
329
|
uid = field['id']
|
330
|
-
|
330
|
+
|
331
|
+
begin
|
332
|
+
field.set(file)
|
333
|
+
rescue Capybara::Webkit::ClickFailed
|
334
|
+
puts "file upload failed to click #{uid}"
|
335
|
+
return
|
336
|
+
end
|
331
337
|
|
332
338
|
# Wait till the Uploader bar goes away
|
333
339
|
begin
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_test_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|