howitzer 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -1
  3. data/LICENSE +1 -1
  4. data/README.md +16 -16
  5. data/generators/base_generator.rb +1 -1
  6. data/generators/config/config_generator.rb +1 -4
  7. data/generators/config/templates/boot.rb +1 -1
  8. data/generators/config/templates/capybara.rb +1 -3
  9. data/generators/config/templates/default.yml +5 -19
  10. data/generators/config/templates/drivers/browserstack.rb +1 -1
  11. data/generators/config/templates/drivers/crossbrowsertesting.rb +1 -1
  12. data/generators/config/templates/drivers/headless_chrome.rb +1 -1
  13. data/generators/config/templates/drivers/headless_firefox.rb +1 -1
  14. data/generators/config/templates/drivers/sauce.rb +1 -1
  15. data/generators/config/templates/drivers/selenium.rb +1 -1
  16. data/generators/config/templates/drivers/selenium_grid.rb +2 -2
  17. data/generators/config/templates/drivers/testingbot.rb +1 -1
  18. data/generators/cucumber/templates/env.rb +1 -1
  19. data/generators/cucumber/templates/hooks.rb +8 -2
  20. data/generators/cucumber/templates/transformers.rb +1 -1
  21. data/generators/prerequisites/templates/factory_bot.rb +1 -1
  22. data/generators/root/templates/Gemfile.erb +4 -10
  23. data/generators/rspec/templates/spec_helper.rb +4 -4
  24. data/generators/turnip/templates/spec_helper.rb +4 -4
  25. data/generators/web/templates/example_page.rb +1 -1
  26. data/lib/howitzer/cache.rb +1 -1
  27. data/lib/howitzer/capybara_helpers.rb +27 -7
  28. data/lib/howitzer/email.rb +2 -2
  29. data/lib/howitzer/exceptions.rb +21 -21
  30. data/lib/howitzer/gmail_api/client.rb +13 -4
  31. data/lib/howitzer/log.rb +6 -6
  32. data/lib/howitzer/mailgun_api/client.rb +3 -2
  33. data/lib/howitzer/mailgun_api/response.rb +1 -2
  34. data/lib/howitzer/mailtrap_api/client.rb +1 -1
  35. data/lib/howitzer/meta/actions.rb +13 -16
  36. data/lib/howitzer/meta/element.rb +12 -10
  37. data/lib/howitzer/utils/string_extensions.rb +6 -2
  38. data/lib/howitzer/version.rb +1 -1
  39. data/lib/howitzer/web/base_section.rb +1 -1
  40. data/lib/howitzer/web/capybara_methods_proxy.rb +11 -5
  41. data/lib/howitzer/web/element_dsl.rb +104 -45
  42. data/lib/howitzer/web/iframe_dsl.rb +2 -2
  43. data/lib/howitzer/web/page.rb +4 -14
  44. data/lib/howitzer/web/page_dsl.rb +15 -6
  45. data/lib/howitzer/web/page_validator.rb +25 -26
  46. data/lib/howitzer/web/section.rb +5 -2
  47. data/lib/howitzer/web/section_dsl.rb +64 -30
  48. data/lib/howitzer.rb +2 -2
  49. metadata +24 -161
  50. data/.coveralls.yml +0 -1
  51. data/.gitignore +0 -14
  52. data/.rspec +0 -3
  53. data/.rubocop.yml +0 -60
  54. data/.ruby-gemset +0 -1
  55. data/.travis.yml +0 -8
  56. data/Gemfile +0 -14
  57. data/ISSUE_TEMPLATE.md +0 -16
  58. data/MAINTENANCE.md +0 -32
  59. data/Rakefile +0 -38
  60. data/features/cli_help.feature +0 -31
  61. data/features/cli_new.feature +0 -393
  62. data/features/cli_unknown.feature +0 -17
  63. data/features/cli_update.feature +0 -223
  64. data/features/cli_version.feature +0 -14
  65. data/features/step_definitions/common_steps.rb +0 -34
  66. data/features/support/env.rb +0 -1
  67. data/generators/config/templates/drivers/poltergeist.rb +0 -11
  68. data/generators/config/templates/drivers/webkit.rb +0 -6
  69. data/generators/root/templates/.gitignore +0 -21
  70. data/generators/root/templates/.rubocop.yml.erb +0 -56
  71. data/generators/turnip/templates/.rspec +0 -1
  72. data/howitzer.gemspec +0 -39
  73. data/lib/howitzer/mail_adapters/debugmail.rb +0 -0
  74. data/spec/config/custom.yml +0 -9
  75. data/spec/spec_helper.rb +0 -73
  76. data/spec/support/generator_helper.rb +0 -21
  77. data/spec/support/logger_helper.rb +0 -13
  78. data/spec/support/shared_examples/capybara_context_holder.rb +0 -33
  79. data/spec/support/shared_examples/capybara_methods_proxy.rb +0 -94
  80. data/spec/support/shared_examples/dynamic_section_methods.rb +0 -35
  81. data/spec/support/shared_examples/element_dsl.rb +0 -242
  82. data/spec/support/shared_examples/meta_highlight_xpath.rb +0 -41
  83. data/spec/unit/generators/base_generator_spec.rb +0 -283
  84. data/spec/unit/generators/config_generator_spec.rb +0 -61
  85. data/spec/unit/generators/cucumber_generator_spec.rb +0 -62
  86. data/spec/unit/generators/emails_generator_spec.rb +0 -35
  87. data/spec/unit/generators/prerequisites_generator_spec.rb +0 -53
  88. data/spec/unit/generators/root_generator_spec.rb +0 -86
  89. data/spec/unit/generators/rspec_generator_spec.rb +0 -36
  90. data/spec/unit/generators/tasks_generator_spec.rb +0 -31
  91. data/spec/unit/generators/templates/cucumber_spec.rb +0 -97
  92. data/spec/unit/generators/templates/rspec_spec.rb +0 -88
  93. data/spec/unit/generators/templates/turnip_spec.rb +0 -98
  94. data/spec/unit/generators/turnip_generator_spec.rb +0 -52
  95. data/spec/unit/generators/web_generator_spec.rb +0 -52
  96. data/spec/unit/lib/cache_spec.rb +0 -85
  97. data/spec/unit/lib/capybara_helpers_spec.rb +0 -730
  98. data/spec/unit/lib/email_spec.rb +0 -186
  99. data/spec/unit/lib/gmail_api/client_spec.rb +0 -26
  100. data/spec/unit/lib/howitzer_spec.rb +0 -92
  101. data/spec/unit/lib/init_spec.rb +0 -2
  102. data/spec/unit/lib/log_spec.rb +0 -122
  103. data/spec/unit/lib/mail_adapters/abstract_spec.rb +0 -62
  104. data/spec/unit/lib/mail_adapters/gmail_spec.rb +0 -128
  105. data/spec/unit/lib/mail_adapters/mailgun_spec.rb +0 -158
  106. data/spec/unit/lib/mail_adapters/mailtrap_spec.rb +0 -130
  107. data/spec/unit/lib/mailgun_api/client_spec.rb +0 -80
  108. data/spec/unit/lib/mailgun_api/connector_spec.rb +0 -54
  109. data/spec/unit/lib/mailgun_api/response_spec.rb +0 -28
  110. data/spec/unit/lib/mailtrap_api/client_spec.rb +0 -67
  111. data/spec/unit/lib/meta/element_spec.rb +0 -59
  112. data/spec/unit/lib/meta/entry_spec.rb +0 -77
  113. data/spec/unit/lib/meta/iframe_spec.rb +0 -66
  114. data/spec/unit/lib/meta/section_spec.rb +0 -43
  115. data/spec/unit/lib/utils/string_extensions_spec.rb +0 -77
  116. data/spec/unit/lib/web/base_section_spec.rb +0 -43
  117. data/spec/unit/lib/web/element_dsl_spec.rb +0 -31
  118. data/spec/unit/lib/web/iframe_dsl_spec.rb +0 -203
  119. data/spec/unit/lib/web/page_dsl_spec.rb +0 -74
  120. data/spec/unit/lib/web/page_spec.rb +0 -385
  121. data/spec/unit/lib/web/page_validator_spec.rb +0 -276
  122. data/spec/unit/lib/web/section_dsl_spec.rb +0 -165
  123. data/spec/unit/lib/web/section_spec.rb +0 -70
  124. data/spec/unit/version_spec.rb +0 -8
data/Gemfile DELETED
@@ -1,14 +0,0 @@
1
- source 'https://rubygems.org'
2
- # Specify your gem's dependencies in howitzer.gemspec
3
- group :test do
4
- gem 'coveralls', require: false
5
- gem 'repeater', require: false
6
- gem 'rest-client', require: false
7
- gem 'simplecov', require: false
8
- end
9
- gemspec
10
-
11
- group :development do
12
- gem 'fakeweb', git: 'https://github.com/chrisk/fakeweb.git', branch: 'master'
13
- gem 'rubocop'
14
- end
data/ISSUE_TEMPLATE.md DELETED
@@ -1,16 +0,0 @@
1
- ## Meta
2
- Howitzer Version:
3
- <!-- 2.0.3 -->
4
- Driver and browser information:
5
- <!-- selenium 3.4 ChromeDriver 2.29.461571 Chrome 59 -->
6
- Gem Versions:
7
- <!-- Gem versions involved in the issue -->
8
-
9
- ## Expected Behavior
10
-
11
- ## Actual Behavior
12
-
13
- ## Steps to reproduce
14
- <!--
15
- Please be sure to include the code that is creating the issue along with HTML the code is being run against
16
- -->
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,38 +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
- RuboCop::RakeTask.new
19
-
20
- YARD::Rake::YardocTask.new { |_t| }
21
-
22
- namespace :yard do
23
- desc 'Validate yard coverage'
24
- task :validate do
25
- log = StringIO.new
26
- YARD::Logger.instance(log)
27
- doc = YARD::CLI::Yardoc.new
28
- doc.use_document_file = false
29
- doc.use_yardopts_file = false
30
- doc.generate = false
31
- doc.run('stats --list-undoc')
32
- output = log.string
33
- puts output
34
- exit(1) unless output.include?('100.00% documented')
35
- end
36
- end
37
-
38
- task default: %i[rubocop yard:validate 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 be 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,393 +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/appium.rb' file
64
- Added 'config/drivers/browserstack.rb' file
65
- Added 'config/drivers/crossbrowsertesting.rb' file
66
- Added 'config/drivers/headless_chrome.rb' file
67
- Added 'config/drivers/headless_firefox.rb' file
68
- Added 'config/drivers/poltergeist.rb' file
69
- Added 'config/drivers/sauce.rb' file
70
- Added 'config/drivers/selenium.rb' file
71
- Added 'config/drivers/selenium_grid.rb' file
72
- Added 'config/drivers/testingbot.rb' file
73
- Added 'config/drivers/webkit.rb' file
74
- * PageOriented pattern structure generation ...
75
- Added 'web/pages/example_page.rb' file
76
- Added 'web/sections/menu_section.rb' file
77
- * Base rake task generation ...
78
- Added 'tasks/common.rake' file
79
- * Email example generation ...
80
- Added '/emails/example_email.rb' file
81
- * Root files generation ...
82
- Added '.gitignore' file
83
- Added 'Rakefile' file
84
- Added template '.rubocop.yml.erb' with params '{:r=>true, :rspec=>true, :c=>false, :cucumber=>false, :t=>false, :turnip=>false}' to destination '.rubocop.yml'
85
- Added template 'Gemfile.erb' with params '{:r=>true, :rspec=>true, :c=>false, :cucumber=>false, :t=>false, :turnip=>false}' to destination 'Gemfile'
86
- * Pre-requisites integration to the framework ...
87
- Added 'prerequisites/factory_bot.rb' file
88
- Added 'prerequisites/factories/users.rb' file
89
- Added 'prerequisites/models/base.rb' file
90
- Added 'prerequisites/models/user.rb' file
91
- * RSpec integration to the framework ...
92
- Added 'spec/spec_helper.rb' file
93
- Added 'spec/example_spec.rb' file
94
- Added 'tasks/rspec.rake' file
95
-
96
- """
97
- Then a directory named "test_automation" should exist
98
- Then the following files should exist:
99
- | test_automation/config/boot.rb |
100
- | test_automation/config/custom.yml |
101
- | test_automation/config/capybara.rb |
102
- | test_automation/config/default.yml |
103
- | test_automation/emails/example_email.rb |
104
- | test_automation/web/sections/menu_section.rb |
105
- | test_automation/web/pages/example_page.rb |
106
- | test_automation/prerequisites/factory_bot.rb |
107
- | test_automation/prerequisites/factories/users.rb |
108
- | test_automation/prerequisites/models/base.rb |
109
- | test_automation/prerequisites/models/user.rb |
110
- | test_automation/spec/example_spec.rb |
111
- | test_automation/spec/spec_helper.rb |
112
- | test_automation/tasks/common.rake |
113
- | test_automation/tasks/rspec.rake |
114
- | test_automation/Gemfile |
115
- | test_automation/Rakefile |
116
- | test_automation/.gitignore |
117
- | test_automation/.rubocop.yml |
118
- And the exit status should be 0
119
- Examples:
120
- | option |
121
- | --rspec |
122
- | -r |
123
-
124
- Scenario Outline: Run with new command with argument and with cucumber option
125
- When I run `howitzer new test_automation <option>`
126
- Then the output should contain exactly:
127
- """
128
- * New project directory creation ...
129
- Created './test_automation' folder
130
- * Config files generation ...
131
- Added 'config/boot.rb' file
132
- Added 'config/custom.yml' file
133
- Added 'config/capybara.rb' file
134
- Added 'config/default.yml' file
135
- Added 'config/drivers/appium.rb' file
136
- Added 'config/drivers/browserstack.rb' file
137
- Added 'config/drivers/crossbrowsertesting.rb' file
138
- Added 'config/drivers/headless_chrome.rb' file
139
- Added 'config/drivers/headless_firefox.rb' file
140
- Added 'config/drivers/poltergeist.rb' file
141
- Added 'config/drivers/sauce.rb' file
142
- Added 'config/drivers/selenium.rb' file
143
- Added 'config/drivers/selenium_grid.rb' file
144
- Added 'config/drivers/testingbot.rb' file
145
- Added 'config/drivers/webkit.rb' file
146
- * PageOriented pattern structure generation ...
147
- Added 'web/pages/example_page.rb' file
148
- Added 'web/sections/menu_section.rb' file
149
- * Base rake task generation ...
150
- Added 'tasks/common.rake' file
151
- * Email example generation ...
152
- Added '/emails/example_email.rb' file
153
- * Root files generation ...
154
- Added '.gitignore' file
155
- Added 'Rakefile' file
156
- Added template '.rubocop.yml.erb' with params '{:c=>true, :cucumber=>true, :r=>false, :rspec=>false, :t=>false, :turnip=>false}' to destination '.rubocop.yml'
157
- Added template 'Gemfile.erb' with params '{:c=>true, :cucumber=>true, :r=>false, :rspec=>false, :t=>false, :turnip=>false}' to destination 'Gemfile'
158
- * Pre-requisites integration to the framework ...
159
- Added 'prerequisites/factory_bot.rb' file
160
- Added 'prerequisites/factories/users.rb' file
161
- Added 'prerequisites/models/base.rb' file
162
- Added 'prerequisites/models/user.rb' file
163
- * Cucumber integration to the framework ...
164
- Added 'features/step_definitions/common_steps.rb' file
165
- Added 'features/support/env.rb' file
166
- Added 'features/support/hooks.rb' file
167
- Added 'features/support/transformers.rb' file
168
- Added 'features/example.feature' file
169
- Added 'tasks/cucumber.rake' file
170
- Added 'tasks/cuke_sniffer.rake' file
171
-
172
- """
173
- Then a directory named "test_automation" should exist
174
- Then the following files should exist:
175
- | test_automation/config/boot.rb |
176
- | test_automation/config/custom.yml |
177
- | test_automation/config/capybara.rb |
178
- | test_automation/config/default.yml |
179
- | test_automation/emails/example_email.rb |
180
- | test_automation/features/step_definitions/common_steps.rb |
181
- | test_automation/features/support/env.rb |
182
- | test_automation/features/support/transformers.rb |
183
- | test_automation/features/example.feature |
184
- | test_automation/web/sections/menu_section.rb |
185
- | test_automation/web/pages/example_page.rb |
186
- | test_automation/prerequisites/factory_bot.rb |
187
- | test_automation/prerequisites/factories/users.rb |
188
- | test_automation/prerequisites/models/base.rb |
189
- | test_automation/prerequisites/models/user.rb |
190
- | test_automation/tasks/common.rake |
191
- | test_automation/tasks/cucumber.rake |
192
- | test_automation/tasks/cuke_sniffer.rake |
193
- | test_automation/Gemfile |
194
- | test_automation/Rakefile |
195
- | test_automation/.gitignore |
196
- | test_automation/.rubocop.yml |
197
- And the exit status should be 0
198
- Examples:
199
- | option |
200
- | --cucumber |
201
- | -c |
202
-
203
- Scenario Outline: Run with new command with argument and with turnip option
204
- When I run `howitzer new test_automation <option>`
205
- Then the output should contain exactly:
206
- """
207
- * New project directory creation ...
208
- Created './test_automation' folder
209
- * Config files generation ...
210
- Added 'config/boot.rb' file
211
- Added 'config/custom.yml' file
212
- Added 'config/capybara.rb' file
213
- Added 'config/default.yml' file
214
- Added 'config/drivers/appium.rb' file
215
- Added 'config/drivers/browserstack.rb' file
216
- Added 'config/drivers/crossbrowsertesting.rb' file
217
- Added 'config/drivers/headless_chrome.rb' file
218
- Added 'config/drivers/headless_firefox.rb' file
219
- Added 'config/drivers/poltergeist.rb' file
220
- Added 'config/drivers/sauce.rb' file
221
- Added 'config/drivers/selenium.rb' file
222
- Added 'config/drivers/selenium_grid.rb' file
223
- Added 'config/drivers/testingbot.rb' file
224
- Added 'config/drivers/webkit.rb' file
225
- * PageOriented pattern structure generation ...
226
- Added 'web/pages/example_page.rb' file
227
- Added 'web/sections/menu_section.rb' file
228
- * Base rake task generation ...
229
- Added 'tasks/common.rake' file
230
- * Email example generation ...
231
- Added '/emails/example_email.rb' file
232
- * Root files generation ...
233
- Added '.gitignore' file
234
- Added 'Rakefile' file
235
- Added template '.rubocop.yml.erb' with params '{:t=>true, :turnip=>true, :c=>false, :cucumber=>false, :r=>false, :rspec=>false}' to destination '.rubocop.yml'
236
- Added template 'Gemfile.erb' with params '{:t=>true, :turnip=>true, :c=>false, :cucumber=>false, :r=>false, :rspec=>false}' to destination 'Gemfile'
237
- * Pre-requisites integration to the framework ...
238
- Added 'prerequisites/factory_bot.rb' file
239
- Added 'prerequisites/factories/users.rb' file
240
- Added 'prerequisites/models/base.rb' file
241
- Added 'prerequisites/models/user.rb' file
242
- * Turnip integration to the framework ...
243
- Added '.rspec' file
244
- Added 'spec/spec_helper.rb' file
245
- Added 'spec/turnip_helper.rb' file
246
- Added 'spec/acceptance/example.feature' file
247
- Added 'spec/steps/common_steps.rb' file
248
- Added 'tasks/turnip.rake' file
249
-
250
- """
251
- Then a directory named "test_automation" should exist
252
- Then the following files should exist:
253
- | test_automation/config/boot.rb |
254
- | test_automation/config/custom.yml |
255
- | test_automation/config/capybara.rb |
256
- | test_automation/config/default.yml |
257
- | test_automation/emails/example_email.rb |
258
- | test_automation/web/sections/menu_section.rb |
259
- | test_automation/web/pages/example_page.rb |
260
- | test_automation/tasks/common.rake |
261
- | test_automation/tasks/turnip.rake |
262
- | test_automation/spec/spec_helper.rb |
263
- | test_automation/spec/turnip_helper.rb |
264
- | test_automation/spec/acceptance/example.feature |
265
- | test_automation/spec/steps/common_steps.rb |
266
- | test_automation/.rspec |
267
- | test_automation/Gemfile |
268
- | test_automation/Rakefile |
269
- | test_automation/.gitignore |
270
- | test_automation/.rubocop.yml |
271
- And the exit status should be 0
272
- Examples:
273
- | option |
274
- | --turnip |
275
- | -t |
276
-
277
- Scenario Outline: Run with new command with argument and option
278
- When I run `howitzer new test_automation <options>`
279
- Then the output should contain exactly:
280
- """
281
- error: Provide --cucumber, --rspec or --turnip option
282
-
283
- """
284
- And the exit status should be 64
285
- Examples:
286
- | options |
287
- | --cucumber --rspec |
288
- | --rspec --cucumber |
289
- | --cucumber --turnip |
290
- | --turnip --cucumber |
291
- | --rspec --turnip |
292
- | --turnip --rspec |
293
- | -c -t |
294
- | -t -c |
295
- | -c -r |
296
- | -r -c |
297
- | -r -t |
298
- | -t -r |
299
- | -cr |
300
- | -rc |
301
- | -ct |
302
- | -tc |
303
- | -rt |
304
- | -tr |
305
- | --cucumber --rspec --turnip |
306
- | --cucumber --turnip --rspec |
307
- | --rspec --cucumber --turnip |
308
- | --rspec --turnip --cucumber |
309
- | --turnip --cucumber --rspec |
310
- | --turnip --rspec --cucumber |
311
- | -c -r -t |
312
- | -c -t -r |
313
- | -r -c -t |
314
- | -r -t -c |
315
- | -t -c -r |
316
- | -t -r -c |
317
- | -crt |
318
- | -ctr |
319
- | -rct |
320
- | -rtc |
321
- | -tcr |
322
- | -trc |
323
-
324
- Scenario Outline: Run with new command with options and with rspec argument
325
- When I run `howitzer new <option> test_automation`
326
- Then the output should contain exactly:
327
- """
328
- * New project directory creation ...
329
- Created './test_automation' folder
330
- * Config files generation ...
331
- Added 'config/boot.rb' file
332
- Added 'config/custom.yml' file
333
- Added 'config/capybara.rb' file
334
- Added 'config/default.yml' file
335
- Added 'config/drivers/appium.rb' file
336
- Added 'config/drivers/browserstack.rb' file
337
- Added 'config/drivers/crossbrowsertesting.rb' file
338
- Added 'config/drivers/headless_chrome.rb' file
339
- Added 'config/drivers/headless_firefox.rb' file
340
- Added 'config/drivers/poltergeist.rb' file
341
- Added 'config/drivers/sauce.rb' file
342
- Added 'config/drivers/selenium.rb' file
343
- Added 'config/drivers/selenium_grid.rb' file
344
- Added 'config/drivers/testingbot.rb' file
345
- Added 'config/drivers/webkit.rb' file
346
- * PageOriented pattern structure generation ...
347
- Added 'web/pages/example_page.rb' file
348
- Added 'web/sections/menu_section.rb' file
349
- * Base rake task generation ...
350
- Added 'tasks/common.rake' file
351
- * Email example generation ...
352
- Added '/emails/example_email.rb' file
353
- * Root files generation ...
354
- Added '.gitignore' file
355
- Added 'Rakefile' file
356
- Added template '.rubocop.yml.erb' with params '{:r=>true, :rspec=>true, :c=>false, :cucumber=>false, :t=>false, :turnip=>false}' to destination '.rubocop.yml'
357
- Added template 'Gemfile.erb' with params '{:r=>true, :rspec=>true, :c=>false, :cucumber=>false, :t=>false, :turnip=>false}' to destination 'Gemfile'
358
- * Pre-requisites integration to the framework ...
359
- Added 'prerequisites/factory_bot.rb' file
360
- Added 'prerequisites/factories/users.rb' file
361
- Added 'prerequisites/models/base.rb' file
362
- Added 'prerequisites/models/user.rb' file
363
- * RSpec integration to the framework ...
364
- Added 'spec/spec_helper.rb' file
365
- Added 'spec/example_spec.rb' file
366
- Added 'tasks/rspec.rake' file
367
-
368
- """
369
- Then a directory named "test_automation" should exist
370
- Then the following files should exist:
371
- | test_automation/config/boot.rb |
372
- | test_automation/config/custom.yml |
373
- | test_automation/config/capybara.rb |
374
- | test_automation/config/default.yml |
375
- | test_automation/emails/example_email.rb |
376
- | test_automation/web/sections/menu_section.rb |
377
- | test_automation/web/pages/example_page.rb |
378
- | test_automation/prerequisites/factory_bot.rb |
379
- | test_automation/prerequisites/factories/users.rb |
380
- | test_automation/prerequisites/models/base.rb |
381
- | test_automation/prerequisites/models/user.rb |
382
- | test_automation/spec/example_spec.rb |
383
- | test_automation/spec/spec_helper.rb |
384
- | test_automation/tasks/common.rake |
385
- | test_automation/tasks/rspec.rake |
386
- | test_automation/Gemfile |
387
- | test_automation/Rakefile |
388
- | test_automation/.gitignore |
389
- | test_automation/.rubocop.yml |
390
- And the exit status should be 0
391
- Examples:
392
- | option |
393
- | --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