Commit Graph

85 Commits

Author SHA1 Message Date
cd5a023b35 Move onSettingsChange from Bridge service to SettingsChangeHandler
Bridge is a low level service that processes requests and responses to/from Bridge API.
This change is needed so that we can remove dependency on MailPoet\Util\License\Features\Subscribers
service from the Bridge. The dependecy is a higher level service and may easily cause a circular dependency issue.

The SettingsChangeHandler is service for handling side effects
when saving settings. This feels as a better place to put the functionality.
[MAILPOET-5191]
2023-05-10 13:05:37 +02:00
6c2cda36b0 Run custom field data through sanitizer when saving via API
[MAILPOET-5241]
2023-04-24 13:26:31 +02:00
e7f766aedf Remove empty _afters
MAILPOET-5145
2023-04-07 12:11:12 -05:00
376dca1098 Remove unnecessary truncating
MAILPOET-5145
2023-04-07 12:11:12 -05:00
cd0b795ac8 Extract customer creation/cleanup
This also ensures that cleanup always runs after all integration tests

MAILPOET-5145
2023-04-07 12:11:12 -05:00
c75bc388c9 Remove unnecessary cleanup code
MAILPOET-5145
2023-04-07 12:11:12 -05:00
685af267cb Use constant, improve test and naming
[MAILPOET-5131]
2023-04-03 12:57:31 +02:00
c0eed5b919 Integration tests for provisioning
[MAILPOET-5131]
2023-04-03 12:57:31 +02:00
0795c2ffff Expose the log for corrupted newsletter on listing page
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
678911a8bc Fix PHPStan baseline errors in a few integration test files
[MAILPOET-4037]
2023-02-23 14:13:17 +01:00
623010a644 Use dataprovider and clean up early
[MAILPOET-4883]
2023-02-15 12:30:41 +01:00
95ec3d2fb9 Add integration test to ensure posts are probperly fetched
[MAILPEOT-4883]
2023-02-15 12:30:41 +01:00
ad4247a241 Add API endpoint to delete a setting
[MAILPOET-4814]
2023-01-30 15:01:42 +01:00
40f4216ff8 Add method for getting WC coupons
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
5802f2132d Use badRequest method instead of throwing an InvalidState exception
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
8e502e5f50 Rename save method to create
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
8457aa7e2b Remove ToDo comments
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
5b93b88f46 Add Tags endpoint
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
c4bd2acd84 Update tests
MAILPOET-4649
2022-12-15 18:15:01 +01:00
82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
7db40b27b5 Fix errors automatically with phpcbf
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
d2ec7bba42 Replace instance_of asserts in integration tests
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
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
d1df2d4f42 Add a helper function to create new table
[MAILPOET-4835]
2022-11-21 12:15:10 +01:00
c748b80447 Fix timestamp column problems with some MySQL versions and some SQL modes
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
725e0ecb00 Remove automation feature flag
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
2e328b6d7f Move temporary automation migrator to a new migration
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
a60562254c Temporarily fix reinstall test wiping out automation tables
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
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
f65821256c Run migrations on activation
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
0f45727ddc Add a new test case when verifying creator key with API
[MAILPOET-4464]
2022-10-17 12:15:07 +02:00
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
f1b59173dd Add filters into newsletter response
[MAILPOET-4583]
2022-10-05 14:14:34 +02:00
7e6f708df8 Create tags when do not exist
[MAILPOET-4557]
2022-09-28 11:42:51 +02:00
ef66a21096 Remove old ScheduledTask model from Config\Populator
[MAILPOET-4306]
2022-09-26 14:18:01 +02:00
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
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
31732dbf3b Update tests, update dependencies
MAILPOET-4601
2022-09-26 11:13:40 +02:00
df8ba7351c Replace old SendingQueue model with Doctrine code in SubscribersTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
85d317015f Replace old Segment model with Doctrine code in SubscribersTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
4157a864e5 Replace old Subscriber and SubscriberSegment models with Doctrine code in SubscribersTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
929e5e6081 Replace old CustomField model with Doctrine code in SubscribersTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
8191af6a23 Replace old models with Doctrine code in SettingsTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
c3ab2fffec Replace old models with Doctrine code in NewslettersTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
f19e98091c Replace CustomField model with Doctrine code in CustomFieldsTest
[MAILPOET-4378]
2022-09-20 15:54:19 +01:00
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
37c681259f Use data factories for generating entities
[MAILPOET-4440]
2022-07-12 13:35:00 +02:00
8399f37860 Reuse NewsletterOption factory
[MAILPOET-4440]
2022-07-12 13:35:00 +02:00
6aa4beb4dc Remove empty test
[MAILPOET-4432]
2022-07-04 14:04:16 +03:00
445d07ac68 Prevent segmentation of automation emails
[MAILPOET-4432]
2022-07-04 14:04:16 +03:00