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: e0878a09914b62c7063ae8e279fcb7c2b91ef822
4
- data.tar.gz: 4c10586dd8a4c97330eacc8a3836fd4f1d31f0d4
3
+ metadata.gz: c8916fd859c891dfc94211148166080d47f389d6
4
+ data.tar.gz: c169dfb60da9420fe436f9bf87aab60cc2e2b405
5
5
  SHA512:
6
- metadata.gz: b7ba39abeac4d13ae878850bdd99c8d51e5e2618e3d27ee04222135f9d01847ef53a7d5de71fdf2eeb4feaa45dcfe8129feef19df486541cf1e8767ec403367b
7
- data.tar.gz: dcb2104def4ffee449bf9071af765f771b850dd6fc204419ca8d407bfbce2951c23d94936b8d46197be6f72a4a16080190bea78b463f6afd4a1f3ce0a3f5526b
6
+ metadata.gz: c783031691e9777190e9324df2095c804b9af0651003995eebbab47ca8c0e2d0ec3213745ded7fd9bfafa5b5c9aa657ec183c245d4cebf4e546dd331713eb1e9
7
+ data.tar.gz: 93877759a09977b9417b4e8873be3481be89ca0eaf8d4a03e633dd7ae64734b825fa06aae6653f773b63351f9bf386a784e48e20009b5ddfb8a4ee3b5fb4d146
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '0.5.7'.freeze
2
+ VERSION = '0.5.8'.freeze
3
3
  end
@@ -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 = ('A'..'Z').to_a
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
- field.set(file)
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
@@ -14,6 +14,8 @@ module EffectiveTestBotLoginHelper
14
14
  elsif user.kind_of?(User)
15
15
  raise 'user must be persisted' unless user.persisted?
16
16
  login_as(user)
17
+ elsif user == false
18
+ true # Do nothing
17
19
  else
18
20
  raise 'sign_in(user) expected a User or an email String'
19
21
  end
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.7
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-25 00:00:00.000000000 Z
11
+ date: 2016-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails