howitzer 2.2.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +43 -1
  3. data/LICENSE +1 -1
  4. data/README.md +16 -17
  5. data/generators/base_generator.rb +4 -6
  6. data/generators/config/config_generator.rb +2 -4
  7. data/generators/config/templates/boot.rb +1 -1
  8. data/generators/config/templates/capybara.rb +3 -5
  9. data/generators/config/templates/default.yml +19 -20
  10. data/generators/config/templates/drivers/browserstack.rb +31 -4
  11. data/generators/config/templates/drivers/crossbrowsertesting.rb +9 -11
  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/lambdatest.rb +30 -0
  15. data/generators/config/templates/drivers/sauce.rb +30 -2
  16. data/generators/config/templates/drivers/selenium.rb +1 -1
  17. data/generators/config/templates/drivers/selenium_grid.rb +3 -3
  18. data/generators/config/templates/drivers/testingbot.rb +29 -2
  19. data/generators/cucumber/templates/env.rb +1 -1
  20. data/generators/cucumber/templates/hooks.rb +9 -3
  21. data/generators/cucumber/templates/transformers.rb +1 -1
  22. data/generators/prerequisites/templates/factory_bot.rb +1 -1
  23. data/generators/root/templates/Gemfile.erb +4 -14
  24. data/generators/rspec/templates/spec_helper.rb +5 -5
  25. data/generators/turnip/templates/spec_helper.rb +5 -5
  26. data/generators/web/templates/example_page.rb +1 -1
  27. data/lib/howitzer/cache.rb +1 -1
  28. data/lib/howitzer/capybara_helpers.rb +46 -9
  29. data/lib/howitzer/email.rb +2 -2
  30. data/lib/howitzer/exceptions.rb +21 -21
  31. data/lib/howitzer/gmail_api/client.rb +13 -4
  32. data/lib/howitzer/log.rb +6 -6
  33. data/lib/howitzer/mail_adapters/mailgun.rb +1 -1
  34. data/lib/howitzer/mail_adapters/mailtrap.rb +3 -3
  35. data/lib/howitzer/mail_adapters/onesecmail.rb +80 -0
  36. data/lib/howitzer/mail_adapters/testmail.rb +102 -0
  37. data/lib/howitzer/mailgun_api/client.rb +3 -2
  38. data/lib/howitzer/mailgun_api/response.rb +1 -2
  39. data/lib/howitzer/mailtrap_api/client.rb +19 -1
  40. data/lib/howitzer/meta/actions.rb +13 -16
  41. data/lib/howitzer/meta/element.rb +12 -10
  42. data/lib/howitzer/onesecmail_api/client.rb +44 -0
  43. data/lib/howitzer/onesecmail_api.rb +7 -0
  44. data/lib/howitzer/testmail_api/client.rb +44 -0
  45. data/lib/howitzer/testmail_api.rb +7 -0
  46. data/lib/howitzer/utils/string_extensions.rb +6 -2
  47. data/lib/howitzer/version.rb +1 -1
  48. data/lib/howitzer/web/base_section.rb +1 -1
  49. data/lib/howitzer/web/capybara_methods_proxy.rb +11 -5
  50. data/lib/howitzer/web/element_dsl.rb +104 -45
  51. data/lib/howitzer/web/iframe_dsl.rb +2 -2
  52. data/lib/howitzer/web/page.rb +4 -14
  53. data/lib/howitzer/web/page_dsl.rb +15 -6
  54. data/lib/howitzer/web/page_validator.rb +25 -26
  55. data/lib/howitzer/web/section.rb +5 -2
  56. data/lib/howitzer/web/section_dsl.rb +64 -30
  57. data/lib/howitzer.rb +2 -2
  58. metadata +29 -165
  59. data/.coveralls.yml +0 -1
  60. data/.gitignore +0 -14
  61. data/.rspec +0 -3
  62. data/.rubocop.yml +0 -60
  63. data/.ruby-gemset +0 -1
  64. data/.travis.yml +0 -8
  65. data/Gemfile +0 -14
  66. data/ISSUE_TEMPLATE.md +0 -16
  67. data/MAINTENANCE.md +0 -32
  68. data/Rakefile +0 -38
  69. data/features/cli_help.feature +0 -31
  70. data/features/cli_new.feature +0 -393
  71. data/features/cli_unknown.feature +0 -17
  72. data/features/cli_update.feature +0 -223
  73. data/features/cli_version.feature +0 -14
  74. data/features/step_definitions/common_steps.rb +0 -34
  75. data/features/support/env.rb +0 -1
  76. data/generators/config/templates/drivers/appium.rb +0 -25
  77. data/generators/config/templates/drivers/poltergeist.rb +0 -11
  78. data/generators/config/templates/drivers/webkit.rb +0 -6
  79. data/generators/root/templates/.gitignore +0 -21
  80. data/generators/root/templates/.rubocop.yml.erb +0 -56
  81. data/generators/turnip/templates/.rspec +0 -1
  82. data/howitzer.gemspec +0 -39
  83. data/lib/howitzer/mail_adapters/debugmail.rb +0 -0
  84. data/spec/config/custom.yml +0 -9
  85. data/spec/spec_helper.rb +0 -73
  86. data/spec/support/generator_helper.rb +0 -21
  87. data/spec/support/logger_helper.rb +0 -13
  88. data/spec/support/shared_examples/capybara_context_holder.rb +0 -33
  89. data/spec/support/shared_examples/capybara_methods_proxy.rb +0 -94
  90. data/spec/support/shared_examples/dynamic_section_methods.rb +0 -35
  91. data/spec/support/shared_examples/element_dsl.rb +0 -242
  92. data/spec/support/shared_examples/meta_highlight_xpath.rb +0 -41
  93. data/spec/unit/generators/base_generator_spec.rb +0 -283
  94. data/spec/unit/generators/config_generator_spec.rb +0 -61
  95. data/spec/unit/generators/cucumber_generator_spec.rb +0 -62
  96. data/spec/unit/generators/emails_generator_spec.rb +0 -35
  97. data/spec/unit/generators/prerequisites_generator_spec.rb +0 -53
  98. data/spec/unit/generators/root_generator_spec.rb +0 -86
  99. data/spec/unit/generators/rspec_generator_spec.rb +0 -36
  100. data/spec/unit/generators/tasks_generator_spec.rb +0 -31
  101. data/spec/unit/generators/templates/cucumber_spec.rb +0 -97
  102. data/spec/unit/generators/templates/rspec_spec.rb +0 -88
  103. data/spec/unit/generators/templates/turnip_spec.rb +0 -98
  104. data/spec/unit/generators/turnip_generator_spec.rb +0 -52
  105. data/spec/unit/generators/web_generator_spec.rb +0 -52
  106. data/spec/unit/lib/cache_spec.rb +0 -85
  107. data/spec/unit/lib/capybara_helpers_spec.rb +0 -730
  108. data/spec/unit/lib/email_spec.rb +0 -186
  109. data/spec/unit/lib/gmail_api/client_spec.rb +0 -26
  110. data/spec/unit/lib/howitzer_spec.rb +0 -92
  111. data/spec/unit/lib/init_spec.rb +0 -2
  112. data/spec/unit/lib/log_spec.rb +0 -122
  113. data/spec/unit/lib/mail_adapters/abstract_spec.rb +0 -62
  114. data/spec/unit/lib/mail_adapters/gmail_spec.rb +0 -128
  115. data/spec/unit/lib/mail_adapters/mailgun_spec.rb +0 -158
  116. data/spec/unit/lib/mail_adapters/mailtrap_spec.rb +0 -130
  117. data/spec/unit/lib/mailgun_api/client_spec.rb +0 -80
  118. data/spec/unit/lib/mailgun_api/connector_spec.rb +0 -54
  119. data/spec/unit/lib/mailgun_api/response_spec.rb +0 -28
  120. data/spec/unit/lib/mailtrap_api/client_spec.rb +0 -67
  121. data/spec/unit/lib/meta/element_spec.rb +0 -59
  122. data/spec/unit/lib/meta/entry_spec.rb +0 -77
  123. data/spec/unit/lib/meta/iframe_spec.rb +0 -66
  124. data/spec/unit/lib/meta/section_spec.rb +0 -43
  125. data/spec/unit/lib/utils/string_extensions_spec.rb +0 -77
  126. data/spec/unit/lib/web/base_section_spec.rb +0 -43
  127. data/spec/unit/lib/web/element_dsl_spec.rb +0 -31
  128. data/spec/unit/lib/web/iframe_dsl_spec.rb +0 -203
  129. data/spec/unit/lib/web/page_dsl_spec.rb +0 -74
  130. data/spec/unit/lib/web/page_spec.rb +0 -385
  131. data/spec/unit/lib/web/page_validator_spec.rb +0 -276
  132. data/spec/unit/lib/web/section_dsl_spec.rb +0 -165
  133. data/spec/unit/lib/web/section_spec.rb +0 -70
  134. data/spec/unit/version_spec.rb +0 -8
data/.rubocop.yml DELETED
@@ -1,60 +0,0 @@
1
- # See full list of defaults here: https://github.com/bbatsov/rubocop/blob/master/config/default.yml
2
- # To see all cops used see here: https://github.com/bbatsov/rubocop/blob/master/config/enabled.yml
3
-
4
- AllCops:
5
- TargetRubyVersion: 2.3
6
- DisplayCopNames: true
7
-
8
- Layout/CaseIndentation:
9
- Enabled: false
10
-
11
- Lint/AmbiguousBlockAssociation:
12
- Enabled: false
13
-
14
- Lint/AmbiguousRegexpLiteral:
15
- Enabled: false
16
-
17
- Metrics/BlockLength:
18
- Enabled: false
19
-
20
- Metrics/LineLength:
21
- Max: 120
22
-
23
- Metrics/MethodLength:
24
- Max: 30
25
-
26
- Metrics/ModuleLength:
27
- Max: 150
28
-
29
- Style/CaseEquality:
30
- Enabled: false
31
-
32
- Style/EmptyElse:
33
- Enabled: false
34
-
35
- Style/EvalWithLocation:
36
- Enabled: false
37
-
38
- Style/FormatStringToken:
39
- Enabled: false
40
-
41
- Style/FrozenStringLiteralComment:
42
- Enabled: false
43
-
44
- Style/MixinGrouping:
45
- EnforcedStyle: separated
46
- Exclude:
47
- - '**/*_steps.rb'
48
- - 'tmp/**'
49
-
50
- Style/MixinUsage:
51
- Enabled: false
52
-
53
- Style/RescueStandardError:
54
- Enabled: false
55
-
56
- Style/TrivialAccessors:
57
- AllowDSLWriters: true
58
-
59
- Style/YodaCondition:
60
- Enabled: false
data/.ruby-gemset DELETED
@@ -1 +0,0 @@
1
- howitzer
data/.travis.yml DELETED
@@ -1,8 +0,0 @@
1
- language: ruby
2
- before_install:
3
- - gem install bundler
4
- rvm:
5
- - 2.3.8
6
- - 2.4.9
7
- - 2.5.7
8
- - 2.6.5
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