howitzer 2.0.3 → 2.3.0

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.
Files changed (139) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +69 -11
  3. data/LICENSE +1 -1
  4. data/README.md +21 -17
  5. data/bin/howitzer +7 -6
  6. data/generators/base_generator.rb +31 -17
  7. data/generators/config/config_generator.rb +11 -3
  8. data/generators/config/templates/boot.rb +3 -3
  9. data/generators/config/templates/capybara.rb +6 -131
  10. data/generators/config/templates/default.yml +34 -13
  11. data/generators/config/templates/drivers/appium.rb +25 -0
  12. data/generators/config/templates/drivers/browserstack.rb +23 -0
  13. data/generators/config/templates/drivers/crossbrowsertesting.rb +29 -0
  14. data/generators/config/templates/drivers/headless_chrome.rb +15 -0
  15. data/generators/config/templates/drivers/headless_firefox.rb +23 -0
  16. data/generators/config/templates/drivers/sauce.rb +25 -0
  17. data/generators/config/templates/drivers/selenium.rb +24 -0
  18. data/generators/config/templates/drivers/selenium_grid.rb +31 -0
  19. data/generators/config/templates/drivers/testingbot.rb +24 -0
  20. data/generators/cucumber/cucumber_generator.rb +2 -2
  21. data/generators/cucumber/templates/common_steps.rb +3 -3
  22. data/generators/cucumber/templates/cucumber.rake +5 -13
  23. data/generators/cucumber/templates/cuke_sniffer.rake +2 -2
  24. data/generators/cucumber/templates/env.rb +9 -1
  25. data/generators/cucumber/templates/hooks.rb +8 -2
  26. data/generators/cucumber/templates/transformers.rb +11 -25
  27. data/generators/emails/emails_generator.rb +2 -2
  28. data/generators/emails/templates/example_email.rb +1 -1
  29. data/generators/prerequisites/prerequisites_generator.rb +3 -3
  30. data/generators/prerequisites/templates/base.rb +1 -1
  31. data/generators/prerequisites/templates/{factory_girl.rb → factory_bot.rb} +7 -6
  32. data/generators/prerequisites/templates/users.rb +1 -1
  33. data/generators/root/root_generator.rb +3 -3
  34. data/generators/root/templates/Gemfile.erb +16 -22
  35. data/generators/rspec/rspec_generator.rb +2 -2
  36. data/generators/rspec/templates/rspec.rake +8 -8
  37. data/generators/rspec/templates/spec_helper.rb +6 -5
  38. data/generators/tasks/tasks_generator.rb +2 -2
  39. data/generators/turnip/templates/spec_helper.rb +6 -5
  40. data/generators/turnip/turnip_generator.rb +2 -2
  41. data/generators/web/templates/example_page.rb +1 -1
  42. data/generators/web/web_generator.rb +2 -2
  43. data/lib/howitzer/cache.rb +20 -19
  44. data/lib/howitzer/capybara_helpers.rb +58 -13
  45. data/lib/howitzer/email.rb +3 -2
  46. data/lib/howitzer/exceptions.rb +21 -20
  47. data/lib/howitzer/gmail_api/client.rb +31 -0
  48. data/lib/howitzer/gmail_api.rb +7 -0
  49. data/lib/howitzer/log.rb +6 -6
  50. data/lib/howitzer/mail_adapters/gmail.rb +96 -0
  51. data/lib/howitzer/mail_adapters/mailgun.rb +4 -2
  52. data/lib/howitzer/mail_adapters/mailtrap.rb +108 -0
  53. data/lib/howitzer/mailgun_api/client.rb +3 -2
  54. data/lib/howitzer/mailgun_api/connector.rb +1 -0
  55. data/lib/howitzer/mailgun_api/response.rb +1 -2
  56. data/lib/howitzer/mailtrap_api/client.rb +52 -0
  57. data/lib/howitzer/mailtrap_api.rb +7 -0
  58. data/lib/howitzer/meta/actions.rb +35 -0
  59. data/lib/howitzer/meta/element.rb +40 -0
  60. data/lib/howitzer/meta/entry.rb +62 -0
  61. data/lib/howitzer/meta/iframe.rb +41 -0
  62. data/lib/howitzer/meta/section.rb +30 -0
  63. data/lib/howitzer/meta.rb +11 -0
  64. data/lib/howitzer/utils/string_extensions.rb +6 -2
  65. data/lib/howitzer/version.rb +1 -1
  66. data/lib/howitzer/web/base_section.rb +1 -1
  67. data/lib/howitzer/web/capybara_context_holder.rb +1 -0
  68. data/lib/howitzer/web/capybara_methods_proxy.rb +15 -6
  69. data/lib/howitzer/web/element_dsl.rb +104 -44
  70. data/lib/howitzer/web/iframe_dsl.rb +23 -3
  71. data/lib/howitzer/web/page.rb +16 -4
  72. data/lib/howitzer/web/page_dsl.rb +19 -7
  73. data/lib/howitzer/web/page_validator.rb +27 -26
  74. data/lib/howitzer/web/section.rb +13 -2
  75. data/lib/howitzer/web/section_dsl.rb +65 -30
  76. data/lib/howitzer.rb +66 -10
  77. metadata +67 -133
  78. data/.coveralls.yml +0 -1
  79. data/.gitignore +0 -14
  80. data/.rspec +0 -3
  81. data/.rubocop.yml +0 -44
  82. data/.ruby-gemset +0 -1
  83. data/.travis.yml +0 -7
  84. data/Gemfile +0 -13
  85. data/MAINTENANCE.md +0 -32
  86. data/Rakefile +0 -22
  87. data/features/cli_help.feature +0 -31
  88. data/features/cli_new.feature +0 -349
  89. data/features/cli_unknown.feature +0 -17
  90. data/features/cli_update.feature +0 -178
  91. data/features/cli_version.feature +0 -14
  92. data/features/step_definitions/common_steps.rb +0 -29
  93. data/features/support/env.rb +0 -1
  94. data/features/support/transformers.rb +0 -3
  95. data/generators/root/templates/.gitignore +0 -21
  96. data/generators/root/templates/.rubocop.yml +0 -35
  97. data/generators/turnip/templates/.rspec +0 -1
  98. data/howitzer.gemspec +0 -37
  99. data/lib/howitzer/mail_adapters/debugmail.rb +0 -0
  100. data/spec/config/custom.yml +0 -9
  101. data/spec/spec_helper.rb +0 -72
  102. data/spec/support/generator_helper.rb +0 -21
  103. data/spec/support/logger_helper.rb +0 -13
  104. data/spec/support/mailgun_unit_client.rb +0 -68
  105. data/spec/support/shared_examples/capybara_context_holder.rb +0 -33
  106. data/spec/support/shared_examples/capybara_methods_proxy.rb +0 -94
  107. data/spec/support/shared_examples/dynamic_section_methods.rb +0 -35
  108. data/spec/support/shared_examples/element_dsl.rb +0 -242
  109. data/spec/unit/generators/base_generator_spec.rb +0 -272
  110. data/spec/unit/generators/config_generator_spec.rb +0 -38
  111. data/spec/unit/generators/cucumber_generator_spec.rb +0 -62
  112. data/spec/unit/generators/emails_generator_spec.rb +0 -35
  113. data/spec/unit/generators/prerequisites_generator_spec.rb +0 -53
  114. data/spec/unit/generators/root_generator_spec.rb +0 -72
  115. data/spec/unit/generators/rspec_generator_spec.rb +0 -36
  116. data/spec/unit/generators/tasks_generator_spec.rb +0 -31
  117. data/spec/unit/generators/turnip_generator_spec.rb +0 -52
  118. data/spec/unit/generators/web_generator_spec.rb +0 -52
  119. data/spec/unit/lib/cache_spec.rb +0 -85
  120. data/spec/unit/lib/capybara_helpers_spec.rb +0 -696
  121. data/spec/unit/lib/email_spec.rb +0 -186
  122. data/spec/unit/lib/howitzer_spec.rb +0 -40
  123. data/spec/unit/lib/init_spec.rb +0 -2
  124. data/spec/unit/lib/log_spec.rb +0 -122
  125. data/spec/unit/lib/mail_adapters/abstract_spec.rb +0 -62
  126. data/spec/unit/lib/mail_adapters/mailgun_spec.rb +0 -163
  127. data/spec/unit/lib/mailgun_api/client_spec.rb +0 -58
  128. data/spec/unit/lib/mailgun_api/connector_spec.rb +0 -54
  129. data/spec/unit/lib/mailgun_api/response_spec.rb +0 -28
  130. data/spec/unit/lib/utils/string_extensions_spec.rb +0 -77
  131. data/spec/unit/lib/web/base_section_spec.rb +0 -43
  132. data/spec/unit/lib/web/element_dsl_spec.rb +0 -22
  133. data/spec/unit/lib/web/iframe_dsl_spec.rb +0 -144
  134. data/spec/unit/lib/web/page_dsl_spec.rb +0 -74
  135. data/spec/unit/lib/web/page_spec.rb +0 -349
  136. data/spec/unit/lib/web/page_validator_spec.rb +0 -276
  137. data/spec/unit/lib/web/section_dsl_spec.rb +0 -165
  138. data/spec/unit/lib/web/section_spec.rb +0 -63
  139. data/spec/unit/version_spec.rb +0 -8
data/MAINTENANCE.md DELETED
@@ -1,32 +0,0 @@
1
- # Howitzer Maintenance
2
-
3
- This guide provides detailed instructions how to release a new Howitzer version
4
-
5
- To release a new Howitzer version:
6
-
7
- * Make sure all pull requests have been merged to master branch
8
- * Make sure last build is passed in [TravisCI](https://travis-ci.org/strongqa/howitzer)
9
- * Make sure the code is covered 100% in [Coveralls](https://coveralls.io/github/strongqa/howitzer?branch=master)
10
- * Make sure all gem dependencies are up-to-date with [Gemnasium](https://gemnasium.com/strongqa/howitzer)
11
- * Make sure the code is documented 100% with following command:
12
- ```
13
- rake yard
14
- ```
15
- * [Upgrade](https://github.com/strongqa/howitzer/wiki/Migration-to-new-version) Howitzer examples [Cucumber](https://github.com/strongqa/howitzer_example_cucumber), [Rspec](https://github.com/strongqa/howitzer_example_rspec) and [Turnip](https://github.com/strongqa/howitzer_example_turnip) to last version of code from master and make sure all builds are green
16
- * Bump [version](lib/howitzer/version.rb). Please note howitzer uses [semantic versioning](http://semver.org/)
17
- * Verify and actualize [ChangeLog](CHANGELOG.md)
18
- * Commit all changes and push to origin master
19
- * Specify credentials for Rubygems.org (once only) with following commands:
20
- ```bash
21
- curl https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials
22
- chmod 0600 ~/.gem/credentials
23
- ```
24
- * Release Gem with following command:
25
- ```bash
26
- rake release
27
- ```
28
- * Verify successful release on [Rubygems](https://rubygems.org/gems/howitzer)
29
- * Force API documentation indexing for the new version on [Rubygems](https://rubygems.org/gems/howitzer)
30
- * Update new link to documentation on [web site](https://github.com/romikoops/howitzer-framework.io/tree/gh-pages) Note: The web site will be updated automatically after pushing code to Github
31
- * Update [Howitzer Guides](https://github.com/strongqa/docs.howitzer-framework.io/blob/gh-pages/README.md) regarding new changes
32
- * Notify Community (Gitter, Twitter, Google Group) about the new release
data/Rakefile DELETED
@@ -1,22 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- Bundler.setup
4
-
5
- require 'rake'
6
- require 'yard'
7
- require 'rspec/core/rake_task'
8
- require 'cucumber/rake/task'
9
- require 'rubocop/rake_task'
10
-
11
- Bundler::GemHelper.install_tasks
12
- RSpec::Core::RakeTask.new(:spec) { |_spec| }
13
-
14
- Cucumber::Rake::Task.new(:cucumber, 'Run all cucumber features') do |t|
15
- t.fork = false
16
- end
17
-
18
- YARD::Rake::YardocTask.new { |_t| }
19
-
20
- RuboCop::RakeTask.new
21
-
22
- task default: %i[rubocop spec cucumber]
@@ -1,31 +0,0 @@
1
- Feature: Howitzer CLI Help
2
-
3
- Scenario Outline: Run with help global option
4
- When I run `howitzer <option>`
5
- Then the output should contain exactly:
6
- """
7
- NAME
8
- howitzer - Ruby based framework for acceptance testing
9
-
10
- SYNOPSIS
11
- howitzer [global options] command [command options] [arguments...]
12
-
13
- VERSION
14
- <HOWITZER_VERSION>
15
-
16
- GLOBAL OPTIONS
17
- --help - Show this message
18
- --version - Display the program version
19
-
20
- COMMANDS
21
- help - Shows a list of commands or help for one command
22
- new - Generate new project
23
- update - Upgrade existing project
24
-
25
- """
26
- And the exit status should be 0
27
- Examples:
28
- | option |
29
- | |
30
- | --help |
31
- | -h |
@@ -1,349 +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 new './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
- * PageOriented pattern structure generation ...
64
- Added 'web/pages/example_page.rb' file
65
- Added 'web/sections/menu_section.rb' file
66
- * Base rake task generation ...
67
- Added 'tasks/common.rake' file
68
- * Email example generation ...
69
- Added '/emails/example_email.rb' file
70
- * Root files generation ...
71
- Added '.gitignore' file
72
- Added '.rubocop.yml' file
73
- Added 'Rakefile' file
74
- Added template 'Gemfile.erb' with params '{:r=>true, :rspec=>true, :c=>false, :cucumber=>false, :t=>false, :turnip=>false}' to destination 'Gemfile'
75
- * Pre-requisites integration to the framework ...
76
- Added 'prerequisites/factory_girl.rb' file
77
- Added 'prerequisites/factories/users.rb' file
78
- Added 'prerequisites/models/base.rb' file
79
- Added 'prerequisites/models/user.rb' file
80
- * RSpec integration to the framework ...
81
- Added 'spec/spec_helper.rb' file
82
- Added 'spec/example_spec.rb' file
83
- Added 'tasks/rspec.rake' file
84
-
85
- """
86
- Then a directory named "test_automation" should exist
87
- Then the following files should exist:
88
- | test_automation/config/boot.rb |
89
- | test_automation/config/custom.yml |
90
- | test_automation/config/capybara.rb |
91
- | test_automation/config/default.yml |
92
- | test_automation/emails/example_email.rb |
93
- | test_automation/web/sections/menu_section.rb |
94
- | test_automation/web/pages/example_page.rb |
95
- | test_automation/prerequisites/factory_girl.rb |
96
- | test_automation/prerequisites/factories/users.rb |
97
- | test_automation/prerequisites/models/base.rb |
98
- | test_automation/prerequisites/models/user.rb |
99
- | test_automation/spec/example_spec.rb |
100
- | test_automation/spec/spec_helper.rb |
101
- | test_automation/tasks/common.rake |
102
- | test_automation/tasks/rspec.rake |
103
- | test_automation/Gemfile |
104
- | test_automation/Rakefile |
105
- | test_automation/.gitignore |
106
- | test_automation/.rubocop.yml |
107
- And the exit status should be 0
108
- Examples:
109
- | option |
110
- | --rspec |
111
- | -r |
112
-
113
- Scenario Outline: Run with new command with argument and with cucumber option
114
- When I run `howitzer new test_automation <option>`
115
- Then the output should contain exactly:
116
- """
117
- * New project directory creation ...
118
- Created new './test_automation' folder
119
- * Config files generation ...
120
- Added 'config/boot.rb' file
121
- Added 'config/custom.yml' file
122
- Added 'config/capybara.rb' file
123
- Added 'config/default.yml' file
124
- * PageOriented pattern structure generation ...
125
- Added 'web/pages/example_page.rb' file
126
- Added 'web/sections/menu_section.rb' file
127
- * Base rake task generation ...
128
- Added 'tasks/common.rake' file
129
- * Email example generation ...
130
- Added '/emails/example_email.rb' file
131
- * Root files generation ...
132
- Added '.gitignore' file
133
- Added '.rubocop.yml' file
134
- Added 'Rakefile' file
135
- Added template 'Gemfile.erb' with params '{:c=>true, :cucumber=>true, :r=>false, :rspec=>false, :t=>false, :turnip=>false}' to destination 'Gemfile'
136
- * Pre-requisites integration to the framework ...
137
- Added 'prerequisites/factory_girl.rb' file
138
- Added 'prerequisites/factories/users.rb' file
139
- Added 'prerequisites/models/base.rb' file
140
- Added 'prerequisites/models/user.rb' file
141
- * Cucumber integration to the framework ...
142
- Added 'features/step_definitions/common_steps.rb' file
143
- Added 'features/support/env.rb' file
144
- Added 'features/support/hooks.rb' file
145
- Added 'features/support/transformers.rb' file
146
- Added 'features/example.feature' file
147
- Added 'tasks/cucumber.rake' file
148
- Added 'tasks/cuke_sniffer.rake' file
149
-
150
- """
151
- Then a directory named "test_automation" should exist
152
- Then the following files should exist:
153
- | test_automation/config/boot.rb |
154
- | test_automation/config/custom.yml |
155
- | test_automation/config/capybara.rb |
156
- | test_automation/config/default.yml |
157
- | test_automation/emails/example_email.rb |
158
- | test_automation/features/step_definitions/common_steps.rb |
159
- | test_automation/features/support/env.rb |
160
- | test_automation/features/support/transformers.rb |
161
- | test_automation/features/example.feature |
162
- | test_automation/web/sections/menu_section.rb |
163
- | test_automation/web/pages/example_page.rb |
164
- | test_automation/prerequisites/factory_girl.rb |
165
- | test_automation/prerequisites/factories/users.rb |
166
- | test_automation/prerequisites/models/base.rb |
167
- | test_automation/prerequisites/models/user.rb |
168
- | test_automation/tasks/common.rake |
169
- | test_automation/tasks/cucumber.rake |
170
- | test_automation/tasks/cuke_sniffer.rake |
171
- | test_automation/Gemfile |
172
- | test_automation/Rakefile |
173
- | test_automation/.gitignore |
174
- | test_automation/.rubocop.yml |
175
- And the exit status should be 0
176
- Examples:
177
- | option |
178
- | --cucumber |
179
- | -c |
180
-
181
- Scenario Outline: Run with new command with argument and with turnip option
182
- When I run `howitzer new test_automation <option>`
183
- Then the output should contain exactly:
184
- """
185
- * New project directory creation ...
186
- Created new './test_automation' folder
187
- * Config files generation ...
188
- Added 'config/boot.rb' file
189
- Added 'config/custom.yml' file
190
- Added 'config/capybara.rb' file
191
- Added 'config/default.yml' file
192
- * PageOriented pattern structure generation ...
193
- Added 'web/pages/example_page.rb' file
194
- Added 'web/sections/menu_section.rb' file
195
- * Base rake task generation ...
196
- Added 'tasks/common.rake' file
197
- * Email example generation ...
198
- Added '/emails/example_email.rb' file
199
- * Root files generation ...
200
- Added '.gitignore' file
201
- Added '.rubocop.yml' file
202
- Added 'Rakefile' file
203
- Added template 'Gemfile.erb' with params '{:t=>true, :turnip=>true, :c=>false, :cucumber=>false, :r=>false, :rspec=>false}' to destination 'Gemfile'
204
- * Pre-requisites integration to the framework ...
205
- Added 'prerequisites/factory_girl.rb' file
206
- Added 'prerequisites/factories/users.rb' file
207
- Added 'prerequisites/models/base.rb' file
208
- Added 'prerequisites/models/user.rb' file
209
- * Turnip integration to the framework ...
210
- Added '.rspec' file
211
- Added 'spec/spec_helper.rb' file
212
- Added 'spec/turnip_helper.rb' file
213
- Added 'spec/acceptance/example.feature' file
214
- Added 'spec/steps/common_steps.rb' file
215
- Added 'tasks/turnip.rake' file
216
-
217
- """
218
- Then a directory named "test_automation" should exist
219
- Then the following files should exist:
220
- | test_automation/config/boot.rb |
221
- | test_automation/config/custom.yml |
222
- | test_automation/config/capybara.rb |
223
- | test_automation/config/default.yml |
224
- | test_automation/emails/example_email.rb |
225
- | test_automation/web/sections/menu_section.rb |
226
- | test_automation/web/pages/example_page.rb |
227
- | test_automation/tasks/common.rake |
228
- | test_automation/tasks/turnip.rake |
229
- | test_automation/spec/spec_helper.rb |
230
- | test_automation/spec/turnip_helper.rb |
231
- | test_automation/spec/acceptance/example.feature |
232
- | test_automation/spec/steps/common_steps.rb |
233
- | test_automation/.rspec |
234
- | test_automation/Gemfile |
235
- | test_automation/Rakefile |
236
- | test_automation/.gitignore |
237
- | test_automation/.rubocop.yml |
238
- And the exit status should be 0
239
- Examples:
240
- | option |
241
- | --turnip |
242
- | -t |
243
-
244
- Scenario Outline: Run with new command with argument and option
245
- When I run `howitzer new test_automation <options>`
246
- Then the output should contain exactly:
247
- """
248
- error: Provide --cucumber, --rspec or --turnip option
249
-
250
- """
251
- And the exit status should be 64
252
- Examples:
253
- | options |
254
- | --cucumber --rspec |
255
- | --rspec --cucumber |
256
- | --cucumber --turnip |
257
- | --turnip --cucumber |
258
- | --rspec --turnip |
259
- | --turnip --rspec |
260
- | -c -t |
261
- | -t -c |
262
- | -c -r |
263
- | -r -c |
264
- | -r -t |
265
- | -t -r |
266
- | -cr |
267
- | -rc |
268
- | -ct |
269
- | -tc |
270
- | -rt |
271
- | -tr |
272
- | --cucumber --rspec --turnip |
273
- | --cucumber --turnip --rspec |
274
- | --rspec --cucumber --turnip |
275
- | --rspec --turnip --cucumber |
276
- | --turnip --cucumber --rspec |
277
- | --turnip --rspec --cucumber |
278
- | -c -r -t |
279
- | -c -t -r |
280
- | -r -c -t |
281
- | -r -t -c |
282
- | -t -c -r |
283
- | -t -r -c |
284
- | -crt |
285
- | -ctr |
286
- | -rct |
287
- | -rtc |
288
- | -tcr |
289
- | -trc |
290
-
291
- Scenario Outline: Run with new command with options and with rspec argument
292
- When I run `howitzer new <option> test_automation`
293
- Then the output should contain exactly:
294
- """
295
- * New project directory creation ...
296
- Created new './test_automation' folder
297
- * Config files generation ...
298
- Added 'config/boot.rb' file
299
- Added 'config/custom.yml' file
300
- Added 'config/capybara.rb' file
301
- Added 'config/default.yml' file
302
- * PageOriented pattern structure generation ...
303
- Added 'web/pages/example_page.rb' file
304
- Added 'web/sections/menu_section.rb' file
305
- * Base rake task generation ...
306
- Added 'tasks/common.rake' file
307
- * Email example generation ...
308
- Added '/emails/example_email.rb' file
309
- * Root files generation ...
310
- Added '.gitignore' file
311
- Added '.rubocop.yml' file
312
- Added 'Rakefile' file
313
- Added template 'Gemfile.erb' with params '{:r=>true, :rspec=>true, :c=>false, :cucumber=>false, :t=>false, :turnip=>false}' to destination 'Gemfile'
314
- * Pre-requisites integration to the framework ...
315
- Added 'prerequisites/factory_girl.rb' file
316
- Added 'prerequisites/factories/users.rb' file
317
- Added 'prerequisites/models/base.rb' file
318
- Added 'prerequisites/models/user.rb' file
319
- * RSpec integration to the framework ...
320
- Added 'spec/spec_helper.rb' file
321
- Added 'spec/example_spec.rb' file
322
- Added 'tasks/rspec.rake' file
323
-
324
- """
325
- Then a directory named "test_automation" should exist
326
- Then the following files should exist:
327
- | test_automation/config/boot.rb |
328
- | test_automation/config/custom.yml |
329
- | test_automation/config/capybara.rb |
330
- | test_automation/config/default.yml |
331
- | test_automation/emails/example_email.rb |
332
- | test_automation/web/sections/menu_section.rb |
333
- | test_automation/web/pages/example_page.rb |
334
- | test_automation/prerequisites/factory_girl.rb |
335
- | test_automation/prerequisites/factories/users.rb |
336
- | test_automation/prerequisites/models/base.rb |
337
- | test_automation/prerequisites/models/user.rb |
338
- | test_automation/spec/example_spec.rb |
339
- | test_automation/spec/spec_helper.rb |
340
- | test_automation/tasks/common.rake |
341
- | test_automation/tasks/rspec.rake |
342
- | test_automation/Gemfile |
343
- | test_automation/Rakefile |
344
- | test_automation/.gitignore |
345
- | test_automation/.rubocop.yml |
346
- And the exit status should be 0
347
- Examples:
348
- | option |
349
- | --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
@@ -1,178 +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
- * PageOriented pattern structure generation ...
17
- Identical 'web/pages/example_page.rb' file
18
- Identical 'web/sections/menu_section.rb' file
19
- * Base rake task generation ...
20
- Identical 'tasks/common.rake' file
21
- * Email example generation ...
22
- Identical '/emails/example_email.rb' file
23
- * Pre-requisites integration to the framework ...
24
- Identical 'prerequisites/factory_girl.rb' file
25
- Identical 'prerequisites/factories/users.rb' file
26
- Identical 'prerequisites/models/base.rb' file
27
- Identical 'prerequisites/models/user.rb' file
28
- * Root files generation ...
29
- Added '.gitignore' file
30
- Added '.rubocop.yml' file
31
- Conflict with 'Rakefile' file
32
- Overwrite 'Rakefile' file? [Yn]: Forced 'Rakefile' file
33
- Conflict with 'Gemfile' template
34
- Overwrite 'Gemfile' template? [Yn]: Skipped 'Gemfile' template
35
- * RSpec integration to the framework ...
36
- Identical 'spec/spec_helper.rb' file
37
- Identical 'spec/example_spec.rb' file
38
- Identical 'tasks/rspec.rake' file
39
- """
40
- And the exit status should be 0
41
- When I run `howitzer update` interactively
42
- And I type "y"
43
- Then the output should contain:
44
- """
45
- * Config files generation ...
46
- Identical 'config/boot.rb' file
47
- Identical 'config/custom.yml' file
48
- Identical 'config/capybara.rb' file
49
- Identical 'config/default.yml' file
50
- * PageOriented pattern structure generation ...
51
- Identical 'web/pages/example_page.rb' file
52
- Identical 'web/sections/menu_section.rb' file
53
- * Base rake task generation ...
54
- Identical 'tasks/common.rake' file
55
- * Email example generation ...
56
- Identical '/emails/example_email.rb' file
57
- * Pre-requisites integration to the framework ...
58
- Identical 'prerequisites/factory_girl.rb' file
59
- Identical 'prerequisites/factories/users.rb' file
60
- Identical 'prerequisites/models/base.rb' file
61
- Identical 'prerequisites/models/user.rb' file
62
- * Root files generation ...
63
- Identical '.gitignore' file
64
- Identical '.rubocop.yml' file
65
- Identical 'Rakefile' file
66
- Conflict with 'Gemfile' template
67
- Overwrite 'Gemfile' template? [Yn]: Forced 'Gemfile' template
68
- * RSpec integration to the framework ...
69
- Identical 'spec/spec_helper.rb' file
70
- Identical 'spec/example_spec.rb' file
71
- Identical 'tasks/rspec.rake' file
72
- """
73
- And the exit status should be 0
74
-
75
- Scenario: Run with update command when cucumber based project present
76
- Given created old howitzer project based on cucumber
77
- When I run `howitzer update` interactively
78
- And I type "y"
79
- And I type "n"
80
- And I type "i"
81
- Then the output should contain:
82
- """
83
- * Config files generation ...
84
- Identical 'config/boot.rb' file
85
- Identical 'config/custom.yml' file
86
- Identical 'config/capybara.rb' file
87
- Added 'config/default.yml' file
88
- * PageOriented pattern structure generation ...
89
- Identical 'web/pages/example_page.rb' file
90
- Identical 'web/sections/menu_section.rb' file
91
- * Base rake task generation ...
92
- Identical 'tasks/common.rake' file
93
- * Email example generation ...
94
- Identical '/emails/example_email.rb' file
95
- * Pre-requisites integration to the framework ...
96
- Identical 'prerequisites/factory_girl.rb' file
97
- Identical 'prerequisites/factories/users.rb' file
98
- Identical 'prerequisites/models/base.rb' file
99
- Identical 'prerequisites/models/user.rb' file
100
- * Root files generation ...
101
- Added '.gitignore' file
102
- Added '.rubocop.yml' file
103
- Conflict with 'Rakefile' file
104
- Overwrite 'Rakefile' file? [Yn]: Forced 'Rakefile' file
105
- Conflict with 'Gemfile' template
106
- Overwrite 'Gemfile' template? [Yn]: Skipped 'Gemfile' template
107
- * Cucumber integration to the framework ...
108
- Identical 'features/step_definitions/common_steps.rb' file
109
- Identical 'features/support/env.rb' file
110
- Identical 'features/support/hooks.rb' file
111
- Identical 'features/support/transformers.rb' file
112
- Identical 'features/example.feature' file
113
- Identical 'tasks/cucumber.rake' file
114
- """
115
- And the exit status should be 0
116
-
117
- Scenario: Run with update command when turnip based project present
118
- Given created old howitzer project based on turnip
119
- When I run `howitzer update` interactively
120
- And I type "y"
121
- Then the output should contain:
122
- """
123
- * Config files generation ...
124
- Identical 'config/boot.rb' file
125
- Identical 'config/custom.yml' file
126
- Identical 'config/capybara.rb' file
127
- Identical 'config/default.yml' file
128
- * PageOriented pattern structure generation ...
129
- Identical 'web/pages/example_page.rb' file
130
- Identical 'web/sections/menu_section.rb' file
131
- * Base rake task generation ...
132
- Identical 'tasks/common.rake' file
133
- * Email example generation ...
134
- Identical '/emails/example_email.rb' file
135
- * Pre-requisites integration to the framework ...
136
- Identical 'prerequisites/factory_girl.rb' file
137
- Identical 'prerequisites/factories/users.rb' file
138
- Identical 'prerequisites/models/base.rb' file
139
- Identical 'prerequisites/models/user.rb' file
140
- * Root files generation ...
141
- Added '.gitignore' file
142
- Added '.rubocop.yml' file
143
- Identical 'Rakefile' file
144
- Conflict with 'Gemfile' template
145
- Overwrite 'Gemfile' template? [Yn]: Forced 'Gemfile' template
146
- * Turnip integration to the framework ...
147
- Added '.rspec' file
148
- Identical 'spec/spec_helper.rb' file
149
- Identical 'spec/turnip_helper.rb' file
150
- Identical 'spec/acceptance/example.feature' file
151
- Identical 'spec/steps/common_steps.rb' file
152
- """
153
- And the exit status should be 0
154
-
155
- Scenario: Run with update command when project missing
156
- When I run `howitzer update`
157
- Then the output should contain:
158
- """
159
- error: Current directory is not Howitzer project
160
- """
161
- And the exit status should be 126
162
-
163
- Scenario Outline: Run with update command with help option
164
- When I run `howitzer update <option>`
165
- Then the output should contain exactly:
166
- """
167
- NAME
168
- update - Upgrade existing project
169
-
170
- SYNOPSIS
171
- howitzer [global options] update
172
-
173
- """
174
- And the exit status should be 0
175
- Examples:
176
- | option |
177
- | --help |
178
- | -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 contain 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,29 +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