howitzer 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +27 -18
- data/.travis.yml +4 -3
- data/CHANGELOG.md +15 -1
- data/README.md +6 -3
- data/Rakefile +1 -1
- data/features/cli_new.feature +12 -8
- data/features/cli_update.feature +14 -9
- data/features/step_definitions/common_steps.rb +3 -3
- data/generators/base_generator.rb +1 -1
- data/generators/config/config_generator.rb +2 -1
- data/generators/config/templates/boot.rb +1 -1
- data/generators/config/templates/capybara.rb +2 -1
- data/generators/config/templates/default.yml +22 -4
- data/generators/config/templates/drivers/appium.rb +25 -0
- data/generators/config/templates/drivers/headless_firefox.rb +23 -0
- data/generators/cucumber/templates/cuke_sniffer.rake +2 -2
- data/generators/cucumber/templates/env.rb +8 -0
- data/generators/prerequisites/templates/factory_bot.rb +1 -0
- data/generators/root/root_generator.rb +1 -1
- data/generators/root/templates/{.rubocop.yml → .rubocop.yml.erb} +34 -13
- data/generators/root/templates/Gemfile.erb +4 -0
- data/generators/rspec/templates/spec_helper.rb +1 -0
- data/generators/turnip/templates/spec_helper.rb +1 -0
- data/howitzer.gemspec +3 -3
- data/lib/howitzer.rb +40 -0
- data/lib/howitzer/cache.rb +19 -18
- data/lib/howitzer/capybara_helpers.rb +13 -5
- data/lib/howitzer/email.rb +1 -0
- data/lib/howitzer/mail_adapters/gmail.rb +3 -0
- data/lib/howitzer/mail_adapters/mailgun.rb +2 -0
- data/lib/howitzer/mail_adapters/mailtrap.rb +3 -0
- data/lib/howitzer/mailgun_api/connector.rb +1 -0
- data/lib/howitzer/meta.rb +11 -0
- data/lib/howitzer/meta/actions.rb +38 -0
- data/lib/howitzer/meta/element.rb +38 -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/version.rb +1 -1
- data/lib/howitzer/web/capybara_context_holder.rb +1 -0
- data/lib/howitzer/web/capybara_methods_proxy.rb +4 -1
- data/lib/howitzer/web/element_dsl.rb +1 -0
- data/lib/howitzer/web/iframe_dsl.rb +2 -0
- data/lib/howitzer/web/page.rb +10 -0
- data/lib/howitzer/web/page_dsl.rb +3 -0
- data/lib/howitzer/web/page_validator.rb +2 -0
- data/lib/howitzer/web/section.rb +8 -0
- data/lib/howitzer/web/section_dsl.rb +1 -0
- data/spec/support/shared_examples/capybara_context_holder.rb +1 -1
- data/spec/support/shared_examples/meta_highlight_xpath.rb +41 -0
- data/spec/unit/generators/config_generator_spec.rb +4 -2
- data/spec/unit/generators/root_generator_spec.rb +32 -21
- data/spec/unit/generators/templates/cucumber_spec.rb +97 -0
- data/spec/unit/generators/templates/rspec_spec.rb +88 -0
- data/spec/unit/generators/templates/turnip_spec.rb +98 -0
- data/spec/unit/lib/capybara_helpers_spec.rb +37 -4
- data/spec/unit/lib/howitzer_spec.rb +23 -0
- data/spec/unit/lib/meta/element_spec.rb +59 -0
- data/spec/unit/lib/meta/entry_spec.rb +77 -0
- data/spec/unit/lib/meta/iframe_spec.rb +66 -0
- data/spec/unit/lib/meta/section_spec.rb +43 -0
- data/spec/unit/lib/utils/string_extensions_spec.rb +1 -1
- data/spec/unit/lib/web/element_dsl_spec.rb +10 -1
- data/spec/unit/lib/web/page_spec.rb +7 -0
- data/spec/unit/lib/web/section_spec.rb +7 -0
- metadata +31 -15
- data/generators/config/templates/drivers/phantomjs.rb +0 -19
@@ -1,19 +0,0 @@
|
|
1
|
-
# :phantomjs driver
|
2
|
-
|
3
|
-
Capybara.register_driver :phantomjs do |app|
|
4
|
-
caps = {
|
5
|
-
javascript_enabled: !Howitzer.phantom_ignore_js_errors
|
6
|
-
}
|
7
|
-
caps['phantomjs.page.settings.userAgent'] = "WebKit #{Howitzer.user_agent}" if Howitzer.user_agent.present?
|
8
|
-
Capybara::Selenium::Driver.new(
|
9
|
-
app, browser: :phantomjs,
|
10
|
-
desired_capabilities: caps,
|
11
|
-
driver_opts: {
|
12
|
-
args: ["--ignore-ssl-errors=#{Howitzer.phantom_ignore_ssl_errors ? 'yes' : 'no'}"]
|
13
|
-
}
|
14
|
-
)
|
15
|
-
end
|
16
|
-
|
17
|
-
Capybara::Screenshot.class_eval do
|
18
|
-
register_driver :phantomjs, ®istered_drivers[:selenium]
|
19
|
-
end
|