The legend html was not escaped and was ignoring block settings coming
from the form editor.
This commit adds a new helper function for rendering legend that respects
applies block settings and also escapes the output.
[MAILPOET-4471]
Previously the reset was applied to .mailpoet_form class but manage subscription form
which also uses these form blocks doesn't have the class.
This commit moves the reset to an internal class that wraps every input and is used
also in the manage subscription page.
[MAILPOET-4471]
Added a 'type-message' for Parsley to display an error message when the input field is filled in incorrectly.
Also removed the global Parsley message to prevent it from overruling the 'required-message'.
[MAILPOET-4471]
Add styling for the fieldsets to avoid getting the default styling with the black border and unecessary padding and margin.
Applying default or theme styles would cause a BC break for existing forms.
[MAILPOET-4471]
Made checkboxes in a form accessible according to the WCAG-standards by adding a fieldset around them and adding a legend describing the fieldset's purpose
(name).
[MAILPOET-4471]
The default scheduled tasks should be setup so that there is no need to run cron and no background job is triggered in tests.
The previous setup was not covering case when MSS is set as active.
[MAILPOET-4274]
This was causing flakiness of acceptance test ReinstallFromScratchCest.php:reinstallFromScratch
and also potential issue for production.
In Activator::deactivate we remove MailPoet's DB tables. This takes some time.
In case there is another request during the deletion it may detect some tables are missing and trigger activation
and we end up creating MailPoet tables and removing them at the same time.
This commit adds locking to deactivate method so that any other attempt for activation ends up with an error.
[MAILPOET-4274]
We use action_scheduler_maximum_execution_time_likely_to_be_exceeded filter for reading remaining execution limit
tracked in the Action Scheduler runner.
Then we use the remaining limit minus safety margin for the daemon execution.
[MAILPOET-4274]
Clicking on Send button triggers ActionScheduler and it may take longer
then 2 seconds. In such case the test ends up reloading on send page instead of
newsletter listing page.
This commit fixes the issue by adding wait for newsletter listing.
[MAILPOET-4724]
This commit adds waiting for listing to finish loading before checking presence of
a customer email. We do it in other tests that work with listing, but it was missing
in this place.
[MAILPOET-4274]
The test was randomly failing when asserting subscriber state within subscriber edit form
and was also failing when attempting to click inactive subscribers filter in subscribers listing.
I found that both these issues were related to the web driver clicking too early when the form or
the list was still being rendered by React.
In this commit, I fixed those by adding some waiting on some elements and making sure the subscriber edit form is
already rendered.
The failures were flaky, and I could not identify what exactly caused these tests to start failing.
It is possible that some changes on the backend slightly affected API requests duration and the change in timing of rendering
was big enough to cause the flakiness.
[MAILPOET-4274]
It may take up to one minute for Action Scheduler to start.
This commit adds a helper method that sets WP Cron trigger for action scheduler and
MailPoet action in Action Scheduler to run immediately and triggers WP Cron
that triggers action scheduler by page reload.
[MAILPOET-4274]
Action Scheduler uses WP Cron as trigger.
When it is initially locked it takes more time for Action Scheduler to start
and some tests that rely on background job fail with timeout.
[MAILPOET-4274]
When users click send email in UI, they need to wait a minute or more to
see some emails started going out.
This commit adds additional trigger into sending queue API.
If emails is set to send it triggers Action Scheduler immediately.
Users will get immediate feedback that emails are sending.
[MAILPOET-4274]
CronWorkerRunner sets internal timer in its constructor function.
This works fine in classic web page request. But in integration tests
in might be created and cached in DI, so for some late running tests
it throws timeout exception.
This commit fixes the issue by using fresh instance of CronWorkerRunner
instead of "cached" one from DI container.
[MAILPOET-4274]
In afterProcess callback we trigger a new runner when there are still some scheduled tasks
to process. Before this change we did this for every action scheduler run and it was causing that
we triggered more HTTP requests than needed.
[MAILPOET-4274]
The http_build_query used in guzzle/src/Client.php
is not compatible with PHPv8.0+ since it accepts null as
second parameter while in newer versions of PHP this is
either deprecated or removed
[PREMIUM-199]