Commit Graph

142 Commits

Author SHA1 Message Date
David Remer
8457aa7e2b Remove ToDo comments
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
David Remer
5b93b88f46 Add Tags endpoint
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
Oluwaseun Olorunsola
c4bd2acd84 Update tests
MAILPOET-4649
2022-12-15 18:15:01 +01:00
Jan Jakes
82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
David Remer
8c5222d850 Fix WordPress.Security.ValidatedSanitizedInput.InputNotSanitized and related errors
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
David Remer
7db40b27b5 Fix errors automatically with phpcbf
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
David Remer
d2ec7bba42 Replace instance_of asserts in integration tests
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
David Remer
4832771185 Refactor the captcha system
The current Captcha class has a lot of responsibilities. It renders the captcha
image, can check if a certain captcha type is a Google captcha, if a captcha is
required for a certain email. The SubscriberSubscribeController is not only in
charge of "controlling" the subscription process but also validates, whether a
captcha is correct or not. This architecture made it difficult to extend the
functionality and introduce the audio captcha feature.

Therefore this commit refactors the captcha architecture and tries to seperate
the different concerns into several classes and objects. Validation is now done
by validators.

The CaptchaPhrase now is in charge of keeping the captcha phrase consistent
between the image and the new audio, so that you can renew the captcha and both
captchas are in sync.

[MAILPOET-4514]
2022-11-24 09:20:39 +01:00
Jan Jakes
d1df2d4f42 Add a helper function to create new table
[MAILPOET-4835]
2022-11-21 12:15:10 +01:00
Jan Jakes
c748b80447 Fix timestamp column problems with some MySQL versions and some SQL modes
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
Jan Jakes
725e0ecb00 Remove automation feature flag
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
Jan Jakes
2e328b6d7f Move temporary automation migrator to a new migration
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
Jan Jakes
a60562254c Temporarily fix reinstall test wiping out automation tables
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
9730fb9272 Move the old dbDelta-based migrator to a migration
This will ensure it runs once and from there, it will continue using the new migrations.

[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
f65821256c Run migrations on activation
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Lysý
8161b83ded Add check on list type when deleting list
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
Jan Lysý
ad46d05c6b Add check on list type
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
Jan Lysý
f231f3dc6d Fix type error for list update
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
Jan Lysý
f6a5e0117c Add deleteList test cases
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
Jan Lysý
94a2e54c1e Add test cases for updateList
[MAILPOET-4752]
2022-11-02 14:05:39 +01:00
Sam Najian
0f45727ddc Add a new test case when verifying creator key with API
[MAILPOET-4464]
2022-10-17 12:15:07 +02:00
Jan Lysý
8f38dc451e Add test cases for MP API getSubscribersCount
[MAILPOET-4717]
2022-10-17 09:12:10 +02:00
Rostislav Wolny
b96b549f43 Unschedule cron actions before running migrations
We don't want to run any actions during migrations.
This will also clean duplicate trigger actions
that were potentially created because of requests race conditions.
[MAILPOET-4684]
2022-10-13 14:21:43 +02:00
Jan Lysý
66000fada4 Add test cases for MP API getSubscribers
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
296a47f8e7 Add new API method getSubscribers
[MAILPOET-4716]
2022-10-13 11:12:10 +02:00
Jan Lysý
f1b59173dd Add filters into newsletter response
[MAILPOET-4583]
2022-10-05 14:14:34 +02:00
Jan Lysý
7e6f708df8 Create tags when do not exist
[MAILPOET-4557]
2022-09-28 11:42:51 +02:00
Rodrigo Primo
ef66a21096 Remove old ScheduledTask model from Config\Populator
[MAILPOET-4306]
2022-09-26 14:18:01 +02:00
Oluwaseun Olorunsola
a006701d78 PR feedback: add type hints, create new methods and save on extra api request
MAILPOET-4601
2022-09-26 11:13:40 +02:00
Oluwaseun Olorunsola
32a58301b0 Update test cases in ServicesTest
support sending congratulatory email when sender domain is verified but
no authorized email address

MAILPOET-4601
2022-09-26 11:13:40 +02:00
Oluwaseun Olorunsola
31732dbf3b Update tests, update dependencies
MAILPOET-4601
2022-09-26 11:13:40 +02:00
Rostislav Wolny
d0c65b9446 Cleanup MP API test
[MAILPOET-4295]
2022-09-21 16:02:23 +02:00
Rostislav Wolny
09f5790120 Move getSubscribers integration test into specific test file
[MAILPOET-4295]
2022-09-21 16:02:23 +02:00
Rodrigo Primo
df8ba7351c Replace old SendingQueue model with Doctrine code in SubscribersTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
Rodrigo Primo
85d317015f Replace old Segment model with Doctrine code in SubscribersTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
Rodrigo Primo
4157a864e5 Replace old Subscriber and SubscriberSegment models with Doctrine code in SubscribersTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
Rodrigo Primo
929e5e6081 Replace old CustomField model with Doctrine code in SubscribersTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
Rodrigo Primo
8191af6a23 Replace old models with Doctrine code in SettingsTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
Rodrigo Primo
c3ab2fffec Replace old models with Doctrine code in NewslettersTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
Rodrigo Primo
f19e98091c Replace CustomField model with Doctrine code in CustomFieldsTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
Rodrigo Primo
6bf36d4211 Make sure the subscriber_segment table is truncated
This is necessary while
https://mailpoet.atlassian.net/browse/MAILPOET-4580. Without this
change, leaving entries in wp_mailpoet_subscriber_segment has the
potential to interfere with other tests as it happened in the test added
for the ticket MAILPOET-4365:

https://app.circleci.com/pipelines/github/mailpoet/mailpoet/11041/workflows/8cca6607-2e24-4529-a8ad-cf9a0c663180/jobs/191334/tests#failed-test-0

See MAILPOET-4580 for more details.

[MAILPOET-4365]
2022-09-19 13:35:39 +02:00
Rostislav Wolny
79e11fe939 Move MP API addSubscriber tests under Subscribers class tests
[MAILPOET-4293]
2022-08-18 12:08:30 +02:00
Rostislav Wolny
2356c62be3 Refactor MP API addSubscriber to doctrine
[MAILPOET-4293]
2022-08-18 12:08:30 +02:00
Rostislav Wolny
5d3c851d02 Change order of MP API subscribe/unsubscribe calls checks to be backward compatible
In the previous version we checked the lists parameter before the subscriber.
[MAILPOET-4291]
2022-08-17 13:20:39 +02:00
Rostislav Wolny
877fd9d7da Move MP API unsubscribe from list test to a separate file
[MAILPOET-4291]
2022-08-17 13:20:39 +02:00
Rostislav Wolny
c3251f4092 Refactor MP API unsubscribe from lists to doctrine
[MAILPOET-4291]
2022-08-17 13:20:39 +02:00
Oluwaseun Olorunsola
9e5f1d0ff0 Implement Show sender domain warning for settings
This would show the sender domain warning message for
domains that are not verified and have a Retricted DMARC Policy

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Rostislav Wolny
1d4ec47b25 Move tests for addList under the related service test
[MAILPOET-4294]
2022-08-04 13:31:53 +02:00
Jan Lysý
c6d284cb32 Move lists testing to the separate class
[MAILPOET-4292]
2022-07-14 11:29:09 +02:00
Jan Lysý
e8b94761e5 Add tags into listing response
[MAILPOET-4441]
2022-07-14 10:37:49 +02:00