spreewald 3.0.2 → 4.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +42 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +29 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/Gemfile.ruby245 +3 -0
- data/Gemfile.ruby245.lock +11 -2
- data/Gemfile.ruby266 +3 -0
- data/Gemfile.ruby266.lock +12 -2
- data/{Gemfile.ruby218 → Gemfile.ruby300} +6 -1
- data/Gemfile.ruby300.lock +108 -0
- data/README.md +41 -3
- data/Rakefile +34 -19
- data/features/binary.feature +2 -2
- data/features/support/step_definitions/custom_steps.rb +10 -0
- data/lib/spreewald.rb +1 -0
- data/lib/spreewald/browser_tab_steps.rb +1 -1
- data/lib/spreewald/development_steps.rb +5 -5
- data/lib/spreewald/email_steps.rb +3 -1
- data/lib/spreewald/frame_steps.rb +77 -0
- data/lib/spreewald_support/mail_finder.rb +11 -10
- data/lib/spreewald_support/mail_to_plaintext_converter.rb +42 -0
- data/lib/spreewald_support/unsupported_email_header.rb +22 -0
- data/lib/spreewald_support/version.rb +1 -1
- data/spec/spreewald_support/mail_to_plaintext_converter_spec.rb +60 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/Gemfile +1 -1
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/Gemfile.lock +15 -17
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/README.rdoc +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/Rakefile +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/app +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/bin/bundle +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/bin/rails +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/bin/rake +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/bin/setup +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config.ru +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/application.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/boot.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/cucumber.yml +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/database.yml +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/environment.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/environments/development.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/environments/test.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/initializers/backtrace_silencers.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/initializers/cookies_serializer.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/initializers/filter_parameter_logging.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/initializers/inflections.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/initializers/mime_types.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/initializers/session_store.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/initializers/silence_deprecation_warnings.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/initializers/to_time_preserves_timezone.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/initializers/wrap_parameters.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/locales/en.yml +0 -0
- data/tests/{rails-3_capybara-1 → rails-4_capybara-2}/config/routes.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/config/secrets.yml +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/db +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/features/browser_tab_steps.feature +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/features/development_steps.feature +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/features/email_steps.feature +0 -0
- data/tests/rails-4_capybara-2/features/iframe_steps.feature +1 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/features/overriding.feature +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/features/session_steps.feature +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/features/step_definitions/overriding_steps.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/features/step_definitions/test_steps.rb +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/features/support/env.rb +0 -0
- data/tests/{rails-3_capybara-1 → rails-4_capybara-2}/features/support/paths.rb +0 -0
- data/tests/{rails-3_capybara-1 → rails-4_capybara-2}/features/support/selectors.rb +0 -0
- data/tests/rails-4_capybara-2/features/support/selenium.rb +1 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/features/table_steps.feature +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/features/time_steps.feature +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/features/web_steps.feature +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/lib/tasks/cucumber.rake +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/log/.keep +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/public/404.html +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/public/422.html +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/public/500.html +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/public/favicon.ico +0 -0
- data/tests/{rails-4_capybara-3 → rails-4_capybara-2}/public/fixture_files +0 -0
- data/tests/{rails-3_capybara-1 → rails-4_capybara-2}/script/cucumber +0 -0
- data/tests/rails-6_capybara-3/.ruby-version +1 -1
- data/tests/rails-6_capybara-3/Gemfile +4 -2
- data/tests/rails-6_capybara-3/Gemfile.lock +177 -143
- data/tests/rails-6_capybara-3/app/mailers/spreewald_mailer.rb +16 -0
- data/tests/rails-6_capybara-3/config.ru +1 -0
- data/tests/rails-6_capybara-3/config/cucumber.yml +1 -1
- data/tests/rails-6_capybara-3/config/environments/development.rb +21 -3
- data/tests/rails-6_capybara-3/config/environments/test.rb +12 -1
- data/tests/rails-6_capybara-3/config/initializers/backtrace_silencers.rb +4 -3
- data/tests/rails-6_capybara-3/config/initializers/filter_parameter_logging.rb +3 -1
- data/tests/rails-6_capybara-3/config/initializers/new_framework_defaults_6_1.rb +67 -0
- data/tests/rails-6_capybara-3/config/initializers/permissions_policy.rb +11 -0
- data/tests/rails-6_capybara-3/features/iframe_steps.feature +1 -0
- data/tests/rails-6_capybara-3/features/support/selenium.rb +1 -0
- data/tests/shared/app/controllers/emails_controller.rb +20 -0
- data/tests/shared/app/controllers/iframes_controller.rb +11 -0
- data/tests/shared/app/controllers/static_pages_controller.rb +12 -8
- data/tests/shared/app/models/mailer.rb +32 -0
- data/tests/shared/app/views/iframes/iframe_1_content.haml +12 -0
- data/tests/shared/app/views/iframes/iframe_2_content.haml +12 -0
- data/tests/shared/app/views/mailer/html_email_for_failed_test_without_header.haml +5 -0
- data/tests/shared/app/views/mailer/html_email_for_successful_test_without_header.haml +7 -0
- data/tests/shared/app/views/mailer/text_email_for_failed_test_without_header.text.erb +1 -0
- data/tests/shared/app/views/mailer/text_email_for_successful_test_without_header.text.erb +3 -0
- data/tests/shared/app/views/static_pages/iframe.haml +3 -0
- data/tests/shared/config/routes.rb +8 -0
- data/tests/shared/features/shared/email_steps.feature +185 -0
- data/tests/shared/features/shared/iframe_steps.feature +38 -0
- data/tests/shared/features/shared/step_definitions/test_steps.rb +5 -6
- data/tests/shared/features/support/selenium.rb +10 -0
- metadata +143 -184
- data/.travis.yml +0 -29
- data/Gemfile.ruby218.lock +0 -58
- data/tests/rails-3_capybara-1/.ruby-version +0 -1
- data/tests/rails-3_capybara-1/Gemfile +0 -20
- data/tests/rails-3_capybara-1/Gemfile.lock +0 -182
- data/tests/rails-3_capybara-1/Rakefile +0 -18
- data/tests/rails-3_capybara-1/app +0 -1
- data/tests/rails-3_capybara-1/config.ru +0 -4
- data/tests/rails-3_capybara-1/config/application.rb +0 -29
- data/tests/rails-3_capybara-1/config/boot.rb +0 -15
- data/tests/rails-3_capybara-1/config/cucumber.yml +0 -1
- data/tests/rails-3_capybara-1/config/database.yml +0 -1
- data/tests/rails-3_capybara-1/config/environment.rb +0 -7
- data/tests/rails-3_capybara-1/config/initializers/backtrace_silencers.rb +0 -9
- data/tests/rails-3_capybara-1/config/initializers/inflections.rb +0 -12
- data/tests/rails-3_capybara-1/config/initializers/mime_types.rb +0 -7
- data/tests/rails-3_capybara-1/config/initializers/secret_token.rb +0 -9
- data/tests/rails-3_capybara-1/config/initializers/session_store.rb +0 -5
- data/tests/rails-3_capybara-1/db +0 -1
- data/tests/rails-3_capybara-1/features/shared +0 -1
- data/tests/rails-3_capybara-1/features/support/env.rb +0 -65
- data/tests/rails-3_capybara-1/features/support/selenium.rb +0 -3
- data/tests/rails-3_capybara-1/public +0 -1
- data/tests/rails-3_capybara-1/script/rails +0 -6
- data/tests/rails-3_capybara-2/.ruby-version +0 -1
- data/tests/rails-3_capybara-2/Gemfile +0 -21
- data/tests/rails-3_capybara-2/Gemfile.lock +0 -191
- data/tests/rails-3_capybara-2/Rakefile +0 -1
- data/tests/rails-3_capybara-2/app +0 -1
- data/tests/rails-3_capybara-2/config +0 -1
- data/tests/rails-3_capybara-2/config.ru +0 -1
- data/tests/rails-3_capybara-2/db +0 -1
- data/tests/rails-3_capybara-2/features +0 -1
- data/tests/rails-3_capybara-2/public +0 -1
- data/tests/rails-3_capybara-2/script +0 -1
- data/tests/rails-4_capybara-3/config/routes.rb +0 -1
- data/tests/rails-4_capybara-3/features/support/paths.rb +0 -1
- data/tests/rails-4_capybara-3/features/support/selectors.rb +0 -1
- data/tests/rails-4_capybara-3/features/support/selenium.rb +0 -3
- data/tests/rails-4_capybara-3/script/cucumber +0 -10
- data/tests/rails-6_capybara-3/features/support/selenium.rb +0 -3
@@ -46,5 +46,21 @@ class SpreewaldMailer < ApplicationMailer
|
|
46
46
|
email
|
47
47
|
end
|
48
48
|
|
49
|
+
def html_email_for_successful_test_without_header
|
50
|
+
email
|
51
|
+
end
|
52
|
+
|
53
|
+
def text_email_for_successful_test_without_header
|
54
|
+
email
|
55
|
+
end
|
56
|
+
|
57
|
+
def html_email_for_failed_test_without_header
|
58
|
+
email
|
59
|
+
end
|
60
|
+
|
61
|
+
def text_email_for_failed_test_without_header
|
62
|
+
email
|
63
|
+
end
|
64
|
+
|
49
65
|
end
|
50
66
|
|
@@ -4,6 +4,6 @@ rerun = rerun.strip.gsub /\s/, ' '
|
|
4
4
|
rerun_opts = rerun.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
|
5
5
|
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags 'not @wip'"
|
6
6
|
%>
|
7
|
-
default: <%= std_opts %> features
|
7
|
+
default: <%= std_opts %> features --publish-quiet
|
8
8
|
wip: --tags @wip:3 --wip features
|
9
9
|
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags 'not @wip'
|
@@ -1,8 +1,10 @@
|
|
1
|
+
require "active_support/core_ext/integer/time"
|
2
|
+
|
1
3
|
Rails.application.configure do
|
2
4
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
5
|
|
4
|
-
# In the development environment your application's code is reloaded
|
5
|
-
#
|
6
|
+
# In the development environment your application's code is reloaded any time
|
7
|
+
# it changes. This slows down response time but is perfect for development
|
6
8
|
# since you don't have to restart the web server when you make code changes.
|
7
9
|
config.cache_classes = false
|
8
10
|
|
@@ -36,6 +38,12 @@ Rails.application.configure do
|
|
36
38
|
# Print deprecation notices to the Rails logger.
|
37
39
|
config.active_support.deprecation = :log
|
38
40
|
|
41
|
+
# Raise exceptions for disallowed deprecations.
|
42
|
+
config.active_support.disallowed_deprecation = :raise
|
43
|
+
|
44
|
+
# Tell Active Support which deprecation messages to disallow.
|
45
|
+
config.active_support.disallowed_deprecation_warnings = []
|
46
|
+
|
39
47
|
# Raise an error on page load if there are pending migrations.
|
40
48
|
config.active_record.migration_error = :page_load
|
41
49
|
|
@@ -44,5 +52,15 @@ Rails.application.configure do
|
|
44
52
|
|
45
53
|
|
46
54
|
# Raises error for missing translations.
|
47
|
-
# config.
|
55
|
+
# config.i18n.raise_on_missing_translations = true
|
56
|
+
|
57
|
+
# Annotate rendered view with file names.
|
58
|
+
# config.action_view.annotate_rendered_view_with_filenames = true
|
59
|
+
|
60
|
+
# Use an evented file watcher to asynchronously detect changes in source code,
|
61
|
+
# routes, locales, etc. This feature depends on the listen gem.
|
62
|
+
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
63
|
+
|
64
|
+
# Uncomment if you wish to allow Action Cable access from any origin.
|
65
|
+
# config.action_cable.disable_request_forgery_protection = true
|
48
66
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "active_support/core_ext/integer/time"
|
2
|
+
|
1
3
|
# The test environment is used exclusively to run your application's
|
2
4
|
# test suite. You never need to work with it otherwise. Remember that
|
3
5
|
# your test database is "scratch space" for the test suite and is wiped
|
@@ -40,6 +42,15 @@ Rails.application.configure do
|
|
40
42
|
# Print deprecation notices to the stderr.
|
41
43
|
config.active_support.deprecation = :stderr
|
42
44
|
|
45
|
+
# Raise exceptions for disallowed deprecations.
|
46
|
+
config.active_support.disallowed_deprecation = :raise
|
47
|
+
|
48
|
+
# Tell Active Support which deprecation messages to disallow.
|
49
|
+
config.active_support.disallowed_deprecation_warnings = []
|
50
|
+
|
43
51
|
# Raises error for missing translations.
|
44
|
-
# config.
|
52
|
+
# config.i18n.raise_on_missing_translations = true
|
53
|
+
|
54
|
+
# Annotate rendered view with file names.
|
55
|
+
# config.action_view.annotate_rendered_view_with_filenames = true
|
45
56
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
3
|
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line|
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
|
5
5
|
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
|
7
|
-
#
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
|
7
|
+
# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
|
8
|
+
Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]
|
@@ -1,4 +1,6 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
3
|
# Configure sensitive parameters which will be filtered from the log file.
|
4
|
-
Rails.application.config.filter_parameters += [
|
4
|
+
Rails.application.config.filter_parameters += [
|
5
|
+
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
6
|
+
]
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains migration options to ease your Rails 6.1 upgrade.
|
4
|
+
#
|
5
|
+
# Once upgraded flip defaults one by one to migrate to the new default.
|
6
|
+
#
|
7
|
+
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
8
|
+
|
9
|
+
# Support for inversing belongs_to -> has_many Active Record associations.
|
10
|
+
# Rails.application.config.active_record.has_many_inversing = true
|
11
|
+
|
12
|
+
# Track Active Storage variants in the database.
|
13
|
+
# Rails.application.config.active_storage.track_variants = true
|
14
|
+
|
15
|
+
# Apply random variation to the delay when retrying failed jobs.
|
16
|
+
# Rails.application.config.active_job.retry_jitter = 0.15
|
17
|
+
|
18
|
+
# Stop executing `after_enqueue`/`after_perform` callbacks if
|
19
|
+
# `before_enqueue`/`before_perform` respectively halts with `throw :abort`.
|
20
|
+
# Rails.application.config.active_job.skip_after_callbacks_if_terminated = true
|
21
|
+
|
22
|
+
# Specify cookies SameSite protection level: either :none, :lax, or :strict.
|
23
|
+
#
|
24
|
+
# This change is not backwards compatible with earlier Rails versions.
|
25
|
+
# It's best enabled when your entire app is migrated and stable on 6.1.
|
26
|
+
# Rails.application.config.action_dispatch.cookies_same_site_protection = :lax
|
27
|
+
|
28
|
+
# Generate CSRF tokens that are encoded in URL-safe Base64.
|
29
|
+
#
|
30
|
+
# This change is not backwards compatible with earlier Rails versions.
|
31
|
+
# It's best enabled when your entire app is migrated and stable on 6.1.
|
32
|
+
# Rails.application.config.action_controller.urlsafe_csrf_tokens = true
|
33
|
+
|
34
|
+
# Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an
|
35
|
+
# UTC offset or a UTC time.
|
36
|
+
# ActiveSupport.utc_to_local_returns_utc_offset_times = true
|
37
|
+
|
38
|
+
# Change the default HTTP status code to `308` when redirecting non-GET/HEAD
|
39
|
+
# requests to HTTPS in `ActionDispatch::SSL` middleware.
|
40
|
+
# Rails.application.config.action_dispatch.ssl_default_redirect_status = 308
|
41
|
+
|
42
|
+
# Use new connection handling API. For most applications this won't have any
|
43
|
+
# effect. For applications using multiple databases, this new API provides
|
44
|
+
# support for granular connection swapping.
|
45
|
+
# Rails.application.config.active_record.legacy_connection_handling = false
|
46
|
+
|
47
|
+
# Make `form_with` generate non-remote forms by default.
|
48
|
+
# Rails.application.config.action_view.form_with_generates_remote_forms = false
|
49
|
+
|
50
|
+
# Set the default queue name for the analysis job to the queue adapter default.
|
51
|
+
# Rails.application.config.active_storage.queues.analysis = nil
|
52
|
+
|
53
|
+
# Set the default queue name for the purge job to the queue adapter default.
|
54
|
+
# Rails.application.config.active_storage.queues.purge = nil
|
55
|
+
|
56
|
+
# Set the default queue name for the incineration job to the queue adapter default.
|
57
|
+
# Rails.application.config.action_mailbox.queues.incineration = nil
|
58
|
+
|
59
|
+
# Set the default queue name for the routing job to the queue adapter default.
|
60
|
+
# Rails.application.config.action_mailbox.queues.routing = nil
|
61
|
+
|
62
|
+
# Set the default queue name for the mail deliver job to the queue adapter default.
|
63
|
+
# Rails.application.config.action_mailer.deliver_later_queue_name = nil
|
64
|
+
|
65
|
+
# Generate a `Link` header that gives a hint to modern browsers about
|
66
|
+
# preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`.
|
67
|
+
# Rails.application.config.action_view.preload_links_header = true
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Define an application-wide HTTP permissions policy. For further
|
2
|
+
# information see https://developers.google.com/web/updates/2018/06/feature-policy
|
3
|
+
#
|
4
|
+
# Rails.application.config.permissions_policy do |f|
|
5
|
+
# f.camera :none
|
6
|
+
# f.gyroscope :none
|
7
|
+
# f.microphone :none
|
8
|
+
# f.usb :none
|
9
|
+
# f.fullscreen :self
|
10
|
+
# f.payment :self, "https://secure.example.com"
|
11
|
+
# end
|
@@ -0,0 +1 @@
|
|
1
|
+
../../shared/features/shared/iframe_steps.feature
|
@@ -0,0 +1 @@
|
|
1
|
+
../../../shared/features/support/selenium.rb
|
@@ -44,6 +44,26 @@ class EmailsController < ApplicationController
|
|
44
44
|
render_nothing
|
45
45
|
end
|
46
46
|
|
47
|
+
def send_html_email_for_successful_test_without_header
|
48
|
+
deliver :html_email_for_successful_test_without_header
|
49
|
+
render_nothing
|
50
|
+
end
|
51
|
+
|
52
|
+
def send_text_email_for_successful_test_without_header
|
53
|
+
deliver :text_email_for_successful_test_without_header
|
54
|
+
render_nothing
|
55
|
+
end
|
56
|
+
|
57
|
+
def send_html_email_for_failed_test_without_header
|
58
|
+
deliver :html_email_for_failed_test_without_header
|
59
|
+
render_nothing
|
60
|
+
end
|
61
|
+
|
62
|
+
def send_text_email_for_failed_test_without_header
|
63
|
+
deliver :text_email_for_failed_test_without_header
|
64
|
+
render_nothing
|
65
|
+
end
|
66
|
+
|
47
67
|
private
|
48
68
|
|
49
69
|
def deliver(method_name)
|
@@ -6,6 +6,14 @@ class StaticPagesController < ApplicationController
|
|
6
6
|
def home
|
7
7
|
end
|
8
8
|
|
9
|
+
def iframe
|
10
|
+
render 'static_pages/iframe', layout: false
|
11
|
+
end
|
12
|
+
|
13
|
+
def link_target
|
14
|
+
render_nothing
|
15
|
+
end
|
16
|
+
|
9
17
|
def link_to_home
|
10
18
|
end
|
11
19
|
|
@@ -18,6 +26,10 @@ class StaticPagesController < ApplicationController
|
|
18
26
|
def overriden
|
19
27
|
end
|
20
28
|
|
29
|
+
def second_link_target
|
30
|
+
render_nothing
|
31
|
+
end
|
32
|
+
|
21
33
|
def see_element
|
22
34
|
end
|
23
35
|
|
@@ -36,12 +48,4 @@ class StaticPagesController < ApplicationController
|
|
36
48
|
def within
|
37
49
|
end
|
38
50
|
|
39
|
-
def link_target
|
40
|
-
render_nothing
|
41
|
-
end
|
42
|
-
|
43
|
-
def second_link_target
|
44
|
-
render_nothing
|
45
|
-
end
|
46
|
-
|
47
51
|
end
|
@@ -49,6 +49,22 @@ class Mailer < ActionMailer::Base
|
|
49
49
|
email
|
50
50
|
end
|
51
51
|
|
52
|
+
def html_email_for_successful_test_without_header
|
53
|
+
email
|
54
|
+
end
|
55
|
+
|
56
|
+
def text_email_for_successful_test_without_header
|
57
|
+
email
|
58
|
+
end
|
59
|
+
|
60
|
+
def html_email_for_failed_test_without_header
|
61
|
+
email
|
62
|
+
end
|
63
|
+
|
64
|
+
def text_email_for_failed_test_without_header
|
65
|
+
email
|
66
|
+
end
|
67
|
+
|
52
68
|
else
|
53
69
|
|
54
70
|
def email
|
@@ -82,6 +98,22 @@ class Mailer < ActionMailer::Base
|
|
82
98
|
email
|
83
99
|
end
|
84
100
|
|
101
|
+
def html_email_for_successful_test_without_header
|
102
|
+
email
|
103
|
+
end
|
104
|
+
|
105
|
+
def text_email_for_successful_test_without_header
|
106
|
+
email
|
107
|
+
end
|
108
|
+
|
109
|
+
def html_email_for_failed_test_without_header
|
110
|
+
email
|
111
|
+
end
|
112
|
+
|
113
|
+
def text_email_for_failed_test_without_header
|
114
|
+
email
|
115
|
+
end
|
116
|
+
|
85
117
|
end
|
86
118
|
|
87
119
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Bye
|
@@ -13,6 +13,10 @@ Rails.application.routes.draw do
|
|
13
13
|
get '/emails/send_html_email_with_linebreaks', to: 'emails#send_html_email_with_linebreaks'
|
14
14
|
get '/emails/send_html_email_with_specific_line', to: 'emails#send_html_email_with_specific_line'
|
15
15
|
get '/emails/send_text_email_with_specific_line', to: 'emails#send_text_email_with_specific_line'
|
16
|
+
get '/emails/send_html_email_for_successful_test_without_header', to: 'emails#send_html_email_for_successful_test_without_header'
|
17
|
+
get '/emails/send_text_email_for_successful_test_without_header', to: 'emails#send_text_email_for_successful_test_without_header'
|
18
|
+
get '/emails/send_html_email_for_failed_test_without_header', to: 'emails#send_html_email_for_failed_test_without_header'
|
19
|
+
get '/emails/send_text_email_for_failed_test_without_header', to: 'emails#send_text_email_for_failed_test_without_header'
|
16
20
|
|
17
21
|
get '/forms/checkbox_form', to: 'forms#checkbox_form'
|
18
22
|
get '/forms/disabled_elements', to: 'forms#disabled_elements'
|
@@ -21,8 +25,12 @@ Rails.application.routes.draw do
|
|
21
25
|
get '/forms/select_fields', to: 'forms#select_fields'
|
22
26
|
get '/forms/invalid_form', to: 'forms#invalid_form'
|
23
27
|
|
28
|
+
get '/iframes/iframe_1_content', to: 'iframes#iframe_1_content'
|
29
|
+
get '/iframes/iframe_2_content', to: 'iframes#iframe_2_content'
|
30
|
+
|
24
31
|
get '/static_pages/click_on', to: 'static_pages#click_on'
|
25
32
|
get '/static_pages/home', to: 'static_pages#home'
|
33
|
+
get '/static_pages/iframe', to: 'static_pages#iframe'
|
26
34
|
get '/static_pages/link_target', to: 'static_pages#link_target'
|
27
35
|
get '/static_pages/link_to_home', to: 'static_pages#link_to_home'
|
28
36
|
get '/static_pages/links', to: 'static_pages#links'
|
@@ -33,6 +33,70 @@ Feature: Test Spreewald's email steps
|
|
33
33
|
'''
|
34
34
|
"""
|
35
35
|
|
36
|
+
# Test with invalid header
|
37
|
+
Then the step with an unsupported email header should raise:
|
38
|
+
"""
|
39
|
+
Then an email should have been sent with:
|
40
|
+
'''
|
41
|
+
From: from@example.com
|
42
|
+
Reply-To: reply-to@example.com
|
43
|
+
Invalid-Header: reply-to@example.com
|
44
|
+
To: to@example.com
|
45
|
+
Subject: SUBJECT
|
46
|
+
'''
|
47
|
+
"""
|
48
|
+
|
49
|
+
# Test with indented header lines
|
50
|
+
Then the following multiline step should succeed:
|
51
|
+
"""
|
52
|
+
Then an email should have been sent with:
|
53
|
+
'''
|
54
|
+
From: from@example.com
|
55
|
+
Reply-To: reply-to@example.com
|
56
|
+
To: to@example.com
|
57
|
+
Subject: SUBJECT
|
58
|
+
|
59
|
+
Body
|
60
|
+
with
|
61
|
+
line
|
62
|
+
breaks
|
63
|
+
'''
|
64
|
+
"""
|
65
|
+
|
66
|
+
# Test with indented step lines
|
67
|
+
Then the following multiline step should succeed:
|
68
|
+
"""
|
69
|
+
Then an email should have been sent with:
|
70
|
+
'''
|
71
|
+
From: from@example.com
|
72
|
+
Reply-To: reply-to@example.com
|
73
|
+
To: to@example.com
|
74
|
+
Subject: SUBJECT
|
75
|
+
|
76
|
+
Body
|
77
|
+
with
|
78
|
+
line
|
79
|
+
breaks
|
80
|
+
'''
|
81
|
+
"""
|
82
|
+
|
83
|
+
# Test with indented body lines
|
84
|
+
Then the following multiline step should succeed:
|
85
|
+
"""
|
86
|
+
Then an email should have been sent with:
|
87
|
+
'''
|
88
|
+
From: from@example.com
|
89
|
+
Reply-To: reply-to@example.com
|
90
|
+
To: to@example.com
|
91
|
+
Subject: SUBJECT
|
92
|
+
|
93
|
+
Body
|
94
|
+
with
|
95
|
+
line
|
96
|
+
breaks
|
97
|
+
'''
|
98
|
+
"""
|
99
|
+
|
36
100
|
# Test with body
|
37
101
|
Then the following multiline step should succeed:
|
38
102
|
"""
|
@@ -324,6 +388,127 @@ Feature: Test Spreewald's email steps
|
|
324
388
|
'''
|
325
389
|
"""
|
326
390
|
|
391
|
+
# Tests without header
|
392
|
+
When I clear my emails
|
393
|
+
And I go to "/emails/send_text_email_for_successful_test_without_header"
|
394
|
+
Then the following multiline step should succeed:
|
395
|
+
"""
|
396
|
+
Then an email should have been sent with:
|
397
|
+
'''
|
398
|
+
Hello
|
399
|
+
|
400
|
+
Bye
|
401
|
+
'''
|
402
|
+
"""
|
403
|
+
And the following multiline step should succeed:
|
404
|
+
"""
|
405
|
+
Then an email should have been sent with:
|
406
|
+
'''
|
407
|
+
To: to@example.com
|
408
|
+
|
409
|
+
Hello
|
410
|
+
|
411
|
+
Bye
|
412
|
+
'''
|
413
|
+
"""
|
414
|
+
But the following multiline step should fail:
|
415
|
+
"""
|
416
|
+
Then an email should have been sent with:
|
417
|
+
'''
|
418
|
+
To: wrong-guy@example.com
|
419
|
+
|
420
|
+
Hello
|
421
|
+
|
422
|
+
Bye
|
423
|
+
'''
|
424
|
+
"""
|
425
|
+
|
426
|
+
When I clear my emails
|
427
|
+
And I go to "/emails/send_text_email_for_failed_test_without_header"
|
428
|
+
Then the following multiline step should fail:
|
429
|
+
"""
|
430
|
+
Then an email should have been sent with:
|
431
|
+
'''
|
432
|
+
Hello
|
433
|
+
|
434
|
+
Bye
|
435
|
+
'''
|
436
|
+
"""
|
437
|
+
But the following multiline step should succeed:
|
438
|
+
"""
|
439
|
+
Then an email should have been sent with:
|
440
|
+
'''
|
441
|
+
Bye
|
442
|
+
'''
|
443
|
+
"""
|
444
|
+
And the following multiline step should succeed:
|
445
|
+
"""
|
446
|
+
Then an email should have been sent with:
|
447
|
+
'''
|
448
|
+
To: to@example.com
|
449
|
+
|
450
|
+
Bye
|
451
|
+
'''
|
452
|
+
"""
|
453
|
+
|
454
|
+
When I clear my emails
|
455
|
+
And I go to "/emails/send_html_email_for_successful_test_without_header"
|
456
|
+
Then the following multiline step should succeed:
|
457
|
+
"""
|
458
|
+
Then an email should have been sent with:
|
459
|
+
'''
|
460
|
+
Hello
|
461
|
+
Bye
|
462
|
+
'''
|
463
|
+
"""
|
464
|
+
And the following multiline step should succeed:
|
465
|
+
"""
|
466
|
+
Then an email should have been sent with:
|
467
|
+
'''
|
468
|
+
To: to@example.com
|
469
|
+
|
470
|
+
Hello
|
471
|
+
Bye
|
472
|
+
'''
|
473
|
+
"""
|
474
|
+
But the following multiline step should fail:
|
475
|
+
"""
|
476
|
+
Then an email should have been sent with:
|
477
|
+
'''
|
478
|
+
To: wrong-guy@example.com
|
479
|
+
|
480
|
+
Hello
|
481
|
+
Bye
|
482
|
+
'''
|
483
|
+
"""
|
484
|
+
|
485
|
+
When I clear my emails
|
486
|
+
And I go to "/emails/send_html_email_for_failed_test_without_header"
|
487
|
+
Then the following multiline step should fail:
|
488
|
+
"""
|
489
|
+
Then an email should have been sent with:
|
490
|
+
'''
|
491
|
+
Hello
|
492
|
+
Bye
|
493
|
+
'''
|
494
|
+
"""
|
495
|
+
But the following multiline step should succeed:
|
496
|
+
"""
|
497
|
+
Then an email should have been sent with:
|
498
|
+
'''
|
499
|
+
Bye
|
500
|
+
'''
|
501
|
+
"""
|
502
|
+
And the following multiline step should succeed:
|
503
|
+
"""
|
504
|
+
Then an email should have been sent with:
|
505
|
+
'''
|
506
|
+
To: to@example.com
|
507
|
+
|
508
|
+
Bye
|
509
|
+
'''
|
510
|
+
"""
|
511
|
+
|
327
512
|
Scenario: /^I follow the (first|second|third)? ?link in the e?mail$/ (HTML e-mail body)
|
328
513
|
When I go to "/emails/send_html_email_with_links"
|
329
514
|
And I follow the first link in the email
|