howitzer 2.1.1 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +44 -1
- data/LICENSE +1 -1
- data/README.md +19 -17
- data/generators/base_generator.rb +5 -7
- data/generators/config/config_generator.rb +3 -4
- data/generators/config/templates/boot.rb +2 -2
- data/generators/config/templates/capybara.rb +4 -5
- data/generators/config/templates/default.yml +21 -11
- data/generators/config/templates/drivers/browserstack.rb +31 -4
- data/generators/config/templates/drivers/crossbrowsertesting.rb +9 -11
- data/generators/config/templates/drivers/headless_chrome.rb +1 -1
- data/generators/config/templates/drivers/headless_firefox.rb +23 -0
- data/generators/config/templates/drivers/lambdatest.rb +30 -0
- data/generators/config/templates/drivers/sauce.rb +30 -2
- data/generators/config/templates/drivers/selenium.rb +1 -1
- data/generators/config/templates/drivers/selenium_grid.rb +3 -3
- data/generators/config/templates/drivers/testingbot.rb +29 -2
- data/generators/cucumber/templates/cuke_sniffer.rake +2 -2
- data/generators/cucumber/templates/env.rb +8 -0
- data/generators/cucumber/templates/hooks.rb +9 -3
- data/generators/cucumber/templates/transformers.rb +1 -1
- data/generators/prerequisites/templates/factory_bot.rb +2 -1
- data/generators/root/root_generator.rb +1 -1
- data/generators/root/templates/Gemfile.erb +4 -10
- data/generators/rspec/templates/spec_helper.rb +6 -5
- data/generators/turnip/templates/spec_helper.rb +6 -5
- data/generators/web/templates/example_page.rb +1 -1
- data/lib/howitzer/cache.rb +20 -19
- data/lib/howitzer/capybara_helpers.rb +59 -14
- data/lib/howitzer/email.rb +3 -2
- data/lib/howitzer/exceptions.rb +21 -21
- data/lib/howitzer/gmail_api/client.rb +13 -4
- data/lib/howitzer/log.rb +6 -6
- data/lib/howitzer/mail_adapters/gmail.rb +3 -0
- data/lib/howitzer/mail_adapters/mailgun.rb +3 -1
- data/lib/howitzer/mail_adapters/mailtrap.rb +3 -0
- data/lib/howitzer/mailgun_api/client.rb +3 -2
- data/lib/howitzer/mailgun_api/connector.rb +1 -0
- data/lib/howitzer/mailgun_api/response.rb +1 -2
- data/lib/howitzer/mailtrap_api/client.rb +1 -1
- data/lib/howitzer/meta/actions.rb +35 -0
- data/lib/howitzer/meta/element.rb +40 -0
- data/lib/howitzer/meta/entry.rb +62 -0
- data/lib/howitzer/meta/iframe.rb +41 -0
- data/lib/howitzer/meta/section.rb +30 -0
- data/lib/howitzer/meta.rb +11 -0
- data/lib/howitzer/utils/string_extensions.rb +6 -2
- data/lib/howitzer/version.rb +1 -1
- data/lib/howitzer/web/base_section.rb +1 -1
- data/lib/howitzer/web/capybara_context_holder.rb +1 -0
- data/lib/howitzer/web/capybara_methods_proxy.rb +15 -6
- data/lib/howitzer/web/element_dsl.rb +104 -44
- data/lib/howitzer/web/iframe_dsl.rb +4 -2
- data/lib/howitzer/web/page.rb +14 -14
- data/lib/howitzer/web/page_dsl.rb +18 -6
- data/lib/howitzer/web/page_validator.rb +27 -26
- data/lib/howitzer/web/section.rb +13 -2
- data/lib/howitzer/web/section_dsl.rb +65 -30
- data/lib/howitzer.rb +40 -0
- metadata +31 -157
- data/.coveralls.yml +0 -1
- data/.gitignore +0 -14
- data/.rspec +0 -3
- data/.rubocop.yml +0 -51
- data/.ruby-gemset +0 -1
- data/.travis.yml +0 -7
- data/Gemfile +0 -14
- data/ISSUE_TEMPLATE.md +0 -16
- data/MAINTENANCE.md +0 -32
- data/Rakefile +0 -38
- data/features/cli_help.feature +0 -31
- data/features/cli_new.feature +0 -389
- data/features/cli_unknown.feature +0 -17
- data/features/cli_update.feature +0 -218
- data/features/cli_version.feature +0 -14
- data/features/step_definitions/common_steps.rb +0 -34
- data/features/support/env.rb +0 -1
- data/generators/config/templates/drivers/phantomjs.rb +0 -19
- data/generators/config/templates/drivers/poltergeist.rb +0 -11
- data/generators/config/templates/drivers/webkit.rb +0 -6
- data/generators/root/templates/.gitignore +0 -21
- data/generators/root/templates/.rubocop.yml +0 -35
- data/generators/turnip/templates/.rspec +0 -1
- data/howitzer.gemspec +0 -39
- data/lib/howitzer/mail_adapters/debugmail.rb +0 -0
- data/spec/config/custom.yml +0 -9
- data/spec/spec_helper.rb +0 -73
- data/spec/support/generator_helper.rb +0 -21
- data/spec/support/logger_helper.rb +0 -13
- data/spec/support/shared_examples/capybara_context_holder.rb +0 -33
- data/spec/support/shared_examples/capybara_methods_proxy.rb +0 -94
- data/spec/support/shared_examples/dynamic_section_methods.rb +0 -35
- data/spec/support/shared_examples/element_dsl.rb +0 -242
- data/spec/unit/generators/base_generator_spec.rb +0 -283
- data/spec/unit/generators/config_generator_spec.rb +0 -59
- data/spec/unit/generators/cucumber_generator_spec.rb +0 -62
- data/spec/unit/generators/emails_generator_spec.rb +0 -35
- data/spec/unit/generators/prerequisites_generator_spec.rb +0 -53
- data/spec/unit/generators/root_generator_spec.rb +0 -75
- data/spec/unit/generators/rspec_generator_spec.rb +0 -36
- data/spec/unit/generators/tasks_generator_spec.rb +0 -31
- data/spec/unit/generators/turnip_generator_spec.rb +0 -52
- data/spec/unit/generators/web_generator_spec.rb +0 -52
- data/spec/unit/lib/cache_spec.rb +0 -85
- data/spec/unit/lib/capybara_helpers_spec.rb +0 -697
- data/spec/unit/lib/email_spec.rb +0 -186
- data/spec/unit/lib/gmail_api/client_spec.rb +0 -26
- data/spec/unit/lib/howitzer_spec.rb +0 -69
- data/spec/unit/lib/init_spec.rb +0 -2
- data/spec/unit/lib/log_spec.rb +0 -122
- data/spec/unit/lib/mail_adapters/abstract_spec.rb +0 -62
- data/spec/unit/lib/mail_adapters/gmail_spec.rb +0 -128
- data/spec/unit/lib/mail_adapters/mailgun_spec.rb +0 -158
- data/spec/unit/lib/mail_adapters/mailtrap_spec.rb +0 -130
- data/spec/unit/lib/mailgun_api/client_spec.rb +0 -80
- data/spec/unit/lib/mailgun_api/connector_spec.rb +0 -54
- data/spec/unit/lib/mailgun_api/response_spec.rb +0 -28
- data/spec/unit/lib/mailtrap_api/client_spec.rb +0 -67
- data/spec/unit/lib/utils/string_extensions_spec.rb +0 -77
- data/spec/unit/lib/web/base_section_spec.rb +0 -43
- data/spec/unit/lib/web/element_dsl_spec.rb +0 -22
- data/spec/unit/lib/web/iframe_dsl_spec.rb +0 -203
- data/spec/unit/lib/web/page_dsl_spec.rb +0 -74
- data/spec/unit/lib/web/page_spec.rb +0 -378
- data/spec/unit/lib/web/page_validator_spec.rb +0 -276
- data/spec/unit/lib/web/section_dsl_spec.rb +0 -165
- data/spec/unit/lib/web/section_spec.rb +0 -63
- data/spec/unit/version_spec.rb +0 -8
data/features/cli_new.feature
DELETED
@@ -1,389 +0,0 @@
|
|
1
|
-
Feature: Howitzer CLI New Project Creation
|
2
|
-
|
3
|
-
Scenario: Run with new command without argument and options
|
4
|
-
When I run `howitzer new`
|
5
|
-
Then the output should contain exactly:
|
6
|
-
"""
|
7
|
-
error: Please specify <PROJECT NAME>
|
8
|
-
|
9
|
-
"""
|
10
|
-
And the exit status should be 64
|
11
|
-
|
12
|
-
Scenario: Run with new command with argument and without options
|
13
|
-
When I run `howitzer new test_automation`
|
14
|
-
Then the output should contain exactly:
|
15
|
-
"""
|
16
|
-
error: Provide --cucumber, --rspec or --turnip option
|
17
|
-
|
18
|
-
"""
|
19
|
-
And the exit status should be 64
|
20
|
-
|
21
|
-
Scenario: Run with new command with argument and unknown option
|
22
|
-
When I run `howitzer new test_automation --unknown`
|
23
|
-
Then the output should contain:
|
24
|
-
"""
|
25
|
-
error: Unknown option --unknown
|
26
|
-
|
27
|
-
"""
|
28
|
-
And the exit status should be 64
|
29
|
-
|
30
|
-
Scenario Outline: Run with new command with help option
|
31
|
-
When I run `howitzer new <option>`
|
32
|
-
Then the output should contain exactly:
|
33
|
-
"""
|
34
|
-
NAME
|
35
|
-
new - Generate new project
|
36
|
-
|
37
|
-
SYNOPSIS
|
38
|
-
howitzer [global options] new [command options] <PROJECT NAME>
|
39
|
-
|
40
|
-
COMMAND OPTIONS
|
41
|
-
-c, --cucumber - Integrate Cucumber
|
42
|
-
-r, --rspec - Integrate Rspec
|
43
|
-
-t, --turnip - Integrate Turnip
|
44
|
-
|
45
|
-
"""
|
46
|
-
And the exit status should be 0
|
47
|
-
Examples:
|
48
|
-
| option |
|
49
|
-
| --help |
|
50
|
-
| -h |
|
51
|
-
|
52
|
-
Scenario Outline: Run with new command with argument and with rspec option
|
53
|
-
When I run `howitzer new test_automation <option>`
|
54
|
-
Then the output should contain exactly:
|
55
|
-
"""
|
56
|
-
* New project directory creation ...
|
57
|
-
Created './test_automation' folder
|
58
|
-
* Config files generation ...
|
59
|
-
Added 'config/boot.rb' file
|
60
|
-
Added 'config/custom.yml' file
|
61
|
-
Added 'config/capybara.rb' file
|
62
|
-
Added 'config/default.yml' file
|
63
|
-
Added 'config/drivers/browserstack.rb' file
|
64
|
-
Added 'config/drivers/crossbrowsertesting.rb' file
|
65
|
-
Added 'config/drivers/headless_chrome.rb' file
|
66
|
-
Added 'config/drivers/phantomjs.rb' file
|
67
|
-
Added 'config/drivers/poltergeist.rb' file
|
68
|
-
Added 'config/drivers/sauce.rb' file
|
69
|
-
Added 'config/drivers/selenium.rb' file
|
70
|
-
Added 'config/drivers/selenium_grid.rb' file
|
71
|
-
Added 'config/drivers/testingbot.rb' file
|
72
|
-
Added 'config/drivers/webkit.rb' file
|
73
|
-
* PageOriented pattern structure generation ...
|
74
|
-
Added 'web/pages/example_page.rb' file
|
75
|
-
Added 'web/sections/menu_section.rb' file
|
76
|
-
* Base rake task generation ...
|
77
|
-
Added 'tasks/common.rake' file
|
78
|
-
* Email example generation ...
|
79
|
-
Added '/emails/example_email.rb' file
|
80
|
-
* Root files generation ...
|
81
|
-
Added '.gitignore' file
|
82
|
-
Added '.rubocop.yml' file
|
83
|
-
Added 'Rakefile' file
|
84
|
-
Added template 'Gemfile.erb' with params '{:r=>true, :rspec=>true, :c=>false, :cucumber=>false, :t=>false, :turnip=>false}' to destination 'Gemfile'
|
85
|
-
* Pre-requisites integration to the framework ...
|
86
|
-
Added 'prerequisites/factory_bot.rb' file
|
87
|
-
Added 'prerequisites/factories/users.rb' file
|
88
|
-
Added 'prerequisites/models/base.rb' file
|
89
|
-
Added 'prerequisites/models/user.rb' file
|
90
|
-
* RSpec integration to the framework ...
|
91
|
-
Added 'spec/spec_helper.rb' file
|
92
|
-
Added 'spec/example_spec.rb' file
|
93
|
-
Added 'tasks/rspec.rake' file
|
94
|
-
|
95
|
-
"""
|
96
|
-
Then a directory named "test_automation" should exist
|
97
|
-
Then the following files should exist:
|
98
|
-
| test_automation/config/boot.rb |
|
99
|
-
| test_automation/config/custom.yml |
|
100
|
-
| test_automation/config/capybara.rb |
|
101
|
-
| test_automation/config/default.yml |
|
102
|
-
| test_automation/emails/example_email.rb |
|
103
|
-
| test_automation/web/sections/menu_section.rb |
|
104
|
-
| test_automation/web/pages/example_page.rb |
|
105
|
-
| test_automation/prerequisites/factory_bot.rb |
|
106
|
-
| test_automation/prerequisites/factories/users.rb |
|
107
|
-
| test_automation/prerequisites/models/base.rb |
|
108
|
-
| test_automation/prerequisites/models/user.rb |
|
109
|
-
| test_automation/spec/example_spec.rb |
|
110
|
-
| test_automation/spec/spec_helper.rb |
|
111
|
-
| test_automation/tasks/common.rake |
|
112
|
-
| test_automation/tasks/rspec.rake |
|
113
|
-
| test_automation/Gemfile |
|
114
|
-
| test_automation/Rakefile |
|
115
|
-
| test_automation/.gitignore |
|
116
|
-
| test_automation/.rubocop.yml |
|
117
|
-
And the exit status should be 0
|
118
|
-
Examples:
|
119
|
-
| option |
|
120
|
-
| --rspec |
|
121
|
-
| -r |
|
122
|
-
|
123
|
-
Scenario Outline: Run with new command with argument and with cucumber option
|
124
|
-
When I run `howitzer new test_automation <option>`
|
125
|
-
Then the output should contain exactly:
|
126
|
-
"""
|
127
|
-
* New project directory creation ...
|
128
|
-
Created './test_automation' folder
|
129
|
-
* Config files generation ...
|
130
|
-
Added 'config/boot.rb' file
|
131
|
-
Added 'config/custom.yml' file
|
132
|
-
Added 'config/capybara.rb' file
|
133
|
-
Added 'config/default.yml' file
|
134
|
-
Added 'config/drivers/browserstack.rb' file
|
135
|
-
Added 'config/drivers/crossbrowsertesting.rb' file
|
136
|
-
Added 'config/drivers/headless_chrome.rb' file
|
137
|
-
Added 'config/drivers/phantomjs.rb' file
|
138
|
-
Added 'config/drivers/poltergeist.rb' file
|
139
|
-
Added 'config/drivers/sauce.rb' file
|
140
|
-
Added 'config/drivers/selenium.rb' file
|
141
|
-
Added 'config/drivers/selenium_grid.rb' file
|
142
|
-
Added 'config/drivers/testingbot.rb' file
|
143
|
-
Added 'config/drivers/webkit.rb' file
|
144
|
-
* PageOriented pattern structure generation ...
|
145
|
-
Added 'web/pages/example_page.rb' file
|
146
|
-
Added 'web/sections/menu_section.rb' file
|
147
|
-
* Base rake task generation ...
|
148
|
-
Added 'tasks/common.rake' file
|
149
|
-
* Email example generation ...
|
150
|
-
Added '/emails/example_email.rb' file
|
151
|
-
* Root files generation ...
|
152
|
-
Added '.gitignore' file
|
153
|
-
Added '.rubocop.yml' file
|
154
|
-
Added 'Rakefile' file
|
155
|
-
Added template 'Gemfile.erb' with params '{:c=>true, :cucumber=>true, :r=>false, :rspec=>false, :t=>false, :turnip=>false}' to destination 'Gemfile'
|
156
|
-
* Pre-requisites integration to the framework ...
|
157
|
-
Added 'prerequisites/factory_bot.rb' file
|
158
|
-
Added 'prerequisites/factories/users.rb' file
|
159
|
-
Added 'prerequisites/models/base.rb' file
|
160
|
-
Added 'prerequisites/models/user.rb' file
|
161
|
-
* Cucumber integration to the framework ...
|
162
|
-
Added 'features/step_definitions/common_steps.rb' file
|
163
|
-
Added 'features/support/env.rb' file
|
164
|
-
Added 'features/support/hooks.rb' file
|
165
|
-
Added 'features/support/transformers.rb' file
|
166
|
-
Added 'features/example.feature' file
|
167
|
-
Added 'tasks/cucumber.rake' file
|
168
|
-
Added 'tasks/cuke_sniffer.rake' file
|
169
|
-
|
170
|
-
"""
|
171
|
-
Then a directory named "test_automation" should exist
|
172
|
-
Then the following files should exist:
|
173
|
-
| test_automation/config/boot.rb |
|
174
|
-
| test_automation/config/custom.yml |
|
175
|
-
| test_automation/config/capybara.rb |
|
176
|
-
| test_automation/config/default.yml |
|
177
|
-
| test_automation/emails/example_email.rb |
|
178
|
-
| test_automation/features/step_definitions/common_steps.rb |
|
179
|
-
| test_automation/features/support/env.rb |
|
180
|
-
| test_automation/features/support/transformers.rb |
|
181
|
-
| test_automation/features/example.feature |
|
182
|
-
| test_automation/web/sections/menu_section.rb |
|
183
|
-
| test_automation/web/pages/example_page.rb |
|
184
|
-
| test_automation/prerequisites/factory_bot.rb |
|
185
|
-
| test_automation/prerequisites/factories/users.rb |
|
186
|
-
| test_automation/prerequisites/models/base.rb |
|
187
|
-
| test_automation/prerequisites/models/user.rb |
|
188
|
-
| test_automation/tasks/common.rake |
|
189
|
-
| test_automation/tasks/cucumber.rake |
|
190
|
-
| test_automation/tasks/cuke_sniffer.rake |
|
191
|
-
| test_automation/Gemfile |
|
192
|
-
| test_automation/Rakefile |
|
193
|
-
| test_automation/.gitignore |
|
194
|
-
| test_automation/.rubocop.yml |
|
195
|
-
And the exit status should be 0
|
196
|
-
Examples:
|
197
|
-
| option |
|
198
|
-
| --cucumber |
|
199
|
-
| -c |
|
200
|
-
|
201
|
-
Scenario Outline: Run with new command with argument and with turnip option
|
202
|
-
When I run `howitzer new test_automation <option>`
|
203
|
-
Then the output should contain exactly:
|
204
|
-
"""
|
205
|
-
* New project directory creation ...
|
206
|
-
Created './test_automation' folder
|
207
|
-
* Config files generation ...
|
208
|
-
Added 'config/boot.rb' file
|
209
|
-
Added 'config/custom.yml' file
|
210
|
-
Added 'config/capybara.rb' file
|
211
|
-
Added 'config/default.yml' file
|
212
|
-
Added 'config/drivers/browserstack.rb' file
|
213
|
-
Added 'config/drivers/crossbrowsertesting.rb' file
|
214
|
-
Added 'config/drivers/headless_chrome.rb' file
|
215
|
-
Added 'config/drivers/phantomjs.rb' file
|
216
|
-
Added 'config/drivers/poltergeist.rb' file
|
217
|
-
Added 'config/drivers/sauce.rb' file
|
218
|
-
Added 'config/drivers/selenium.rb' file
|
219
|
-
Added 'config/drivers/selenium_grid.rb' file
|
220
|
-
Added 'config/drivers/testingbot.rb' file
|
221
|
-
Added 'config/drivers/webkit.rb' file
|
222
|
-
* PageOriented pattern structure generation ...
|
223
|
-
Added 'web/pages/example_page.rb' file
|
224
|
-
Added 'web/sections/menu_section.rb' file
|
225
|
-
* Base rake task generation ...
|
226
|
-
Added 'tasks/common.rake' file
|
227
|
-
* Email example generation ...
|
228
|
-
Added '/emails/example_email.rb' file
|
229
|
-
* Root files generation ...
|
230
|
-
Added '.gitignore' file
|
231
|
-
Added '.rubocop.yml' file
|
232
|
-
Added 'Rakefile' file
|
233
|
-
Added template 'Gemfile.erb' with params '{:t=>true, :turnip=>true, :c=>false, :cucumber=>false, :r=>false, :rspec=>false}' to destination 'Gemfile'
|
234
|
-
* Pre-requisites integration to the framework ...
|
235
|
-
Added 'prerequisites/factory_bot.rb' file
|
236
|
-
Added 'prerequisites/factories/users.rb' file
|
237
|
-
Added 'prerequisites/models/base.rb' file
|
238
|
-
Added 'prerequisites/models/user.rb' file
|
239
|
-
* Turnip integration to the framework ...
|
240
|
-
Added '.rspec' file
|
241
|
-
Added 'spec/spec_helper.rb' file
|
242
|
-
Added 'spec/turnip_helper.rb' file
|
243
|
-
Added 'spec/acceptance/example.feature' file
|
244
|
-
Added 'spec/steps/common_steps.rb' file
|
245
|
-
Added 'tasks/turnip.rake' file
|
246
|
-
|
247
|
-
"""
|
248
|
-
Then a directory named "test_automation" should exist
|
249
|
-
Then the following files should exist:
|
250
|
-
| test_automation/config/boot.rb |
|
251
|
-
| test_automation/config/custom.yml |
|
252
|
-
| test_automation/config/capybara.rb |
|
253
|
-
| test_automation/config/default.yml |
|
254
|
-
| test_automation/emails/example_email.rb |
|
255
|
-
| test_automation/web/sections/menu_section.rb |
|
256
|
-
| test_automation/web/pages/example_page.rb |
|
257
|
-
| test_automation/tasks/common.rake |
|
258
|
-
| test_automation/tasks/turnip.rake |
|
259
|
-
| test_automation/spec/spec_helper.rb |
|
260
|
-
| test_automation/spec/turnip_helper.rb |
|
261
|
-
| test_automation/spec/acceptance/example.feature |
|
262
|
-
| test_automation/spec/steps/common_steps.rb |
|
263
|
-
| test_automation/.rspec |
|
264
|
-
| test_automation/Gemfile |
|
265
|
-
| test_automation/Rakefile |
|
266
|
-
| test_automation/.gitignore |
|
267
|
-
| test_automation/.rubocop.yml |
|
268
|
-
And the exit status should be 0
|
269
|
-
Examples:
|
270
|
-
| option |
|
271
|
-
| --turnip |
|
272
|
-
| -t |
|
273
|
-
|
274
|
-
Scenario Outline: Run with new command with argument and option
|
275
|
-
When I run `howitzer new test_automation <options>`
|
276
|
-
Then the output should contain exactly:
|
277
|
-
"""
|
278
|
-
error: Provide --cucumber, --rspec or --turnip option
|
279
|
-
|
280
|
-
"""
|
281
|
-
And the exit status should be 64
|
282
|
-
Examples:
|
283
|
-
| options |
|
284
|
-
| --cucumber --rspec |
|
285
|
-
| --rspec --cucumber |
|
286
|
-
| --cucumber --turnip |
|
287
|
-
| --turnip --cucumber |
|
288
|
-
| --rspec --turnip |
|
289
|
-
| --turnip --rspec |
|
290
|
-
| -c -t |
|
291
|
-
| -t -c |
|
292
|
-
| -c -r |
|
293
|
-
| -r -c |
|
294
|
-
| -r -t |
|
295
|
-
| -t -r |
|
296
|
-
| -cr |
|
297
|
-
| -rc |
|
298
|
-
| -ct |
|
299
|
-
| -tc |
|
300
|
-
| -rt |
|
301
|
-
| -tr |
|
302
|
-
| --cucumber --rspec --turnip |
|
303
|
-
| --cucumber --turnip --rspec |
|
304
|
-
| --rspec --cucumber --turnip |
|
305
|
-
| --rspec --turnip --cucumber |
|
306
|
-
| --turnip --cucumber --rspec |
|
307
|
-
| --turnip --rspec --cucumber |
|
308
|
-
| -c -r -t |
|
309
|
-
| -c -t -r |
|
310
|
-
| -r -c -t |
|
311
|
-
| -r -t -c |
|
312
|
-
| -t -c -r |
|
313
|
-
| -t -r -c |
|
314
|
-
| -crt |
|
315
|
-
| -ctr |
|
316
|
-
| -rct |
|
317
|
-
| -rtc |
|
318
|
-
| -tcr |
|
319
|
-
| -trc |
|
320
|
-
|
321
|
-
Scenario Outline: Run with new command with options and with rspec argument
|
322
|
-
When I run `howitzer new <option> test_automation`
|
323
|
-
Then the output should contain exactly:
|
324
|
-
"""
|
325
|
-
* New project directory creation ...
|
326
|
-
Created './test_automation' folder
|
327
|
-
* Config files generation ...
|
328
|
-
Added 'config/boot.rb' file
|
329
|
-
Added 'config/custom.yml' file
|
330
|
-
Added 'config/capybara.rb' file
|
331
|
-
Added 'config/default.yml' file
|
332
|
-
Added 'config/drivers/browserstack.rb' file
|
333
|
-
Added 'config/drivers/crossbrowsertesting.rb' file
|
334
|
-
Added 'config/drivers/headless_chrome.rb' file
|
335
|
-
Added 'config/drivers/phantomjs.rb' file
|
336
|
-
Added 'config/drivers/poltergeist.rb' file
|
337
|
-
Added 'config/drivers/sauce.rb' file
|
338
|
-
Added 'config/drivers/selenium.rb' file
|
339
|
-
Added 'config/drivers/selenium_grid.rb' file
|
340
|
-
Added 'config/drivers/testingbot.rb' file
|
341
|
-
Added 'config/drivers/webkit.rb' file
|
342
|
-
* PageOriented pattern structure generation ...
|
343
|
-
Added 'web/pages/example_page.rb' file
|
344
|
-
Added 'web/sections/menu_section.rb' file
|
345
|
-
* Base rake task generation ...
|
346
|
-
Added 'tasks/common.rake' file
|
347
|
-
* Email example generation ...
|
348
|
-
Added '/emails/example_email.rb' file
|
349
|
-
* Root files generation ...
|
350
|
-
Added '.gitignore' file
|
351
|
-
Added '.rubocop.yml' file
|
352
|
-
Added 'Rakefile' file
|
353
|
-
Added template 'Gemfile.erb' with params '{:r=>true, :rspec=>true, :c=>false, :cucumber=>false, :t=>false, :turnip=>false}' to destination 'Gemfile'
|
354
|
-
* Pre-requisites integration to the framework ...
|
355
|
-
Added 'prerequisites/factory_bot.rb' file
|
356
|
-
Added 'prerequisites/factories/users.rb' file
|
357
|
-
Added 'prerequisites/models/base.rb' file
|
358
|
-
Added 'prerequisites/models/user.rb' file
|
359
|
-
* RSpec integration to the framework ...
|
360
|
-
Added 'spec/spec_helper.rb' file
|
361
|
-
Added 'spec/example_spec.rb' file
|
362
|
-
Added 'tasks/rspec.rake' file
|
363
|
-
|
364
|
-
"""
|
365
|
-
Then a directory named "test_automation" should exist
|
366
|
-
Then the following files should exist:
|
367
|
-
| test_automation/config/boot.rb |
|
368
|
-
| test_automation/config/custom.yml |
|
369
|
-
| test_automation/config/capybara.rb |
|
370
|
-
| test_automation/config/default.yml |
|
371
|
-
| test_automation/emails/example_email.rb |
|
372
|
-
| test_automation/web/sections/menu_section.rb |
|
373
|
-
| test_automation/web/pages/example_page.rb |
|
374
|
-
| test_automation/prerequisites/factory_bot.rb |
|
375
|
-
| test_automation/prerequisites/factories/users.rb |
|
376
|
-
| test_automation/prerequisites/models/base.rb |
|
377
|
-
| test_automation/prerequisites/models/user.rb |
|
378
|
-
| test_automation/spec/example_spec.rb |
|
379
|
-
| test_automation/spec/spec_helper.rb |
|
380
|
-
| test_automation/tasks/common.rake |
|
381
|
-
| test_automation/tasks/rspec.rake |
|
382
|
-
| test_automation/Gemfile |
|
383
|
-
| test_automation/Rakefile |
|
384
|
-
| test_automation/.gitignore |
|
385
|
-
| test_automation/.rubocop.yml |
|
386
|
-
And the exit status should be 0
|
387
|
-
Examples:
|
388
|
-
| option |
|
389
|
-
| --rspec |
|
@@ -1,17 +0,0 @@
|
|
1
|
-
Feature: Howitzer CLI Unknown command
|
2
|
-
|
3
|
-
Scenario: Run with --unknown global option
|
4
|
-
When I run `howitzer --unknown`
|
5
|
-
Then the output should contain:
|
6
|
-
"""
|
7
|
-
error: Unknown option --unknown
|
8
|
-
"""
|
9
|
-
And the exit status should be 64
|
10
|
-
|
11
|
-
Scenario: Run with unknown command
|
12
|
-
When I run `howitzer unknown`
|
13
|
-
Then the output should contain:
|
14
|
-
"""
|
15
|
-
error: Unknown command 'unknown'
|
16
|
-
"""
|
17
|
-
And the exit status should be 64
|
data/features/cli_update.feature
DELETED
@@ -1,218 +0,0 @@
|
|
1
|
-
Feature: Howitzer CLI Update Existing Project
|
2
|
-
|
3
|
-
Scenario: Run with update command when rspec based project present
|
4
|
-
Given created old howitzer project based on rspec
|
5
|
-
When I run `howitzer update` interactively
|
6
|
-
And I type "y"
|
7
|
-
And I type "n"
|
8
|
-
And I type "i"
|
9
|
-
Then the output should contain:
|
10
|
-
"""
|
11
|
-
* Config files generation ...
|
12
|
-
Identical 'config/boot.rb' file
|
13
|
-
Identical 'config/custom.yml' file
|
14
|
-
Identical 'config/capybara.rb' file
|
15
|
-
Added 'config/default.yml' file
|
16
|
-
Identical 'config/drivers/browserstack.rb' file
|
17
|
-
Identical 'config/drivers/crossbrowsertesting.rb' file
|
18
|
-
Identical 'config/drivers/headless_chrome.rb' file
|
19
|
-
Identical 'config/drivers/phantomjs.rb' file
|
20
|
-
Identical 'config/drivers/poltergeist.rb' file
|
21
|
-
Identical 'config/drivers/sauce.rb' file
|
22
|
-
Identical 'config/drivers/selenium.rb' file
|
23
|
-
Identical 'config/drivers/selenium_grid.rb' file
|
24
|
-
Identical 'config/drivers/testingbot.rb' file
|
25
|
-
Identical 'config/drivers/webkit.rb' file
|
26
|
-
* PageOriented pattern structure generation ...
|
27
|
-
Identical 'web/pages/example_page.rb' file
|
28
|
-
Identical 'web/sections/menu_section.rb' file
|
29
|
-
* Base rake task generation ...
|
30
|
-
Identical 'tasks/common.rake' file
|
31
|
-
* Email example generation ...
|
32
|
-
Identical '/emails/example_email.rb' file
|
33
|
-
* Pre-requisites integration to the framework ...
|
34
|
-
Identical 'prerequisites/factory_bot.rb' file
|
35
|
-
Identical 'prerequisites/factories/users.rb' file
|
36
|
-
Identical 'prerequisites/models/base.rb' file
|
37
|
-
Identical 'prerequisites/models/user.rb' file
|
38
|
-
* Root files generation ...
|
39
|
-
Added '.gitignore' file
|
40
|
-
Added '.rubocop.yml' file
|
41
|
-
Conflict with 'Rakefile' file
|
42
|
-
Overwrite 'Rakefile' file? [Yn]: Forced 'Rakefile' file
|
43
|
-
Conflict with 'Gemfile' template
|
44
|
-
Overwrite 'Gemfile' template? [Yn]: Skipped 'Gemfile' template
|
45
|
-
* RSpec integration to the framework ...
|
46
|
-
Identical 'spec/spec_helper.rb' file
|
47
|
-
Identical 'spec/example_spec.rb' file
|
48
|
-
Identical 'tasks/rspec.rake' file
|
49
|
-
"""
|
50
|
-
And the exit status should be 0
|
51
|
-
When I run `howitzer update` interactively
|
52
|
-
And I type "y"
|
53
|
-
Then the output should contain:
|
54
|
-
"""
|
55
|
-
* Config files generation ...
|
56
|
-
Identical 'config/boot.rb' file
|
57
|
-
Identical 'config/custom.yml' file
|
58
|
-
Identical 'config/capybara.rb' file
|
59
|
-
Identical 'config/default.yml' file
|
60
|
-
Identical 'config/drivers/browserstack.rb' file
|
61
|
-
Identical 'config/drivers/crossbrowsertesting.rb' file
|
62
|
-
Identical 'config/drivers/headless_chrome.rb' file
|
63
|
-
Identical 'config/drivers/phantomjs.rb' file
|
64
|
-
Identical 'config/drivers/poltergeist.rb' file
|
65
|
-
Identical 'config/drivers/sauce.rb' file
|
66
|
-
Identical 'config/drivers/selenium.rb' file
|
67
|
-
Identical 'config/drivers/selenium_grid.rb' file
|
68
|
-
Identical 'config/drivers/testingbot.rb' file
|
69
|
-
Identical 'config/drivers/webkit.rb' file
|
70
|
-
* PageOriented pattern structure generation ...
|
71
|
-
Identical 'web/pages/example_page.rb' file
|
72
|
-
Identical 'web/sections/menu_section.rb' file
|
73
|
-
* Base rake task generation ...
|
74
|
-
Identical 'tasks/common.rake' file
|
75
|
-
* Email example generation ...
|
76
|
-
Identical '/emails/example_email.rb' file
|
77
|
-
* Pre-requisites integration to the framework ...
|
78
|
-
Identical 'prerequisites/factory_bot.rb' file
|
79
|
-
Identical 'prerequisites/factories/users.rb' file
|
80
|
-
Identical 'prerequisites/models/base.rb' file
|
81
|
-
Identical 'prerequisites/models/user.rb' file
|
82
|
-
* Root files generation ...
|
83
|
-
Identical '.gitignore' file
|
84
|
-
Identical '.rubocop.yml' file
|
85
|
-
Identical 'Rakefile' file
|
86
|
-
Conflict with 'Gemfile' template
|
87
|
-
Overwrite 'Gemfile' template? [Yn]: Forced 'Gemfile' template
|
88
|
-
* RSpec integration to the framework ...
|
89
|
-
Identical 'spec/spec_helper.rb' file
|
90
|
-
Identical 'spec/example_spec.rb' file
|
91
|
-
Identical 'tasks/rspec.rake' file
|
92
|
-
"""
|
93
|
-
And the exit status should be 0
|
94
|
-
|
95
|
-
Scenario: Run with update command when cucumber based project present
|
96
|
-
Given created old howitzer project based on cucumber
|
97
|
-
When I run `howitzer update` interactively
|
98
|
-
And I type "y"
|
99
|
-
And I type "n"
|
100
|
-
And I type "i"
|
101
|
-
Then the output should contain:
|
102
|
-
"""
|
103
|
-
* Config files generation ...
|
104
|
-
Identical 'config/boot.rb' file
|
105
|
-
Identical 'config/custom.yml' file
|
106
|
-
Identical 'config/capybara.rb' file
|
107
|
-
Added 'config/default.yml' file
|
108
|
-
Identical 'config/drivers/browserstack.rb' file
|
109
|
-
Identical 'config/drivers/crossbrowsertesting.rb' file
|
110
|
-
Identical 'config/drivers/headless_chrome.rb' file
|
111
|
-
Identical 'config/drivers/phantomjs.rb' file
|
112
|
-
Identical 'config/drivers/poltergeist.rb' file
|
113
|
-
Identical 'config/drivers/sauce.rb' file
|
114
|
-
Identical 'config/drivers/selenium.rb' file
|
115
|
-
Identical 'config/drivers/selenium_grid.rb' file
|
116
|
-
Identical 'config/drivers/testingbot.rb' file
|
117
|
-
Identical 'config/drivers/webkit.rb' file
|
118
|
-
* PageOriented pattern structure generation ...
|
119
|
-
Identical 'web/pages/example_page.rb' file
|
120
|
-
Identical 'web/sections/menu_section.rb' file
|
121
|
-
* Base rake task generation ...
|
122
|
-
Identical 'tasks/common.rake' file
|
123
|
-
* Email example generation ...
|
124
|
-
Identical '/emails/example_email.rb' file
|
125
|
-
* Pre-requisites integration to the framework ...
|
126
|
-
Identical 'prerequisites/factory_bot.rb' file
|
127
|
-
Identical 'prerequisites/factories/users.rb' file
|
128
|
-
Identical 'prerequisites/models/base.rb' file
|
129
|
-
Identical 'prerequisites/models/user.rb' file
|
130
|
-
* Root files generation ...
|
131
|
-
Added '.gitignore' file
|
132
|
-
Added '.rubocop.yml' file
|
133
|
-
Conflict with 'Rakefile' file
|
134
|
-
Overwrite 'Rakefile' file? [Yn]: Forced 'Rakefile' file
|
135
|
-
Conflict with 'Gemfile' template
|
136
|
-
Overwrite 'Gemfile' template? [Yn]: Skipped 'Gemfile' template
|
137
|
-
* Cucumber integration to the framework ...
|
138
|
-
Identical 'features/step_definitions/common_steps.rb' file
|
139
|
-
Identical 'features/support/env.rb' file
|
140
|
-
Identical 'features/support/hooks.rb' file
|
141
|
-
Identical 'features/support/transformers.rb' file
|
142
|
-
Identical 'features/example.feature' file
|
143
|
-
Identical 'tasks/cucumber.rake' file
|
144
|
-
"""
|
145
|
-
And the exit status should be 0
|
146
|
-
|
147
|
-
Scenario: Run with update command when turnip based project present
|
148
|
-
Given created old howitzer project based on turnip
|
149
|
-
When I run `howitzer update` interactively
|
150
|
-
And I type "y"
|
151
|
-
Then the output should contain:
|
152
|
-
"""
|
153
|
-
* Config files generation ...
|
154
|
-
Identical 'config/boot.rb' file
|
155
|
-
Identical 'config/custom.yml' file
|
156
|
-
Identical 'config/capybara.rb' file
|
157
|
-
Identical 'config/default.yml' file
|
158
|
-
Identical 'config/drivers/browserstack.rb' file
|
159
|
-
Identical 'config/drivers/crossbrowsertesting.rb' file
|
160
|
-
Identical 'config/drivers/headless_chrome.rb' file
|
161
|
-
Identical 'config/drivers/phantomjs.rb' file
|
162
|
-
Identical 'config/drivers/poltergeist.rb' file
|
163
|
-
Identical 'config/drivers/sauce.rb' file
|
164
|
-
Identical 'config/drivers/selenium.rb' file
|
165
|
-
Identical 'config/drivers/selenium_grid.rb' file
|
166
|
-
Identical 'config/drivers/testingbot.rb' file
|
167
|
-
Identical 'config/drivers/webkit.rb' file
|
168
|
-
* PageOriented pattern structure generation ...
|
169
|
-
Identical 'web/pages/example_page.rb' file
|
170
|
-
Identical 'web/sections/menu_section.rb' file
|
171
|
-
* Base rake task generation ...
|
172
|
-
Identical 'tasks/common.rake' file
|
173
|
-
* Email example generation ...
|
174
|
-
Identical '/emails/example_email.rb' file
|
175
|
-
* Pre-requisites integration to the framework ...
|
176
|
-
Identical 'prerequisites/factory_bot.rb' file
|
177
|
-
Identical 'prerequisites/factories/users.rb' file
|
178
|
-
Identical 'prerequisites/models/base.rb' file
|
179
|
-
Identical 'prerequisites/models/user.rb' file
|
180
|
-
* Root files generation ...
|
181
|
-
Added '.gitignore' file
|
182
|
-
Added '.rubocop.yml' file
|
183
|
-
Identical 'Rakefile' file
|
184
|
-
Conflict with 'Gemfile' template
|
185
|
-
Overwrite 'Gemfile' template? [Yn]: Forced 'Gemfile' template
|
186
|
-
* Turnip integration to the framework ...
|
187
|
-
Added '.rspec' file
|
188
|
-
Identical 'spec/spec_helper.rb' file
|
189
|
-
Identical 'spec/turnip_helper.rb' file
|
190
|
-
Identical 'spec/acceptance/example.feature' file
|
191
|
-
Identical 'spec/steps/common_steps.rb' file
|
192
|
-
"""
|
193
|
-
And the exit status should be 0
|
194
|
-
|
195
|
-
Scenario: Run with update command when project missing
|
196
|
-
When I run `howitzer update`
|
197
|
-
Then the output should contain:
|
198
|
-
"""
|
199
|
-
error: Current directory is not Howitzer project
|
200
|
-
"""
|
201
|
-
And the exit status should be 126
|
202
|
-
|
203
|
-
Scenario Outline: Run with update command with help option
|
204
|
-
When I run `howitzer update <option>`
|
205
|
-
Then the output should contain exactly:
|
206
|
-
"""
|
207
|
-
NAME
|
208
|
-
update - Upgrade existing project
|
209
|
-
|
210
|
-
SYNOPSIS
|
211
|
-
howitzer [global options] update
|
212
|
-
|
213
|
-
"""
|
214
|
-
And the exit status should be 0
|
215
|
-
Examples:
|
216
|
-
| option |
|
217
|
-
| --help |
|
218
|
-
| -h |
|
@@ -1,14 +0,0 @@
|
|
1
|
-
Feature: Howitzer CLI Version
|
2
|
-
|
3
|
-
Scenario Outline: Run with version global option
|
4
|
-
When I run `howitzer <option>`
|
5
|
-
Then the output should be exactly:
|
6
|
-
"""
|
7
|
-
howitzer version <HOWITZER_VERSION>
|
8
|
-
|
9
|
-
"""
|
10
|
-
And the exit status should be 0
|
11
|
-
Examples:
|
12
|
-
| option |
|
13
|
-
| --version |
|
14
|
-
| -v |
|
@@ -1,34 +0,0 @@
|
|
1
|
-
Given /^created old howitzer project based on rspec$/ do
|
2
|
-
run_simple 'howitzer new test_automation --rspec'
|
3
|
-
all_commands.shift
|
4
|
-
|
5
|
-
FileUtils.move(Dir.glob("#{expand_path('.')}/test_automation/*"), expand_path('.'))
|
6
|
-
FileUtils.remove_dir File.join(expand_path('.'), 'test_automation'), true
|
7
|
-
overwrite_file('Rakefile', "Dir.chdir(File.join(__dir__, '.'))")
|
8
|
-
overwrite_file('Gemfile', 'Hello')
|
9
|
-
remove 'config/default.yml'
|
10
|
-
end
|
11
|
-
|
12
|
-
Given /^created old howitzer project based on cucumber$/ do
|
13
|
-
run_simple 'howitzer new test_automation --cucumber'
|
14
|
-
all_commands.shift
|
15
|
-
|
16
|
-
FileUtils.move(Dir.glob("#{expand_path('.')}/test_automation/*"), expand_path('.'))
|
17
|
-
FileUtils.remove_dir File.join(expand_path('.'), 'test_automation'), true
|
18
|
-
overwrite_file('Rakefile', "Dir.chdir(File.join(__dir__, '.'))")
|
19
|
-
overwrite_file('Gemfile', 'Hello')
|
20
|
-
remove 'config/default.yml'
|
21
|
-
end
|
22
|
-
|
23
|
-
Given /^created old howitzer project based on turnip$/ do
|
24
|
-
run_simple 'howitzer new test_automation --turnip'
|
25
|
-
all_commands.shift
|
26
|
-
|
27
|
-
FileUtils.move(Dir.glob("#{expand_path('.')}/test_automation/*"), expand_path('.'))
|
28
|
-
FileUtils.remove_dir File.join(expand_path('.'), 'test_automation'), true
|
29
|
-
end
|
30
|
-
|
31
|
-
Then 'the output should be exactly:' do |text|
|
32
|
-
text.gsub!('<HOWITZER_VERSION>', Howitzer::VERSION)
|
33
|
-
step 'the output should contain exactly:', text
|
34
|
-
end
|