-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes unstable email integration tests #27892
Fixes unstable email integration tests #27892
Conversation
…which had a maximum line length of 76 to a parseable string without a maximum line length, so there is no chance a particular string used in an assertion is getting splitted over multiple lines - Part 2.
Hi @hostep. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
I've addressed that in: #27606 magento2/dev/tests/integration/testsuite/Magento/Customer/Controller/Account/EmailTemplateTest.php Lines 170 to 181 in d4b8083
Using DOM structure instead of There's also ticket to introduce DOM assertions: |
Aha, thanks for the info @lbajsarowicz! Let me try to update this PR to use the same DOM assertions then. |
3ec905f
to
69fcf67
Compare
@lbajsarowicz: updated PR (rebased on latest Before we fix all the occurrences (I count about 16 more classes using the
Thanks! |
@hostep assertContains won't work with string anymore https://phpunit.readthedocs.io/en/9.0/assertions.html It's replacement is assertStringContainsString |
I came by that article indeed, and tested |
Could you change this to |
Hmm, I'd rather solve this as fast as possible, because the unstable email integration tests cause failures in this very good PR: #27888 If you want me to revert back to my old changes or keep this half-finished work and merge that first. And later handle a better way of handling it, that's also fine by me. |
Yeah, so choose the MVP, and later on we'll do it the right way : ) |
69fcf67
to
3ec905f
Compare
Ok, I've reverted to my initial changes. I've pushed my other changes to a different branch, just in case if somebody wants to get some inspiration from them: hostep/magento2@c163118...first-part-to-fix-issue-27607 when trying to fix #27607 |
Hi @ihor-sviziev, thank you for the review. |
✔️ QA Passed |
Hi @hostep, thank you for your contribution! |
Description (*)
This is re-adding the fixes added in #25296
Following changes made the email integration tests unstable again:
Related Pull Requests
Should fix integration tests which now fail in #27888
Fixed Issues (if relevant)
Manual testing scenarios (*)
See #25296
Questions or comments
Can we do something to avoid Magento core devs for re-introducing this incorrect way of testing email content?
Contribution checklist (*)