Commit Graph

21439 Commits

Author SHA1 Message Date
Brezo Cordero
5735d21e4d Remove isDomainDmarcRestricted
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
7f6b66cf8f Remove checkSenderEmailDomainDmarcPolicy
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
2d81d61c26 Improve notice text
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
c66a3b6db7 Fix setting state on showSenderDomainError
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
24bcb7633f Only show warnings for existing users until enforcement date
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
45423a8e62 Refactor functions to AuthorizedSenderDomainController
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
d84d97e7ca Refactor SenderDomainNoticeBody
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
ba627e9d2c Add sender domain limits to window
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
8c068c0232 Refactor sender domain limits
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
f03617edcc Fix concatenating input in test
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
2472941159 Do not display sender domain notice if invalid email
To avoid stacking warnings.

[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
cfb3304186 Add isPartiallyVerifiedDomain to SenderField
And show the SenderDomainWarning by default.

[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
a4905d0f61 Add isPartiallyVerifiedDomain to DefaultSender
And show the SenderDomainWarning by default.

[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
dd332fd98b Use SenderDomainInlineNotice
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
ec16bc7af1 Add SenderDomainInlineNotice component
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
5545865a73 Add partially verified domains to Window
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Brezo Cordero
1a3d836cb0 Add InlineNotice component
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Jan Lysý
bc96ad9651 Add check if preview is already sending
[MAILPOET-5764]
2024-01-14 18:51:15 +05:00
Jan Lysý
082276b6f1 Set focus on modal opening to text input
[MAILPOET-5764]
2024-01-14 18:51:15 +05:00
Jan Lysý
d5d17cae29 Add keyDown event for submitting preview on pressing enter key
[MAILPOET-5764]
2024-01-14 18:51:15 +05:00
John Oleksowicz
1ab2cfe360 Require positive numbers for days field
MAILPOET-5373
2024-01-14 18:40:17 +05:00
John Oleksowicz
dda7da465f Update # of orders filter for orders with coupon
MAILPOET-5373
2024-01-14 18:40:17 +05:00
John Oleksowicz
09a5a5cbbc Map number of orders with coupon code
MAILPOET-5373
2024-01-14 18:40:17 +05:00
John Oleksowicz
09563b5bc9 Update frontend to include # orders with coupon code filter
MAILPOET-5373
2024-01-14 18:40:17 +05:00
Pavel Dohnal
fdec5e819a Fix tag mismatch
[MAILPOET-5827]
2024-01-12 13:29:53 +01:00
Jan Jakes
9019c81dc1 Add a simpler fix for inverse side entity relationship
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Jan Jakes
94d044b5f7 Add a simpler fix for inverse side entity relationship
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
e96251db7e Fix bug when changing ScheduledTask in_progress field
In 3394568, SendingQueue::stopProgress() was refactored to use Doctrine
but a typo introduced a bug causing this method to set
ScheduledTaskEntity::inProgress to true instead of false:

3394568792 (diff-3a26b2d8faf9cc01efd5aef47b058c088c0de01b8074c3be7cefd9adb77fbaaaR551)

This luckly was caught by the
EditorCouponCest.php:seeNoticeWhenCouponCantGenerateAndResumeSending
acceptance test.

This commit fixes the problem and also adds two integration tests to
protect against similar regressions in the future.

[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
6c176450c0 Remove tests for \MailPoet\Tasks\Sending methods that were removed
Sending::removeSubscribers() and Sending::saveSubscriberError() were
removed in a previous commit but the tests were not.

[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
97cdd9e665 Remove Newsletter model from NewsletterSaveController
The code that was still using the newsletter model was not needed
anymore so it was simply removed.

[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
b2c2be4fb6 Update call Newsletter::preProcessNewsletter()
Newsletter::preProcessNewsletter() was refactored in a previous commit
to use Doctrine instead of Paris. As a result, the signature of this
method was changed, but one call was left using the old signature and
passing a Paris model instead of a Doctrine entity. This commit fixes
this issue.

[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
0604d97212 Improve test coverage for SendingQueue::processSending()
While working on the previous commit, I noticed that we had a test to
check removing subscribers that are not part of a segment associated
with a newsletter when sending
(testItRemovesSubscribersFromProcessingListWhenNewsletterHasSegmentAndSubscriberIsNotPartOfIt()).
But SendingQueue::processSending() also handles removing subscribers
when sending newsletters without segments. And there was not test to
cover this part of the code.

[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
876a9489a4 Replace \MailPoet\Tasks\Sending with Doctrine in SendingQueueTest
This commit also removes Sending::getSendingQueueEntity() as the last
calls to this method were removed when refactoring SendingQueueTest.

[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
75f7ea24a9 Rename createQueueWithTaskAndSegment() to createQueueWithTask()
Removed `AndSegment` from test helper method to better reflect what it does as it does not create a segment.

[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
e7416c247c Fix error after refactor of SendingErrorHandler
In 862c395d3263f30057aef73a14704345e181dde3, SendingErrorHandler was
refactored to replace the `\MailPoet\Tasks\Sending` class with Doctrine
code. Inside `processSoftError()`, a call to
`$sendingTask->saveSubscriberError()` was replaced with a call to
`$this->scheduledTaskSubscribersRepository->saveError()`. The problem is
that the former updates the processed and unprocessed counts in the
QueueEntity while the later doesn't.

This commit fixes this issue by calling
`$this->sendingQueuesRepository->updateCounts()` inside
`processSoftError()`.

[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
7bb40664cc Replace ScheduledTask model with Doctrine in SendingQueueTest
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
5891e09418 Replace simple uses of Newsletter and Subscriber models with Doctrine
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
90b56d3aa8 Replace model ScheduledTaskSubscriber with Doctrine in SendingQueueTest
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
d2e226a932 Fix SendingQueueTests after Doctrine refactor
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
3b38b3034a Update calls to SendingQueue worker constructor in SendingQueueTest
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
9c0eea54f8 Rewrite NewsletterTest using Doctrine
testItLogsErrorWhenExistingRenderedNewsletterBodyIsInvalid() was removed
because since 0e13cd02c31baef706f852664570e3ddb014f56d,
preProcessNewsletter() doesn't throw an exception anymore for an invalid
newsletter body:

0e13cd02c3 (diff-449c06813489ce1e60006fdd40b4f23eb3a0cf290ff84b703dcee44b04435eadL142)

Presumably, this is because Doctrine won't allow the code to save an
invalid body.

testItLogsErrorWhenNewlyRenderedNewsletterBodyIsInvalid() was removed
because it doesn't seem to test what it was supposed to test and it is
not trivial to make it work. Even on trunk this test was passing because
`self::fail('Sending error exception was not thrown.')` throwns an
exception and not because preProcessNewsletter() was throwing an
exception.

[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
af43185373 Improve SendingQueue factory
This commit improves the SendingQueue factory by refreshing the
associated ScheduledTaskEntity. Without this, calling
ScheduledTaskEntity::getSendingQueue() returns null which is not
correct.

[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
70085c40bb Rewrite SendingErrorHandlerTest using Doctrine
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Rodrigo Primo
cd7a5c7943 Rewrite LinksTest using Doctrine
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Jan Jakes
e3ff7ccaca Remove remaining usages of MailPoet\Task\Sending from SendingQueue::processSending()
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Jan Jakes
fa266dadcd Rewrite SendingErrorHandler using Doctrine
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Jan Jakes
7e45fb1c79 Rewrite SendingQueue::sendNewsletter(), sendNewsletters(), and processSendResult() using Doctrine
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Jan Jakes
586ef334b0 Rewrite SendingQueue\Tasks\Newsletter::prepareNewsletterForSending() using Doctrine
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Jan Jakes
44c5ae5664 Pass Doctrine entity into SendingQueue::processQueue(), replace simple usages
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00
Jan Jakes
ec792b30df Rewrite SendingQueue\Tasks\Newsletter::preProcessNewsletter() using Doctrine
[MAILPOET-5682]
2024-01-12 13:25:46 +01:00