Commit Graph

32 Commits

Author SHA1 Message Date
87ced17813 Use submit button label of form for captcha submit button
[MAILPOET-4496]
2022-09-14 11:44:09 +02:00
381565fc1f Improve integration ManageTest class
[MAILPOET-4350]
2022-08-01 13:28:57 +02:00
fb05cc4297 Remove old model from Manage
[MAILPOET-4350]
2022-08-01 13:28:57 +02:00
955731eeb5 Replace Paris models with Doctrine entities in FormTest
[MAILPOET-4380]
2022-07-26 16:16:47 +02:00
ad29073715 Replace Paris models with Doctrine entities in Subscription\Captcha
[MAILPOET-4351]
2022-07-13 16:09:41 +02:00
282bea4cfb Remove old model usage from NewSubscriberNotificationMailerTest
[MAILPOET-4352]
2022-07-13 15:36:14 +02:00
d340909187 Replace repeating code with using factory
[MAILPOET-4141]
2022-06-20 12:00:47 +02:00
0dc35da401 Improve autocomplete accessibility for names in forms
Changed the autocomplete attributes for input fields: 'first_name' & 'last_name' to comply with the WCAG-standards for autocompletion.
[MAILPOET-4408]
2022-06-13 17:15:44 +02:00
81bfbd5bf4 Add autocomplete attribute for text inputs in forms
[MAILPOET-4284]
2022-05-16 13:15:59 +02:00
d019ad9bdb Remove using Idiorm and replace it by Doctrine
[MAILPOET-4137]
2022-04-25 10:58:18 +02:00
Sam
f92b6a2e1e Revert "Revert "Fix a failing test with too much dependecy on db state""
This reverts commit 8aa2565e17.
2022-04-18 11:43:47 +02:00
8aa2565e17 Revert "Fix a failing test with too much dependecy on db state"
This reverts commit 5f5a4d576f.
2022-04-11 16:30:59 -03:00
5f5a4d576f Fix a failing test with too much dependecy on db state
[MAILPOET-4082]
2022-04-11 14:54:56 -03:00
eb07872d13 Disable segments validation when form ID is empty
[MAILPOET-4155]
2022-04-11 15:30:48 +02:00
fc1f3e6dc2 Inline generateToken for clarity
The only thing Security::generateToken was providing was a default value
 for the $action, which created a pattern of using the same $action
 everywhere, which may not be the best way to go.

 Since it was essentially a wrapper for WP's built-in nonce functions,
 it seemed clearer to use those functions directly to be more explicit
 about how we're handling tokens.

[MAILPOET-2030]
2022-04-11 10:29:35 +02:00
2e374d1a3b Remove unused property from Pages
[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
e806a1288b Update test to reduce flakiness
This test was failing sometimes on CircleCI. Using isToday() instead of
checking if the seconds match should reduce flakiness and is enough for
what we need to test.

[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
17f562a9c5 Remove last usages of Subscriber model from the Pages class
[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
794c7eb16f Improve test coverage for ManageSubscriptionFormRenderer
This commits improves the test coverage for
ManageSubscriptionFormRenderer by creating two custom fields for the
test subscriber and checking that those custom fields are included in
the output returned by ManageSubscriptionFormRenderer::renderForm().

[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
ee4df28cc3 Fix a bug in ManageSubscriptionFormRendererTest
The test class ManageSubscriptionFormRendererTest creates a subscriber
with a segment. But when calling $this->formRenderer->renderForm(), it
was passing the subscriber without information about its segments. This
meant that the output returned by renderForm() wrongly had the list of
segments without the subscriber segment checked.

This commit fixes this problem by passing the subscriber with the
segments to renderForm() and changing the expected HTML that should be
returned.

[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
bb47db85b8 Improve PagesTest::testItUnsubscribes()
This commit improves the test PagesTest::testItUnsubscribes() but adding
a segment to the subscriber and making sure that the status of the
SubscriberSegmentEntity changes when Pages::unsubscribe() is called.
Before this change, the test was not covering this part of the execution
path of the tested code.

[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
74bb3be3da Replace remaining Paris models with Doctrine entities in PagesTest
This commit replaces the old Paris models Newsletter, NewsletterOption and
NewsletterOptionField with the correspondent Doctrine entities.

[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
250e450c82 Replace most usages of old Subscriber model with SubscriberEntity in the Pages class
[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
84d49caa33 Add integration test to check that unconfirmed data is persisted
This commit adds an integration test to check that unconfirmed data is persisted
when Pages::confirm() is called and the subscriber has some unconfirmed
data set. Before there was no test covering this part of the code.

[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
d613ac16aa Replace old SendingQueue model with Doctrine entity in PagesTest
[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
123a27a6bb Replace old Subscriber and SubscriberSegment models with Doctrine
This commit replaces the old Subscriber and SubscriberSegment models
with Doctrine entities in the class PagesTest.

[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
14aa6eb3a5 Replace old Subscriber model with SubscriberEntity in PagesTest
[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
fbf8aeb07f Replace Idiorm\ORM with MailPoetTest::truncateEntity() in PagesTest
[MAILPOET-4020]
2022-04-04 16:24:21 +02:00
86d934ba36 Add hook for segment subscription
This will be used for a "SegmentSubscribed" trigger for automation
that can trigger welcome emails and other actions.

[MAILPOET-4136]
2022-03-14 09:36:21 +01:00
ff9e1dc6be Update a string displayed in the manage subscriptions page
Change to make the meaning of the sentence more clear.

[MAILPOET-4068]
2022-02-09 16:34:18 +01:00
3f07e591c8 Fix integration tests compatibility with PHP 8.1
[MAILPOET-4053]
2022-01-19 13:14:42 +01:00
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00