Comments (3)
Your example has revealed many more problems in the email steps:
When you indent a header line, it won't be recognized as part of the header. So in 3.0.2 your test was green, because the line was ignored. This was NOT introduced in 3.0.3 and seems to be a much older error. We have to investigate this further.
Since 3.0.3 such a line will be mistakenly treated as part of the body. We should strip the lines before checking for a header line.
In 3.0.2 (and before) you can write almost everything in header-like style, e.g.:
Then an email should have been sent with:
"""
FOOBAR: This line will be ignored
"""
and the step will succeed. Also for 3.0.3.
Conclusion: We have to rework the MailFinder and investigate how long this is an issue.
from spreewald.
Before Spreewald 3.0.3, the general email step was able to assert mails without their text bodies.
I've taken a look at the mail steps today as well. Does the following work for you?
Then an email should have been sent with:
"""
Subject: My subject
*
"""
I added a comment to the README of Spreewald a few minutes ago that the behavior of matching body lines has changed in recent versions. Before, lines that were not mentioned were omitted, now the asterisk is needed for that.
from spreewald.
I tested again and the asterisk is not necessary in case you only want to test the header. @FLeinzi had the correct suspicion
from spreewald.
Related Issues (20)
- HTML email's text representation includes too many linebreaks HOT 4
- Mail steps: Spreewald >2.9 does not work reliably without premailer-gem
- Email steps: I can't check for a specific sentence within the body if it doesn't start a new line HOT 1
- "an email should have been sent with" step behaves incorrectly when not specifying headers HOT 1
- Poll: Integrate iframe-steps into spreewald HOT 2
- Add patiently block to /^the "([^\"]*)" (field|button|checkbox|radio button) should( not)? be disabled$/
- Rework "field should have the error" and "field should( not)? have an error " steps HOT 1
- Multiple invocations of "console" step will fail
- Broken step: Show me the email
- No matches with the "I follow the link in the email" step
- Better error message for "I follow the link in the email"
- Force decoupled tabs
- Step `I should see 'some string with "double" quotes'` should allow negation
- Installation instructions are confusing to newcomers HOT 1
- Deprecation warning with Rails 7.0
- Support for Ruby 3 for step `/^(.*) within (.*[^:])$/` HOT 1
- Mails: Strip whitespace from the beginning of lines HOT 3
- Ruby 3.0 support for `When /^(?:|I )attach the file "([^"]*)" to "([^"]*)"$/` HOT 1
- patiently retries to few times when Capybara uses its own retry feature HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spreewald.