-
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
Test coverage for PR #27589 (E-mail templates) #27606
Test coverage for PR #27589 (E-mail templates) #27606
Conversation
Hi @lbajsarowicz. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
$emailDom->loadHTML($messageContent); | ||
|
||
$emailXpath = new \DOMXPath($emailDom); | ||
$greeting = $emailXpath->query('//p[@class="greeting"]')->item(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like if '//p[@class="greeting"]'
will not found then it will lead to a fatal error
"Call method item() on no-objetc"
Please check it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressing the issue.
{ | ||
$messageContent = $this->getMessageRawContent($message); | ||
$emailDom = new \DOMDocument(); | ||
$emailDom->loadHTML($messageContent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can introduce new "assert class" and put in
https://github.com/magento/magento2/tree/2.4-develop/dev/tests/integration/framework/Magento/TestFramework
Assert
namespace.
We achieve 2 goals:
- working with DOM will be encapsulated ;
- we can reuse the "assert" in the other testcases;
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to create separate ticket for that point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to create separate ticket for that point.
Please link this and a new ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @naydav, thank you for the review.
|
@slavvka Sorry, I haven't noticed your message. Sure I'm going to fix the failing issue. |
…27589-email-integration-tests
@slavvka Failures were not related. |
Hi @slavvka, thank you for the review. |
Hi @lbajsarowicz, thank you for your contribution! |
Description (*)
Additional Integration Tests coverage for PR provided by @ptylek
Related Pull Requests
Fixed Issues (if relevant)
Related issues
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)