howitzer 2.1.1 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +27 -18
  3. data/.travis.yml +4 -3
  4. data/CHANGELOG.md +15 -1
  5. data/README.md +6 -3
  6. data/Rakefile +1 -1
  7. data/features/cli_new.feature +12 -8
  8. data/features/cli_update.feature +14 -9
  9. data/features/step_definitions/common_steps.rb +3 -3
  10. data/generators/base_generator.rb +1 -1
  11. data/generators/config/config_generator.rb +2 -1
  12. data/generators/config/templates/boot.rb +1 -1
  13. data/generators/config/templates/capybara.rb +2 -1
  14. data/generators/config/templates/default.yml +22 -4
  15. data/generators/config/templates/drivers/appium.rb +25 -0
  16. data/generators/config/templates/drivers/headless_firefox.rb +23 -0
  17. data/generators/cucumber/templates/cuke_sniffer.rake +2 -2
  18. data/generators/cucumber/templates/env.rb +8 -0
  19. data/generators/prerequisites/templates/factory_bot.rb +1 -0
  20. data/generators/root/root_generator.rb +1 -1
  21. data/generators/root/templates/{.rubocop.yml → .rubocop.yml.erb} +34 -13
  22. data/generators/root/templates/Gemfile.erb +4 -0
  23. data/generators/rspec/templates/spec_helper.rb +1 -0
  24. data/generators/turnip/templates/spec_helper.rb +1 -0
  25. data/howitzer.gemspec +3 -3
  26. data/lib/howitzer.rb +40 -0
  27. data/lib/howitzer/cache.rb +19 -18
  28. data/lib/howitzer/capybara_helpers.rb +13 -5
  29. data/lib/howitzer/email.rb +1 -0
  30. data/lib/howitzer/mail_adapters/gmail.rb +3 -0
  31. data/lib/howitzer/mail_adapters/mailgun.rb +2 -0
  32. data/lib/howitzer/mail_adapters/mailtrap.rb +3 -0
  33. data/lib/howitzer/mailgun_api/connector.rb +1 -0
  34. data/lib/howitzer/meta.rb +11 -0
  35. data/lib/howitzer/meta/actions.rb +38 -0
  36. data/lib/howitzer/meta/element.rb +38 -0
  37. data/lib/howitzer/meta/entry.rb +62 -0
  38. data/lib/howitzer/meta/iframe.rb +41 -0
  39. data/lib/howitzer/meta/section.rb +30 -0
  40. data/lib/howitzer/version.rb +1 -1
  41. data/lib/howitzer/web/capybara_context_holder.rb +1 -0
  42. data/lib/howitzer/web/capybara_methods_proxy.rb +4 -1
  43. data/lib/howitzer/web/element_dsl.rb +1 -0
  44. data/lib/howitzer/web/iframe_dsl.rb +2 -0
  45. data/lib/howitzer/web/page.rb +10 -0
  46. data/lib/howitzer/web/page_dsl.rb +3 -0
  47. data/lib/howitzer/web/page_validator.rb +2 -0
  48. data/lib/howitzer/web/section.rb +8 -0
  49. data/lib/howitzer/web/section_dsl.rb +1 -0
  50. data/spec/support/shared_examples/capybara_context_holder.rb +1 -1
  51. data/spec/support/shared_examples/meta_highlight_xpath.rb +41 -0
  52. data/spec/unit/generators/config_generator_spec.rb +4 -2
  53. data/spec/unit/generators/root_generator_spec.rb +32 -21
  54. data/spec/unit/generators/templates/cucumber_spec.rb +97 -0
  55. data/spec/unit/generators/templates/rspec_spec.rb +88 -0
  56. data/spec/unit/generators/templates/turnip_spec.rb +98 -0
  57. data/spec/unit/lib/capybara_helpers_spec.rb +37 -4
  58. data/spec/unit/lib/howitzer_spec.rb +23 -0
  59. data/spec/unit/lib/meta/element_spec.rb +59 -0
  60. data/spec/unit/lib/meta/entry_spec.rb +77 -0
  61. data/spec/unit/lib/meta/iframe_spec.rb +66 -0
  62. data/spec/unit/lib/meta/section_spec.rb +43 -0
  63. data/spec/unit/lib/utils/string_extensions_spec.rb +1 -1
  64. data/spec/unit/lib/web/element_dsl_spec.rb +10 -1
  65. data/spec/unit/lib/web/page_spec.rb +7 -0
  66. data/spec/unit/lib/web/section_spec.rb +7 -0
  67. metadata +31 -15
  68. 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, &registered_drivers[:selenium]
19
- end