effective_test_bot 0.4.7 → 0.4.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: 050059046b219c8b63e06bed237a2af8330bbd74
4
- data.tar.gz: 5ab3fb4a52857df4f5a158207fdc16f5fb5eccc7
3
+ metadata.gz: b74466446800d58bfb33f2216c378cf5528adc4d
4
+ data.tar.gz: 1ca9bacaae0a77a4df55a81542afd425e0a5b797
5
5
  SHA512:
6
- metadata.gz: 153ff53a0aaea5cdc8df869c479cb6202e2bc422713cb9bc278ec704d233e8aac52faf58a4b98b7f601a2d268127b58d9805f8a57f967fbaecb2aa047c6680d1
7
- data.tar.gz: 6ef150344ff12ace02a5717611b8f537540061653141d375ed5c79ddad6f69f87b3b7d8669d4ba639582d9bfc8ff94cad51c10322e693b57f0ca9f55c9dd9fc0
6
+ metadata.gz: 5b945654383760acb1fb5dc44a3f43acf72f760f97b2d49491b4d8d57c37ba36310b96c37629b552445254d9358512bc044474529a16b0d5bc652707759963be
7
+ data.tar.gz: cd991c7acf1fed501e492d664407cc2e9383d627f371d54527d0c30a52b2eda79a8d4f5236eb23d068b11bc983459574167d01cf6bd0fdf322605ae7fcb26f61
data/README.md CHANGED
@@ -26,7 +26,21 @@ Makes sure everything actually works.
26
26
 
27
27
  ## Getting Started
28
28
 
29
- Make sure your site is using [devise](https://github.com/plataformatec/devise) and that your application javascript includes [jQuery](http://jquery.com/) and rails' [jquery_ujs](https://github.com/rails/jquery-ujs).
29
+ First, make sure your site is using [devise](https://github.com/plataformatec/devise) and that your application javascript includes [jQuery](http://jquery.com/) and rails' [jquery_ujs](https://github.com/rails/jquery-ujs).
30
+
31
+ ```ruby
32
+ gem 'devise'
33
+ gem 'jquery-rails'
34
+ ```
35
+
36
+ and in your application.js file:
37
+
38
+ ```ruby
39
+ //= require jquery
40
+ //= require jquery_ujs
41
+ ```
42
+
43
+ Then you're ready to install `effective_test_bot`:
30
44
 
31
45
  ```ruby
32
46
  group :test do
@@ -274,6 +288,13 @@ TODO
274
288
 
275
289
  ## Automated Testing / Rake tasks
276
290
 
291
+ ```ruby
292
+ rake test:bot:environment
293
+ rake test:bot
294
+ rake test:bot TEST=posts
295
+ rake test:bot TEST=posts#index
296
+ ```
297
+
277
298
  TODO
278
299
 
279
300
  ## Screenshots and Animated Gifs
@@ -282,6 +303,17 @@ TODO
282
303
 
283
304
  ### Tour mode
284
305
 
306
+ ```ruby
307
+ rake test:bot:tour
308
+ rake test:bot:tour TEST=posts
309
+ rake test:bot:tourv # verbose mode
310
+ ```
311
+
312
+ ```ruby
313
+ rake test:bot:tours # Prints out file location of all tour animated .gifs
314
+ rake test:bot:purge # Deletes all tour and failure animated .gifs
315
+ ```
316
+
285
317
  TODO
286
318
 
287
319
 
@@ -55,10 +55,11 @@ module EffectiveTestBot
55
55
  assign_test_bot_unpermitted_params_header(exception)
56
56
  end
57
57
 
58
- rescue_from StandardError do |exception|
59
- assign_test_bot_exceptions_header(exception)
60
- render status: 500, text: "<html><body><h1>Uncaught Exception</h1><p>#{exception.message}</p><p>#{exception.backtrace.first(20).join('<br>')}</p></body></html>"
61
- end
58
+ # This isn't working properly. TODO: Fix this
59
+ # rescue_from StandardError do |exception|
60
+ # assign_test_bot_exceptions_header(exception)
61
+ # render status: 500, text: "<html><body><h1>Uncaught Exception</h1><p>#{exception.message}</p><p>#{exception.backtrace.first(20).join('<br>')}</p></body></html>"
62
+ # end
62
63
  end
63
64
 
64
65
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '0.4.7'.freeze
2
+ VERSION = '0.4.8'.freeze
3
3
  end
@@ -1,10 +1,12 @@
1
1
  # This DSL gives a class level and an instance level way of calling specific test suite
2
2
  #
3
3
  # class PostsTest < ActionDispatch::IntegrationTest
4
- # member_test('admin/jobs', 'unarchive', User.first, Post.first)
4
+ # wizard_test('/fee_wizard/step1', '/fee_wizard/step5', User.first)
5
5
  #
6
6
  # test 'a one-off action' do
7
- # member_action_test('admin/jobs', 'unarchive', User.first)
7
+ # wizard_action_test('/fee_wizard/step1', '/fee_wizard/step5', User.first) do
8
+ # puts page.current_path
9
+ # end
8
10
  # end
9
11
  # end
10
12
 
@@ -36,7 +38,7 @@ module TestBotable
36
38
  raise "Error: #{e.message}. Expected usage: wizard_action_test('/fee_wizard/step1', '/fee_wizard/step5', User.first)"
37
39
  end
38
40
 
39
- self.send(:test_bot_wizard_test)
41
+ block_given? ? test_bot_wizard_test { yield } : test_bot_wizard_test
40
42
  end
41
43
 
42
44
  end
@@ -9,6 +9,10 @@ module EffectiveTestBotLoginHelper
9
9
  user.kind_of?(String) ? login_as(User.find_by_email!(user)) : login_as(user)
10
10
  end
11
11
 
12
+ def sign_out
13
+ logout
14
+ end
15
+
12
16
  def sign_in_manually(user_or_email, password = nil)
13
17
  visit new_user_session_path
14
18
 
@@ -4,17 +4,16 @@
4
4
  module WizardTest
5
5
  protected
6
6
 
7
- def test_bot_wizard_test
7
+ def test_bot_wizard_test(&block)
8
8
  sign_in(user) and visit(from_path)
9
9
 
10
10
  0.upto(50) do |index| # Can only test wizards 51 steps long
11
11
  assert_page_normal
12
12
 
13
+ yield if block_given?
14
+
13
15
  if defined?(within_form)
14
- within(within_form) do
15
- fill_form
16
- submit_form
17
- end
16
+ within(within_form) { fill_form; submit_form; }
18
17
  else
19
18
  fill_form
20
19
  submit_form
metadata CHANGED
@@ -1,209 +1,209 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_test_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.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: 2015-11-03 00:00:00.000000000 Z
11
+ date: 2015-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest-capybara
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest-rails-capybara
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest-reporters
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: capybara
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: capybara-webkit
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: 1.6.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: 1.6.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: capybara-screenshot
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - '>='
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - '>='
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: capybara-slow_finder_errors
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - '>='
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - '>='
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: shoulda
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - '>='
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - '>='
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: shoulda-matchers
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
171
+ - - '>='
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - '>='
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: rmagick
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - '>='
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - '>='
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: faker
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ">="
199
+ - - '>='
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0'
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ">="
206
+ - - '>='
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  description: A shared library of rails model & capybara-based feature tests that should
@@ -214,13 +214,10 @@ executables: []
214
214
  extensions: []
215
215
  extra_rdoc_files: []
216
216
  files:
217
- - MIT-LICENSE
218
- - README.md
219
- - Rakefile
220
217
  - app/helpers/effective_test_bot_controller_helper.rb
221
- - lib/effective_test_bot.rb
222
218
  - lib/effective_test_bot/engine.rb
223
219
  - lib/effective_test_bot/version.rb
220
+ - lib/effective_test_bot.rb
224
221
  - lib/generators/effective_test_bot/install_generator.rb
225
222
  - lib/generators/templates/effective_test_bot.rb
226
223
  - lib/generators/templates/test_helper.rb
@@ -248,6 +245,9 @@ files:
248
245
  - test/test_botable/page_test.rb
249
246
  - test/test_botable/redirect_test.rb
250
247
  - test/test_botable/wizard_test.rb
248
+ - MIT-LICENSE
249
+ - Rakefile
250
+ - README.md
251
251
  homepage: https://github.com/code-and-effect/effective_test_bot
252
252
  licenses:
253
253
  - MIT
@@ -258,17 +258,17 @@ require_paths:
258
258
  - lib
259
259
  required_ruby_version: !ruby/object:Gem::Requirement
260
260
  requirements:
261
- - - ">="
261
+ - - '>='
262
262
  - !ruby/object:Gem::Version
263
263
  version: '0'
264
264
  required_rubygems_version: !ruby/object:Gem::Requirement
265
265
  requirements:
266
- - - ">="
266
+ - - '>='
267
267
  - !ruby/object:Gem::Version
268
268
  version: '0'
269
269
  requirements: []
270
270
  rubyforge_project:
271
- rubygems_version: 2.4.3
271
+ rubygems_version: 2.0.14
272
272
  signing_key:
273
273
  specification_version: 4
274
274
  summary: A shared library of rails model & capybara-based feature tests that should