howitzer 2.1.1 → 2.4.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.
- 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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: fe051b3bfe068d7fe68f999882f1aac432ee24dd558438e3e0b6f195c7123885
|
|
4
|
+
data.tar.gz: '09dca8df71b0ed83c4f0cf6f49679330628d92934f4e2e36bd861ddeb3ff2427'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5265ec269dba8e334e2c1223ac788c2a65b331f2374d9007ae78a3c0b5fc1aa79a9ce65ccfff713efeec3a7e6531cf42fc413eeb722c908f916b7fd5efc8f34d
|
|
7
|
+
data.tar.gz: 72948920c6c1cd9b437e766dc89bc205b12837c86e98a225ff05d853d17f16a4b833cbcc9febeeafd4b5ed3f60be915c0a67e779dd5d9967175c6b9e62cfc9f5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,52 @@
|
|
|
1
|
-
## [In git](https://github.com/strongqa/howitzer/compare/v2.
|
|
1
|
+
## [In git](https://github.com/strongqa/howitzer/compare/v2.3.0...master)
|
|
2
2
|
|
|
3
3
|
### New Features
|
|
4
4
|
|
|
5
5
|
### Bug-fixes
|
|
6
6
|
|
|
7
|
+
## [2.4.0](https://github.com/strongqa/howitzer/compare/v2.3.0...v2.4.0) (2022-07-22)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* LambdaTest support ([#305](https://github.com/strongqa/howitzer/issues/305)) ([eca5b8a](https://github.com/strongqa/howitzer/commit/eca5b8a6e4e30c4b9a7640ee999c061cd8e71e09))
|
|
13
|
+
* RegExp email subject matcher for Mailgun ([#304](https://github.com/strongqa/howitzer/issues/304)) ([598c9a2](https://github.com/strongqa/howitzer/commit/598c9a27b5dd8047c212ad050f86b78fa72d326d))
|
|
14
|
+
* Selenium 4 support ([#303](https://github.com/strongqa/howitzer/issues/303)) ([c5bf2d8](https://github.com/strongqa/howitzer/commit/c5bf2d8426e36f97b9fa109a783803c7b1bb538d))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Continuous Integration
|
|
18
|
+
|
|
19
|
+
* release-please integration ([#307](https://github.com/strongqa/howitzer/issues/307)) ([bd2f53e](https://github.com/strongqa/howitzer/commit/bd2f53e75c9ef283daadf8f9063d827c4f885a77))
|
|
20
|
+
|
|
21
|
+
## [v2.3.0](https://github.com/strongqa/howitzer/compare/v2.2.0...v2.3.0)
|
|
22
|
+
|
|
23
|
+
### New Features
|
|
24
|
+
- Support Ruby 3.0 (minimum version is 2.6.8)
|
|
25
|
+
- Unlock Activesupport 6.x
|
|
26
|
+
- Support latest versions of Cucumber
|
|
27
|
+
- Integrate rubocop-rspec linter
|
|
28
|
+
- Use latest version Rubocop
|
|
29
|
+
- Stop capybara-webkit support
|
|
30
|
+
- Stop poltergeist support
|
|
31
|
+
- Stop Apium driver support
|
|
32
|
+
- remove gmail gem from dependencies and add it only when it is really required
|
|
33
|
+
- Migrate to new Travis CI domain
|
|
34
|
+
- Replace abandoned Coveralls integration with Codecov [codecov.io](https://codecov.io/gh/strongqa/howitzer/)
|
|
35
|
+
|
|
36
|
+
## [v2.2.0](https://github.com/strongqa/howitzer/compare/v2.1.1...v2.2.0)
|
|
37
|
+
|
|
38
|
+
### New Features
|
|
39
|
+
- [#293](https://github.com/strongqa/howitzer/issues/293) add support ordering for run tests
|
|
40
|
+
- [#276](https://github.com/strongqa/howitzer/issues/276) Add support Capybara v3
|
|
41
|
+
- [#280](https://github.com/strongqa/howitzer/issues/280) Add support Firefox Headless
|
|
42
|
+
- [#241](https://github.com/strongqa/howitzer/issues/241) meta interface added. Allows tracking elements,sections, iframes on the page.
|
|
43
|
+
- [#266](https://github.com/strongqa/howitzer/issues/266) ruby 2.2 no longer supported
|
|
44
|
+
- [#265](https://github.com/strongqa/howitzer/issues/265) Add Appium driver
|
|
45
|
+
### Bug-fixes
|
|
46
|
+
- [#286](https://github.com/strongqa/howitzer/issues/286) [Installation] generated rubocop.yml doesn't cover ruby sources
|
|
47
|
+
- [#274](https://github.com/strongqa/howitzer/issues/274) Stopped PhantomJS supporting
|
|
48
|
+
- [#282](https://github.com/strongqa/howitzer/issues/282) Multiple sessions don't work properly
|
|
49
|
+
|
|
7
50
|
## [v2.1.1](https://github.com/strongqa/howitzer/compare/v2.1.0...v2.1.1)
|
|
8
51
|
|
|
9
52
|
### New Features
|
data/LICENSE
CHANGED
data/README.md
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
<p align="center" style="overflow: hidden;">
|
|
2
|
-
<a href="
|
|
2
|
+
<a href="https://howitzer-framework.io">
|
|
3
3
|
<img src="https://raw.githubusercontent.com/strongqa/howitzer/gh-pages/images/howitzer-logo.png" alt="Howitzer" />
|
|
4
4
|
</a>
|
|
5
5
|
<br/>
|
|
6
6
|
|
|
7
|
-
<p align="center"><b>Ruby-based framework for acceptance testing of web applications.</b></p>
|
|
7
|
+
<p align="center"><b>A Ruby-based framework for acceptance testing of web applications.</b></p>
|
|
8
8
|
|
|
9
9
|
<p align="center">The framework was built with modern patterns, techniques, and tools in automated testing in order to speed up tests development and simplify supporting.</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="https://gitter.im/strongqa/howitzer"><img src="https://badges.gitter.im/Join%20Chat.svg" /></a>
|
|
13
|
-
<a href="https://rubygems.org/gems/howitzer"><img src="
|
|
14
|
-
<a href="https://travis-ci.
|
|
15
|
-
<a href='https://gemnasium.com/strongqa/howitzer'><img src="https://gemnasium.com/strongqa/howitzer.svg" /></a>
|
|
13
|
+
<a href="https://rubygems.org/gems/howitzer"><img src="https://img.shields.io/gem/v/howitzer.svg" /></a>
|
|
14
|
+
<a href="https://app.travis-ci.com/github/strongqa/howitzer"><img src="https://app.travis-ci.com/strongqa/howitzer.svg?branch=master" /></a>
|
|
16
15
|
<a href="https://codeclimate.com/github/strongqa/howitzer"><img src="https://codeclimate.com/github/strongqa/howitzer.png" /></a>
|
|
17
|
-
<a href=
|
|
18
|
-
|
|
16
|
+
<a href="https://codecov.io/gh/strongqa/howitzer">
|
|
17
|
+
<img src="https://codecov.io/gh/strongqa/howitzer/branch/master/graph/badge.svg?token=vB8DYQtmjA"/>
|
|
18
|
+
</a>
|
|
19
|
+
<a href="https://github.com/strongqa/howitzer/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" /></a>
|
|
19
20
|
</p>
|
|
20
21
|
|
|
21
22
|
</p>
|
|
@@ -25,13 +26,13 @@
|
|
|
25
26
|
- Fast installation and configuration of the complete testing infrastructure (takes less than 5 minutes).
|
|
26
27
|
- Elegant, intuitive and powerful Ruby language underneath.
|
|
27
28
|
- Possibility to choose your favorite BDD tool (Cucumber, RSpec or Turnip).
|
|
28
|
-
- Integration with SauceLabs, Testingbot, BrowserStack, CrossBrowserTesting cloud services.
|
|
29
|
+
- Integration with SauceLabs, Testingbot, BrowserStack, CrossBrowserTesting, LambdaTest cloud services.
|
|
29
30
|
- Integration with MailGun, Gmail, Mailtrap email services.
|
|
30
31
|
- Easy tests support based on the best patterns, techniques, principles.
|
|
31
32
|
- Ability to execute tests against to both browserless driver and actual browsers with no changes in your tests.
|
|
32
33
|
|
|
33
34
|
## Documentation
|
|
34
|
-
Refer to the [GETTING STARTED](
|
|
35
|
+
Refer to the [GETTING STARTED](https://docs.howitzer-framework.io) document to start working with *Howitzer*.
|
|
35
36
|
|
|
36
37
|
You can also find the Rdoc documentation on [Rubygems](https://rubygems.org/gems/howitzer).
|
|
37
38
|
|
|
@@ -42,14 +43,13 @@ You can also find the Rdoc documentation on [Rubygems](https://rubygems.org/gems
|
|
|
42
43
|
|
|
43
44
|
## Requirements
|
|
44
45
|
* Supported OS: Mac OS X, Linux, Windows
|
|
45
|
-
* [Ruby](https://www.ruby-lang.org/en/downloads/) 2.
|
|
46
|
+
* [Ruby](https://www.ruby-lang.org/en/downloads/) 2.6.8+
|
|
46
47
|
* [DevKit](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit#installation-instructions) (For **Windows** only)
|
|
47
|
-
* [PhantomJS](http://phantomjs.org/download.html) (For **phantomjs** and **poltergeist** drivers only)
|
|
48
48
|
* [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/) (For **chrome** selenium browser, 2.29+ for headless mode)
|
|
49
49
|
* [GeckoDriver](https://github.com/mozilla/geckodriver/releases) (For **firefox** selenium browser)
|
|
50
50
|
* [SafariDriver](https://webkit.org/blog/6900/webdriver-support-in-safari-10/) (For **safari** selenium browser)
|
|
51
|
-
* [QT](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit) (For **webkit** driver only)
|
|
52
51
|
* [Chrome](https://www.google.com/chrome/browser/desktop/index.html) v.59+ (For **headless chrome** support)
|
|
52
|
+
* [Firefox](https://www.mozilla.org/en-US/firefox/new/) v.56+ (For **headless firefox** support)
|
|
53
53
|
## Setup
|
|
54
54
|
To install, type
|
|
55
55
|
|
|
@@ -66,7 +66,7 @@ To generate the project with [Cucumber](https://cucumber.io/), type:
|
|
|
66
66
|
howitzer new <PROJECT NAME> --cucumber
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
With [Rspec](
|
|
69
|
+
With [Rspec](https://rspec.info/):
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
72
|
howitzer new <PROJECT NAME> --rspec
|
|
@@ -134,6 +134,8 @@ Don't forget to review the difference, to see if there were any unexpected chang
|
|
|
134
134
|
Contributing
|
|
135
135
|
------------
|
|
136
136
|
|
|
137
|
+
[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/0)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/1)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/2)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/3)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/4)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/5)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/6)[](https://sourcerer.io/fame/romikoops/strongqa/howitzer/links/7)
|
|
138
|
+
|
|
137
139
|
Please see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
138
140
|
|
|
139
141
|
howitzer was originally designed by Roman Parashchenko and is now maintained by StrongQA team. You can find list of contributors here [open source
|
|
@@ -142,7 +144,7 @@ community](https://github.com/strongqa/howitzer/graphs/contributors).
|
|
|
142
144
|
License
|
|
143
145
|
-------
|
|
144
146
|
|
|
145
|
-
howitzer is Copyright © 2012-
|
|
147
|
+
howitzer is Copyright © 2012-2021 Roman Parashchenko and StrongQA LLC. It is free
|
|
146
148
|
software, and may be redistributed under the terms specified in the
|
|
147
149
|
[LICENSE](LICENSE) file.
|
|
148
150
|
|
|
@@ -151,11 +153,11 @@ About StrongQA
|
|
|
151
153
|
|
|
152
154
|

|
|
153
155
|
|
|
154
|
-
howitzer is maintained and funded by StrongQA,
|
|
155
|
-
The names and logos for StrongQA are trademarks of StrongQA,
|
|
156
|
+
howitzer is maintained and funded by StrongQA, LLC.
|
|
157
|
+
The names and logos for StrongQA are trademarks of StrongQA, LLC.
|
|
156
158
|
|
|
157
159
|
We love open source software!
|
|
158
160
|
See [our other projects][testing_solutions] or [hire us][hire] to consult and develop testing solutions.
|
|
159
161
|
|
|
160
|
-
[testing_solutions]:
|
|
162
|
+
[testing_solutions]: https://strongqa.com/services/testing-solutions?utm_source=github
|
|
161
163
|
[hire]: https://strongqa.com?utm_source=github
|
|
@@ -89,8 +89,8 @@ module Howitzer
|
|
|
89
89
|
copy_templates_file_exist(data, destination_path, source_path)
|
|
90
90
|
else
|
|
91
91
|
write_template(destination_path, source_path)
|
|
92
|
-
puts_info "#{ColorizedString.new('Added').light_green} template '#{data[:source]}' with"\
|
|
93
|
-
"
|
|
92
|
+
puts_info "#{ColorizedString.new('Added').light_green} template '#{data[:source]}' with " \
|
|
93
|
+
"params '#{@options}' to destination '#{data[:destination]}'"
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
96
|
end
|
|
@@ -118,10 +118,8 @@ module Howitzer
|
|
|
118
118
|
end
|
|
119
119
|
|
|
120
120
|
def write_template(dest_path, source_path)
|
|
121
|
-
File.
|
|
122
|
-
|
|
123
|
-
.result(OpenStruct.new(@options).instance_eval { binding }))
|
|
124
|
-
end
|
|
121
|
+
File.write(dest_path, ERB.new(File.read(source_path), trim_mode: '-')
|
|
122
|
+
.result(OpenStruct.new(@options).instance_eval { binding })) # rubocop:disable Style/OpenStructUse
|
|
125
123
|
end
|
|
126
124
|
|
|
127
125
|
private
|
|
@@ -170,7 +168,7 @@ module Howitzer
|
|
|
170
168
|
when 'y'
|
|
171
169
|
FileUtils.cp(source, destination)
|
|
172
170
|
puts_info(" #{ColorizedString.new('Forced').light_green} '#{data[:destination]}' file")
|
|
173
|
-
when 'n'
|
|
171
|
+
when 'n'
|
|
174
172
|
puts_info(" #{ColorizedString.new('Skipped').light_black} '#{data[:destination]}' file")
|
|
175
173
|
else nil
|
|
176
174
|
end
|
|
@@ -12,13 +12,12 @@ module Howitzer
|
|
|
12
12
|
{ source: 'drivers/browserstack.rb', destination: 'config/drivers/browserstack.rb' },
|
|
13
13
|
{ source: 'drivers/crossbrowsertesting.rb', destination: 'config/drivers/crossbrowsertesting.rb' },
|
|
14
14
|
{ source: 'drivers/headless_chrome.rb', destination: 'config/drivers/headless_chrome.rb' },
|
|
15
|
-
{ source: 'drivers/
|
|
16
|
-
{ source: 'drivers/
|
|
15
|
+
{ source: 'drivers/headless_firefox.rb', destination: 'config/drivers/headless_firefox.rb' },
|
|
16
|
+
{ source: 'drivers/lambdatest.rb', destination: 'config/drivers/lambdatest.rb' },
|
|
17
17
|
{ source: 'drivers/sauce.rb', destination: 'config/drivers/sauce.rb' },
|
|
18
18
|
{ source: 'drivers/selenium.rb', destination: 'config/drivers/selenium.rb' },
|
|
19
19
|
{ source: 'drivers/selenium_grid.rb', destination: 'config/drivers/selenium_grid.rb' },
|
|
20
|
-
{ source: 'drivers/testingbot.rb', destination: 'config/drivers/testingbot.rb' }
|
|
21
|
-
{ source: 'drivers/webkit.rb', destination: 'config/drivers/webkit.rb' }
|
|
20
|
+
{ source: 'drivers/testingbot.rb', destination: 'config/drivers/testingbot.rb' }
|
|
22
21
|
] }
|
|
23
22
|
end
|
|
24
23
|
|
|
@@ -3,7 +3,7 @@ require 'bundler/setup'
|
|
|
3
3
|
|
|
4
4
|
Bundler.require(:default)
|
|
5
5
|
|
|
6
|
-
Dir[
|
|
6
|
+
Dir[ # rubocop:disable Lint/NonDeterministicRequireOrder
|
|
7
7
|
'./emails/**/*.rb',
|
|
8
8
|
'./web/sections/**/*.rb',
|
|
9
9
|
'./web/pages/**/*.rb',
|
|
@@ -11,4 +11,4 @@ Dir[
|
|
|
11
11
|
'./prerequisites/factory_bot.rb'
|
|
12
12
|
].each { |f| require f }
|
|
13
13
|
|
|
14
|
-
String.
|
|
14
|
+
String.include Howitzer::Utils::StringExtensions
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
HOWITZER_KNOWN_DRIVERS = %i[
|
|
2
2
|
selenium
|
|
3
3
|
selenium_grid
|
|
4
|
-
webkit
|
|
5
|
-
poltergeist
|
|
6
|
-
phantomjs
|
|
7
4
|
sauce
|
|
8
5
|
testingbot
|
|
9
6
|
browserstack
|
|
10
7
|
crossbrowsertesting
|
|
8
|
+
lambdatest
|
|
11
9
|
headless_chrome
|
|
10
|
+
headless_firefox
|
|
12
11
|
].freeze
|
|
13
12
|
|
|
14
13
|
unless HOWITZER_KNOWN_DRIVERS.include?(Howitzer.driver.to_s.to_sym)
|
|
15
|
-
raise Howitzer::UnknownDriverError, "Unknown '#{Howitzer.driver}' driver." \
|
|
16
|
-
|
|
14
|
+
raise Howitzer::UnknownDriverError, "Unknown '#{Howitzer.driver}' driver. " \
|
|
15
|
+
"Check your settings, it should be one of #{HOWITZER_KNOWN_DRIVERS}"
|
|
17
16
|
end
|
|
18
17
|
|
|
19
18
|
Capybara.configure do |config|
|
|
@@ -21,26 +21,31 @@
|
|
|
21
21
|
page_load_idle_timeout: 20
|
|
22
22
|
maximized_window: true # Specify maximized browser window size
|
|
23
23
|
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
|
|
24
|
+
# Run scenarios in the order they were 'defined' (default).
|
|
25
|
+
# 'random' - shuffle scenarios before running.
|
|
26
|
+
# Specify SEED to reproduce the shuffling from a previous run. e.g. 'random:5738'
|
|
27
|
+
test_order: defined
|
|
28
|
+
|
|
29
|
+
# Specify one of the following drivers: selenium, selenium_grid, sauce,
|
|
30
|
+
# testingbot, browserstack, crossbrowsertesting, lambdatest, headless_chrome,
|
|
31
|
+
# headless_firefox
|
|
32
|
+
driver: headless_chrome
|
|
27
33
|
|
|
28
34
|
# -Selenium-
|
|
29
35
|
# specify one of next browsers: iexplore (ie), firefox (ff), chrome, safari
|
|
30
36
|
selenium_browser: ff
|
|
31
37
|
|
|
32
38
|
# -Headless Chrome-
|
|
33
|
-
# List of available flags (
|
|
39
|
+
# List of available flags (https://peter.sh/experiments/chromium-command-line-switches/)
|
|
34
40
|
headless_chrome_flags: "window-size=1920x1080, disable-gpu"
|
|
35
41
|
|
|
42
|
+
# -Headless Firefox-
|
|
43
|
+
# For use custom screen size "maximized_window" should be false
|
|
44
|
+
headless_firefox_flags: "-height=1920, -width=1080"
|
|
45
|
+
|
|
36
46
|
# -Selenium Grid-
|
|
37
47
|
selenium_hub_url: "http://example.com:4444/wd/hub"
|
|
38
48
|
|
|
39
|
-
# -PhantomJS/Poltergeist-
|
|
40
|
-
# specify settings for poltergeist
|
|
41
|
-
phantom_ignore_js_errors: false
|
|
42
|
-
phantom_ignore_ssl_errors: true
|
|
43
|
-
|
|
44
49
|
rspec_wait_timeout: 10
|
|
45
50
|
|
|
46
51
|
###########################################################
|
|
@@ -50,7 +55,7 @@
|
|
|
50
55
|
cloud_auth_pass: api_key_or_api_secret_or_access_key
|
|
51
56
|
cloud_platform: any
|
|
52
57
|
cloud_browser_name: Chrome
|
|
53
|
-
cloud_browser_version: '
|
|
58
|
+
cloud_browser_version: 'latest'
|
|
54
59
|
cloud_max_duration: '1800'
|
|
55
60
|
cloud_http_idle_timeout: 40
|
|
56
61
|
|
|
@@ -77,6 +82,11 @@
|
|
|
77
82
|
cloud_cbt_record_video: 'true'
|
|
78
83
|
cloud_cbt_record_network: 'true'
|
|
79
84
|
|
|
85
|
+
# -LambdaTest (https://www.lambdatest.com/support/docs/selenium-automation-capabilities)
|
|
86
|
+
cloud_lambdatest_resolution: '1024x768'
|
|
87
|
+
cloud_lambdatest_project: 'Howitzer Example'
|
|
88
|
+
cloud_lambdatest_build: 'v1'
|
|
89
|
+
|
|
80
90
|
###########################################################
|
|
81
91
|
# CAPYBARA SETTINGS #
|
|
82
92
|
###########################################################
|
|
@@ -99,7 +109,7 @@
|
|
|
99
109
|
mail_wait_time: 60
|
|
100
110
|
mail_sleep_time: 3
|
|
101
111
|
|
|
102
|
-
# -Mailgun- (
|
|
112
|
+
# -Mailgun- (https://mailgun.com/)
|
|
103
113
|
mailgun_key: mailgun_account_private_key
|
|
104
114
|
mailgun_domain: mailgun_domain_with_stored_method
|
|
105
115
|
|
|
@@ -1,10 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
def w3c_selenium_browserstack_caps # rubocop:disable Metrics/AbcSize
|
|
2
|
+
caps = CapybaraHelpers.required_w3c_cloud_caps
|
|
3
|
+
bstack_options = {
|
|
4
|
+
sessionName: "#{(Howitzer.current_rake_task || 'ALL').upcase} #{Howitzer.cloud_browser_name}",
|
|
5
|
+
projectName: Howitzer.cloud_bstack_project,
|
|
6
|
+
buildName: Howitzer.cloud_bstack_build
|
|
7
|
+
}
|
|
8
|
+
bstack_options['resolution'] = Howitzer.cloud_bstack_resolution if Howitzer.cloud_bstack_resolution.present?
|
|
9
|
+
bstack_options['os'] = Howitzer.cloud_bstack_os if Howitzer.cloud_bstack_os.present?
|
|
10
|
+
caps['bstack:options'] = bstack_options
|
|
11
|
+
if Howitzer.user_agent.present?
|
|
12
|
+
if CapybaraHelpers.chrome_browser?
|
|
13
|
+
caps['goog:chromeOptions'] = { 'args' => ["--user-agent=#{Howitzer.user_agent}"] }
|
|
14
|
+
elsif CapybaraHelpers.ff_browser?
|
|
15
|
+
profile = Selenium::WebDriver::Firefox::Profile.new
|
|
16
|
+
profile['general.useragent.override'] = Howitzer.user_agent
|
|
17
|
+
caps['moz:firefoxOptions'] = { profile: profile.as_json['zip'] }
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
caps
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def classic_selenium_browserstack_caps # rubocop:disable Metrics/AbcSize
|
|
2
24
|
caps = CapybaraHelpers.required_cloud_caps.merge(
|
|
3
25
|
project: Howitzer.cloud_bstack_project,
|
|
4
26
|
build: Howitzer.cloud_bstack_build
|
|
5
27
|
)
|
|
6
|
-
caps[
|
|
7
|
-
caps[
|
|
28
|
+
caps['resolution'] = Howitzer.cloud_bstack_resolution if Howitzer.cloud_bstack_resolution.present?
|
|
29
|
+
caps['os'] = Howitzer.cloud_bstack_os if Howitzer.cloud_bstack_os.present?
|
|
8
30
|
if Howitzer.user_agent.present?
|
|
9
31
|
if CapybaraHelpers.chrome_browser?
|
|
10
32
|
caps['chromeOptions'] = { 'args' => ["--user-agent=#{Howitzer.user_agent}"] }
|
|
@@ -14,7 +36,12 @@ Capybara.register_driver :browserstack do |app|
|
|
|
14
36
|
caps[:firefox_profile] = profile
|
|
15
37
|
end
|
|
16
38
|
end
|
|
17
|
-
|
|
39
|
+
caps
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
Capybara.register_driver :browserstack do |app|
|
|
43
|
+
url = "https://#{Howitzer.cloud_auth_login}:#{Howitzer.cloud_auth_pass}@hub.browserstack.com/wd/hub"
|
|
44
|
+
caps = CapybaraHelpers.w3c_selenium? ? w3c_selenium_browserstack_caps : classic_selenium_browserstack_caps
|
|
18
45
|
CapybaraHelpers.cloud_driver(app, caps, url)
|
|
19
46
|
end
|
|
20
47
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# :crossbrowsertesting driver
|
|
2
2
|
|
|
3
3
|
Capybara.register_driver :crossbrowsertesting do |app|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
caps
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
url = "https://#{CGI.escape(Howitzer.cloud_auth_login)}:#{Howitzer.cloud_auth_pass}" \
|
|
5
|
+
'@hub.crossbrowsertesting.com/wd/hub'
|
|
6
|
+
caps = CapybaraHelpers.required_cloud_caps.merge(
|
|
7
|
+
build: Howitzer.cloud_cbt_build,
|
|
8
|
+
screenResolution: Howitzer.cloud_cbt_screen_resolution,
|
|
9
|
+
record_video: Howitzer.cloud_cbt_record_video,
|
|
10
|
+
record_network: Howitzer.cloud_cbt_record_network,
|
|
11
|
+
max_duration: Howitzer.cloud_max_duration
|
|
12
|
+
)
|
|
13
13
|
if Howitzer.user_agent.present?
|
|
14
14
|
if CapybaraHelpers.chrome_browser?
|
|
15
15
|
caps['chromeOptions'] = { 'args' => ["--user-agent=#{Howitzer.user_agent}"] }
|
|
@@ -19,8 +19,6 @@ Capybara.register_driver :crossbrowsertesting do |app|
|
|
|
19
19
|
caps[:firefox_profile] = profile
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
|
-
url = "http://#{CGI.escape(Howitzer.cloud_auth_login)}:#{Howitzer.cloud_auth_pass}"\
|
|
23
|
-
'@hub.crossbrowsertesting.com/wd/hub'
|
|
24
22
|
CapybaraHelpers.cloud_driver(app, caps, url)
|
|
25
23
|
end
|
|
26
24
|
|
|
@@ -7,7 +7,7 @@ Capybara.register_driver :headless_chrome do |app|
|
|
|
7
7
|
startup_flags.concat(Howitzer.headless_chrome_flags.split(/\s*,\s*/)) if Howitzer.headless_chrome_flags
|
|
8
8
|
options = Selenium::WebDriver::Chrome::Options.new(args: startup_flags)
|
|
9
9
|
params = { browser: :chrome, options: options }
|
|
10
|
-
Capybara::Selenium::Driver.new app, params
|
|
10
|
+
Capybara::Selenium::Driver.new app, **params
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
Capybara::Screenshot.class_eval do
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# :headless_firefox driver
|
|
2
|
+
|
|
3
|
+
Capybara.register_driver :headless_firefox do |app|
|
|
4
|
+
startup_flags = ['--headless']
|
|
5
|
+
startup_flags.concat(Howitzer.headless_firefox_flags.split(/\s*,\s*/)) if Howitzer.headless_firefox_flags
|
|
6
|
+
ff_profile = Selenium::WebDriver::Firefox::Profile.new.tap do |profile|
|
|
7
|
+
profile['network.http.phishy-userpass-length'] = 255
|
|
8
|
+
profile['browser.safebrowsing.malware.enabled'] = false
|
|
9
|
+
profile['network.automatic-ntlm-auth.allow-non-fqdn'] = true
|
|
10
|
+
profile['network.ntlm.send-lm-response'] = true
|
|
11
|
+
profile['network.automatic-ntlm-auth.trusted-uris'] = Howitzer.app_host
|
|
12
|
+
profile['general.useragent.override'] = Howitzer.user_agent if Howitzer.user_agent.present?
|
|
13
|
+
end
|
|
14
|
+
options = Selenium::WebDriver::Firefox::Options.new(args: startup_flags, profile: ff_profile)
|
|
15
|
+
params = { browser: :firefox, options: options }
|
|
16
|
+
Capybara::Selenium::Driver.new app, **params
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
Capybara.javascript_driver = :headless_firefox
|
|
20
|
+
|
|
21
|
+
Capybara::Screenshot.class_eval do
|
|
22
|
+
register_driver :headless_firefox, ®istered_drivers[:selenium]
|
|
23
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
def w3c_selenium_lambdatest_caps
|
|
2
|
+
caps = CapybaraHelpers.required_w3c_cloud_caps
|
|
3
|
+
lt_options = {
|
|
4
|
+
name: "#{(Howitzer.current_rake_task || 'ALL').upcase} #{Howitzer.cloud_browser_name}",
|
|
5
|
+
build: Howitzer.cloud_lambdatest_build
|
|
6
|
+
}
|
|
7
|
+
lt_options[:platformName] = Howitzer.cloud_platform unless Howitzer.cloud_platform.casecmp?('any')
|
|
8
|
+
lt_options[:resolution] = Howitzer.cloud_lambdatest_resolution if Howitzer.cloud_lambdatest_resolution.present?
|
|
9
|
+
caps['LT:Options'] = lt_options
|
|
10
|
+
caps
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def classic_selenium_lambdatest_caps
|
|
14
|
+
caps = CapybaraHelpers.required_cloud_caps.merge(
|
|
15
|
+
build: Howitzer.cloud_lambdatest_build,
|
|
16
|
+
acceptSslCerts: true
|
|
17
|
+
)
|
|
18
|
+
caps[:resolution] = Howitzer.cloud_lambdatest_resolution if Howitzer.cloud_lambdatest_resolution.present?
|
|
19
|
+
caps
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
Capybara.register_driver :lambdatest do |app|
|
|
23
|
+
url = "https://#{Howitzer.cloud_auth_login}:#{Howitzer.cloud_auth_pass}@hub.lambdatest.com/wd/hub"
|
|
24
|
+
caps = CapybaraHelpers.w3c_selenium? ? w3c_selenium_lambdatest_caps : classic_selenium_lambdatest_caps
|
|
25
|
+
CapybaraHelpers.cloud_driver(app, caps, url)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
Capybara::Screenshot.class_eval do
|
|
29
|
+
register_driver :lambdatest, ®istered_drivers[:selenium]
|
|
30
|
+
end
|
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
# :sauce driver
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
def w3c_selenium_browserstack_caps # rubocop:disable Metrics/AbcSize
|
|
4
|
+
caps = CapybaraHelpers.required_w3c_cloud_caps
|
|
5
|
+
caps['platform'] = Howitzer.cloud_platform unless Howitzer.cloud_platform.casecmp?('any')
|
|
6
|
+
sauce_options = {
|
|
7
|
+
name: "#{(Howitzer.current_rake_task || 'ALL').upcase} #{Howitzer.cloud_browser_name}",
|
|
8
|
+
maxDuration: Howitzer.cloud_max_duration,
|
|
9
|
+
idleTimeout: Howitzer.cloud_sauce_idle_timeout,
|
|
10
|
+
recordScreenshots: Howitzer.cloud_sauce_record_screenshots,
|
|
11
|
+
videoUploadOnPass: Howitzer.cloud_sauce_video_upload_on_pass
|
|
12
|
+
}
|
|
13
|
+
caps['sauce:options'] = sauce_options
|
|
14
|
+
if Howitzer.user_agent.present?
|
|
15
|
+
if CapybaraHelpers.chrome_browser?
|
|
16
|
+
caps['goog:chromeOptions'] = { 'args' => ["--user-agent=#{Howitzer.user_agent}"] }
|
|
17
|
+
elsif CapybaraHelpers.ff_browser?
|
|
18
|
+
profile = Selenium::WebDriver::Firefox::Profile.new
|
|
19
|
+
profile['general.useragent.override'] = Howitzer.user_agent
|
|
20
|
+
caps['moz:firefoxOptions'] = { profile: profile.as_json['zip'] }
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
caps
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def classic_selenium_browserstack_caps # rubocop:disable Metrics/AbcSize
|
|
4
27
|
caps = CapybaraHelpers.required_cloud_caps.merge(
|
|
5
28
|
maxDuration: Howitzer.cloud_max_duration,
|
|
6
29
|
idleTimeout: Howitzer.cloud_sauce_idle_timeout,
|
|
@@ -16,7 +39,12 @@ Capybara.register_driver :sauce do |app|
|
|
|
16
39
|
caps[:firefox_profile] = profile
|
|
17
40
|
end
|
|
18
41
|
end
|
|
19
|
-
|
|
42
|
+
caps
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
Capybara.register_driver :sauce do |app|
|
|
46
|
+
url = "https://#{Howitzer.cloud_auth_login}:#{Howitzer.cloud_auth_pass}@ondemand.saucelabs.com/wd/hub"
|
|
47
|
+
caps = CapybaraHelpers.w3c_selenium? ? w3c_selenium_browserstack_caps : classic_selenium_browserstack_caps
|
|
20
48
|
CapybaraHelpers.cloud_driver(app, caps, url)
|
|
21
49
|
end
|
|
22
50
|
|
|
@@ -20,5 +20,5 @@ Capybara.register_driver :selenium do |app|
|
|
|
20
20
|
args << "user-agent=#{Howitzer.user_agent}" if Howitzer.user_agent.present?
|
|
21
21
|
params[:options] = Selenium::WebDriver::Chrome::Options.new(args: args)
|
|
22
22
|
end
|
|
23
|
-
Capybara::Selenium::Driver.new app, params
|
|
23
|
+
Capybara::Selenium::Driver.new app, **params
|
|
24
24
|
end
|
|
@@ -10,9 +10,9 @@ Capybara.register_driver :selenium_grid do |app|
|
|
|
10
10
|
elsif CapybaraHelpers.safari_browser?
|
|
11
11
|
Selenium::WebDriver::Remote::Capabilities.safari
|
|
12
12
|
else
|
|
13
|
-
raise Howitzer::UnknownBrowserError, "Unknown '#{Howitzer.selenium_browser}' selenium_browser." \
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
raise Howitzer::UnknownBrowserError, "Unknown '#{Howitzer.selenium_browser}' selenium_browser. " \
|
|
14
|
+
'Check your settings, it should be one of ' \
|
|
15
|
+
'[:ie, :iexplore, :ff, :firefox, :chrome, :safari]'
|
|
16
16
|
end
|
|
17
17
|
if Howitzer.user_agent.present?
|
|
18
18
|
if CapybaraHelpers.chrome_browser?
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
# :testingbot driver
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
def w3c_selenium_browserstack_caps # rubocop:disable Metrics/AbcSize
|
|
4
|
+
caps = CapybaraHelpers.required_w3c_cloud_caps
|
|
5
|
+
caps[:platformName] = Howitzer.cloud_platform unless Howitzer.cloud_platform.casecmp?('any')
|
|
6
|
+
tb_options = {
|
|
7
|
+
name: "#{(Howitzer.current_rake_task || 'ALL').upcase} #{Howitzer.cloud_browser_name}",
|
|
8
|
+
maxduration: Howitzer.cloud_max_duration,
|
|
9
|
+
idletimeout: Howitzer.cloud_testingbot_idle_timeout,
|
|
10
|
+
screenshot: Howitzer.cloud_testingbot_screenshots
|
|
11
|
+
}
|
|
12
|
+
caps['tb:options'] = tb_options
|
|
13
|
+
if Howitzer.user_agent.present?
|
|
14
|
+
if CapybaraHelpers.chrome_browser?
|
|
15
|
+
caps['goog:chromeOptions'] = { 'args' => ["--user-agent=#{Howitzer.user_agent}"] }
|
|
16
|
+
elsif CapybaraHelpers.ff_browser?
|
|
17
|
+
profile = Selenium::WebDriver::Firefox::Profile.new
|
|
18
|
+
profile['general.useragent.override'] = Howitzer.user_agent
|
|
19
|
+
caps['moz:firefoxOptions'] = { profile: profile.as_json['zip'] }
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
caps
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def classic_selenium_browserstack_caps
|
|
4
26
|
caps = CapybaraHelpers.required_cloud_caps.merge(
|
|
5
27
|
maxduration: Howitzer.cloud_max_duration,
|
|
6
28
|
idletimeout: Howitzer.cloud_testingbot_idle_timeout,
|
|
@@ -15,7 +37,12 @@ Capybara.register_driver :testingbot do |app|
|
|
|
15
37
|
caps[:firefox_profile] = profile
|
|
16
38
|
end
|
|
17
39
|
end
|
|
18
|
-
|
|
40
|
+
caps
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
Capybara.register_driver :testingbot do |app|
|
|
44
|
+
url = "https://#{Howitzer.cloud_auth_login}:#{Howitzer.cloud_auth_pass}@hub.testingbot.com/wd/hub"
|
|
45
|
+
caps = CapybaraHelpers.w3c_selenium? ? w3c_selenium_browserstack_caps : classic_selenium_browserstack_caps
|
|
19
46
|
CapybaraHelpers.cloud_driver(app, caps, url)
|
|
20
47
|
end
|
|
21
48
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
require 'cuke_sniffer'
|
|
2
2
|
|
|
3
3
|
def path_to_features
|
|
4
|
-
@
|
|
4
|
+
@path_to_features ||= File.expand_path(File.join(__dir__, '..', 'features'))
|
|
5
5
|
end
|
|
6
6
|
|
|
7
7
|
def cuke_sniffer
|
|
8
|
-
@
|
|
8
|
+
@cuke_sniffer ||= CukeSniffer::CLI.new(
|
|
9
9
|
features_location: path_to_features,
|
|
10
10
|
step_definitions_location: File.join(path_to_features, 'step_definitions'),
|
|
11
11
|
hooks_location: File.join(path_to_features, 'support'),
|
|
@@ -10,6 +10,14 @@ RSpec.configure do |config|
|
|
|
10
10
|
config.disable_monkey_patching!
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
AfterConfiguration do |config|
|
|
14
|
+
if Howitzer.test_order.present?
|
|
15
|
+
order, seed = Howitzer.test_order.split(':')
|
|
16
|
+
config.instance_variable_get(:@options)[:order] = order
|
|
17
|
+
config.instance_variable_get(:@options)[:seed] ||= seed
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
13
21
|
FileUtils.mkdir_p(Howitzer.log_dir)
|
|
14
22
|
|
|
15
23
|
Howitzer::Log.settings_as_formatted_text
|