spreewald 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/spreewald_support/mail_finder.rb +1 -0
- data/lib/spreewald_support/version.rb +1 -1
- data/tests/rails-3_capybara-1/Gemfile.lock +1 -1
- data/tests/rails-3_capybara-2/Gemfile.lock +1 -1
- data/tests/rails-4_capybara-3/Gemfile.lock +1 -1
- data/tests/rails-6_capybara-3/Gemfile.lock +1 -1
- data/tests/rails-6_capybara-3/app/mailers/spreewald_mailer.rb +8 -0
- data/tests/shared/app/controllers/emails_controller.rb +10 -0
- data/tests/shared/app/models/mailer.rb +16 -0
- data/tests/shared/app/views/mailer/html_email_with_specific_line.haml +11 -0
- data/tests/shared/app/views/mailer/text_email_with_specific_line.text.erb +5 -0
- data/tests/shared/config/routes.rb +2 -0
- data/tests/shared/features/shared/email_steps.feature +38 -0
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13490aa27d2ade6a30674d36cbe3374b0d4e6f4687958300b56047b2033a49b3
|
4
|
+
data.tar.gz: 897b9e7881f0f50f32aa8c78afac85380a281e39bf25e007694bf9bb07654efc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5653340cf2ae8b8f3aaabb29a47df7854e86fe1c88ef49310f583c7733e9ef8e49867e914ca4547a6b3ed3ee2f78dc4dc26a9c9dbda67ff426b38532efa8596
|
7
|
+
data.tar.gz: b00d439380d560f792963261900b3840733c0a2f394da89de984ea3a3469b0ee549b30ea84491fcc2017eaebf3e15ce622439dac5ea55f1b94d7c4258fe8b179
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
5
5
|
|
6
|
+
## 3.0.2
|
7
|
+
|
8
|
+
- Introduce wildcard for the beginning of a line. (see issue [#155](https://github.com/makandra/spreewald/issues/155))
|
9
|
+
- This will allow you to check for a specific sentence inside the body
|
10
|
+
|
6
11
|
## 3.0.1
|
7
12
|
|
8
13
|
- Fix deduplication of linebreaks for html mails in mail finder. (see issue [#153](https://github.com/makandra/spreewald/issues/153))
|
@@ -34,6 +34,16 @@ class EmailsController < ApplicationController
|
|
34
34
|
render_nothing
|
35
35
|
end
|
36
36
|
|
37
|
+
def send_html_email_with_specific_line
|
38
|
+
deliver :html_email_with_specific_line
|
39
|
+
render_nothing
|
40
|
+
end
|
41
|
+
|
42
|
+
def send_text_email_with_specific_line
|
43
|
+
deliver :text_email_with_specific_line
|
44
|
+
render_nothing
|
45
|
+
end
|
46
|
+
|
37
47
|
private
|
38
48
|
|
39
49
|
def deliver(method_name)
|
@@ -41,6 +41,14 @@ class Mailer < ActionMailer::Base
|
|
41
41
|
email
|
42
42
|
end
|
43
43
|
|
44
|
+
def html_email_with_specific_line
|
45
|
+
email
|
46
|
+
end
|
47
|
+
|
48
|
+
def text_email_with_specific_line
|
49
|
+
email
|
50
|
+
end
|
51
|
+
|
44
52
|
else
|
45
53
|
|
46
54
|
def email
|
@@ -66,6 +74,14 @@ class Mailer < ActionMailer::Base
|
|
66
74
|
email
|
67
75
|
end
|
68
76
|
|
77
|
+
def html_email_with_specific_line
|
78
|
+
email
|
79
|
+
end
|
80
|
+
|
81
|
+
def text_email_with_specific_line
|
82
|
+
email
|
83
|
+
end
|
84
|
+
|
69
85
|
end
|
70
86
|
|
71
87
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
!!!
|
2
|
+
%html(lang="en" xmlns="http://www.w3.org/1999/xhtml")
|
3
|
+
%body
|
4
|
+
%p
|
5
|
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
6
|
+
|
7
|
+
%p
|
8
|
+
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. VERY IMPORTANT SENTENCE. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
|
9
|
+
|
10
|
+
%p
|
11
|
+
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
|
@@ -0,0 +1,5 @@
|
|
1
|
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
2
|
+
|
3
|
+
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. VERY IMPORTANT SENTENCE. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
|
4
|
+
|
5
|
+
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
|
@@ -11,6 +11,8 @@ Rails.application.routes.draw do
|
|
11
11
|
get '/emails/send_html_email_with_links', to: 'emails#send_html_email_with_links'
|
12
12
|
get '/emails/send_text_email_with_links', to: 'emails#send_text_email_with_links'
|
13
13
|
get '/emails/send_html_email_with_linebreaks', to: 'emails#send_html_email_with_linebreaks'
|
14
|
+
get '/emails/send_html_email_with_specific_line', to: 'emails#send_html_email_with_specific_line'
|
15
|
+
get '/emails/send_text_email_with_specific_line', to: 'emails#send_text_email_with_specific_line'
|
14
16
|
|
15
17
|
get '/forms/checkbox_form', to: 'forms#checkbox_form'
|
16
18
|
get '/forms/disabled_elements', to: 'forms#disabled_elements'
|
@@ -286,6 +286,44 @@ Feature: Test Spreewald's email steps
|
|
286
286
|
'''
|
287
287
|
"""
|
288
288
|
|
289
|
+
When I clear my emails
|
290
|
+
And I go to "/emails/send_html_email_with_specific_line"
|
291
|
+
|
292
|
+
Then the following multiline step should succeed:
|
293
|
+
"""
|
294
|
+
Then an email should have been sent with:
|
295
|
+
'''
|
296
|
+
From: from@example.com
|
297
|
+
Reply-To: reply-to@example.com
|
298
|
+
To: to@example.com
|
299
|
+
Subject: SUBJECT
|
300
|
+
|
301
|
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr*
|
302
|
+
*VERY IMPORTANT SENTENCE*
|
303
|
+
Ut wisi enim ad minim veniam*
|
304
|
+
'''
|
305
|
+
"""
|
306
|
+
|
307
|
+
When I clear my emails
|
308
|
+
And I go to "/emails/send_text_email_with_specific_line"
|
309
|
+
|
310
|
+
Then the following multiline step should succeed:
|
311
|
+
"""
|
312
|
+
Then an email should have been sent with:
|
313
|
+
'''
|
314
|
+
From: from@example.com
|
315
|
+
Reply-To: reply-to@example.com
|
316
|
+
To: to@example.com
|
317
|
+
Subject: SUBJECT
|
318
|
+
|
319
|
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr*
|
320
|
+
|
321
|
+
*VERY IMPORTANT SENTENCE*
|
322
|
+
|
323
|
+
Ut wisi enim ad minim veniam*
|
324
|
+
'''
|
325
|
+
"""
|
326
|
+
|
289
327
|
Scenario: /^I follow the (first|second|third)? ?link in the e?mail$/ (HTML e-mail body)
|
290
328
|
When I go to "/emails/send_html_email_with_links"
|
291
329
|
And I follow the first link in the email
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spreewald
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Kraze
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -350,7 +350,9 @@ files:
|
|
350
350
|
- tests/shared/app/views/mailer/email_with_umlauts.text.erb
|
351
351
|
- tests/shared/app/views/mailer/html_email_with_linebreaks.html
|
352
352
|
- tests/shared/app/views/mailer/html_email_with_links.haml
|
353
|
+
- tests/shared/app/views/mailer/html_email_with_specific_line.haml
|
353
354
|
- tests/shared/app/views/mailer/text_email_with_links.text.erb
|
355
|
+
- tests/shared/app/views/mailer/text_email_with_specific_line.text.erb
|
354
356
|
- tests/shared/app/views/spreewald_mailer
|
355
357
|
- tests/shared/app/views/static_pages/click_on.html.haml
|
356
358
|
- tests/shared/app/views/static_pages/home.html.haml
|
@@ -411,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
411
413
|
- !ruby/object:Gem::Version
|
412
414
|
version: '0'
|
413
415
|
requirements: []
|
414
|
-
rubygems_version: 3.
|
416
|
+
rubygems_version: 3.1.2
|
415
417
|
signing_key:
|
416
418
|
specification_version: 4
|
417
419
|
summary: Collection of useful cucumber steps.
|
@@ -584,7 +586,9 @@ test_files:
|
|
584
586
|
- tests/shared/app/views/mailer/email_with_umlauts.text.erb
|
585
587
|
- tests/shared/app/views/mailer/html_email_with_linebreaks.html
|
586
588
|
- tests/shared/app/views/mailer/html_email_with_links.haml
|
589
|
+
- tests/shared/app/views/mailer/html_email_with_specific_line.haml
|
587
590
|
- tests/shared/app/views/mailer/text_email_with_links.text.erb
|
591
|
+
- tests/shared/app/views/mailer/text_email_with_specific_line.text.erb
|
588
592
|
- tests/shared/app/views/spreewald_mailer
|
589
593
|
- tests/shared/app/views/static_pages/click_on.html.haml
|
590
594
|
- tests/shared/app/views/static_pages/home.html.haml
|