Commit Graph

22617 Commits

Author SHA1 Message Date
0041a060b6 Improve check for recently scheduled tasks for sending action.
[MAILPOET-6155]
2024-08-07 16:01:48 +02:00
b2c7f49a41 Improve TimestampListener to use the current time for now instead of "cached" value
Using now "cached" on the TimestampListener instance was causing us to set createdAt and updatedAt slightly in the past.
It was potentially problematic in tests where the TimestampListener lives a long time or in long requests, such as a cron request.

[MAILPOET-6155]
2024-08-07 16:01:48 +02:00
8a0bd75cb1 Limit scheduled tasks fetching by automation run createdAt
This is a performance optimization to avoid fetching too many scheduled task rows.
Run is always created before the scheduled task which is created in send action step.
[MAILPOET-6155]
2024-08-07 16:01:48 +02:00
e5ab65f28e Fix send action checkSendingStatus to support multiple emails per subscriber.
It is possible that one email (e.g., purchase in category) is sent multiple times
to the same subscriber.

AutomationEmailScheduler::getScheduledTaskSubscriber was selecting the task based on subscriber and newsletter.
In the case of multiple emails sent to one subscriber, the method failed to pick ScheduledTaskSubsrciberEntity because
the query was fetching multiple results, but getOneOrNullResult expects only one result.

This commit fixes it by adding additional filtering by $runId to get the ScheduledTaskSubsriberEntity associated
with the correct run.

I did the filtering in PHP because an alternative would be using LIKE %% in the query. The meta column is text.
[MAILPOET-6155]
2024-08-07 16:01:48 +02:00
38b3fbe6fc Remove line-height from small variants of inputs
It was causing descender to be cut off. Removing it doesn't change the overall height of the input

[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
c62fbda4df Add tracking for opt-in position
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
6a155ec454 Update migration to only check for presence of the setting, without version check
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
e640fa10cb Add default value for opt-in position to Populator
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
13e45a960f Add migration so existing active installations remain opt-in checkbox position
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
588f942640 Test all combinations of opt-in checkbox positions on block and shortcode checkout with AutomateWoo
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
59733db6de Fix hiding AutomateWoo opt-in checkbox when MailPoet opt-in is in different position
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
60895570af Add acceptance tests for opt-in checkbox positions on shortcode checkout page
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
9698795c7a Improve AutomateWoo integartion tests by checking both block and shortcode checkout pages
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
0da59169b9 Improve opt-in message test by checking both block and shortcode checkout pages
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
9f42614f92 Differentiate between block and shortcode checkout in tests
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
aca259068a Allow setting opt-in message in tests
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
02a148ef84 Use proper hook based on opt-in position setting
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
334756d18f Change the condition to check if opt-in on checkout is enabled to be easier to read
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
1c9ebb960f Add opt-in position setting
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
1200565a7f Use __() for translations in checkout-optin setting
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
80a7d3c5d7 Trigger abandoned cart check on WP user login
[MAILPOET-6161]
2024-08-07 12:45:42 +02:00
1115771b50 Release 4.58.1 2024-08-06 15:42:02 +02:00
b61d7f7b22 Add default value for only-tests parameter
The default value in the compile:all command was missing, which caused an error.
[MAILPOET-6178]
2024-08-06 13:31:15 +02:00
c5c89c400a Add comment to Circle config
[MAILPOET-6159]
2024-08-06 10:17:36 +02:00
644a963b01 Update PHP script updating used WordPress
[MAILPOET-6159]
2024-08-06 10:17:36 +02:00
5c16babf7b Add closing notice on Settings page in acceptance tests
[MAILPOET-6159]
2024-08-06 10:17:36 +02:00
4e8b7b7f34 Add command updating WP database to docker-entrypoint.sh
[MAILPOET-6159]
2024-08-06 10:17:36 +02:00
f86687ae1c Use WordPress image with oldest PHP and install specific WP version
Because required WordPress version does not have official images we need to install specific version via CLI.
[MAILPOET-6159]
2024-08-06 10:17:36 +02:00
c8e6c02851 Fix "Return value must be of type int, null returned" in Action Scheduler wrappers
[MAILPOET-6179]
2024-08-05 20:35:32 +03:00
1a80227b03 Fix button width when parent column is smaller
[MAILPOET-5732]
2024-08-05 14:09:31 +02:00
61e596e9d2 Fix width of button wrapping table
[MAILPOET-5732]
2024-08-05 14:09:31 +02:00
3a2d18308b Update integration tests
[MAILPOET-5732]
2024-08-05 14:09:31 +02:00
557e73e4cc Wrap email button to table for compatibility with Outlook 2023
[MAILPOET-5732]
2024-08-05 14:09:31 +02:00
a664186108 Unify setting no-cache headers, use only relevant headers
See also: https://stackoverflow.com/questions/49547/how-do-we-control-web-page-caching-across-all-browsers

[MAILPOET-6038]
2024-08-05 13:28:52 +02:00
ee6e22efa3 Regenerate CAPTCHA phrase using a custom request with cachebust to avoid caching
[MAILPOET-6038]
2024-08-05 13:28:52 +02:00
758cb09a77 Check for audio file existence before sending headers
[MAILPOET-6038]
2024-08-05 13:28:52 +02:00
975f42c56c Remove unnecessary check (it checks for image requirements, not audio)
[MAILPOET-6038]
2024-08-05 13:28:52 +02:00
38f7d97283 Compress captcha audio files more aggressively
This reduces the size of the files combined from 224KB to 64KB.

The command used was:

for f in originals/*.mp3; do ffmpeg -i "$f" -c:a libmp3lame -af "highpass=f=200, lowpass=f=15000, afftdn=nf=-30, anlmdn=s=1, rubberband=pitch=1.05, volume=1.5" -b:a 8k -ac 1 -ar 8000 "${f##*/}"; done

[MAILPOET-6038]
2024-08-05 13:28:52 +02:00
fad5e629af Simplify renderAudio and renderImage
[MAILPOET-6038]
2024-08-05 13:28:52 +02:00
71d7f46718 Make captcha session stateless
[MAILPOET-6038]
2024-08-05 13:28:52 +02:00
e8cf3d61ef Make captcha phrase stateless
[MAILPOET-6038]
2024-08-05 13:28:52 +02:00
10ef9ffce5 Initialize CAPTCHA session and phrase on page load
Previously, a new CAPTCHA phrase was generated when the CAPTCHA image
or audio was requested "again". For that, a counter needed to be stored in the
session, and since image and audio were fetched in parallel, any of them could
initialize the new CAPTCHA phrase. The problem appeared when they both
generated a new phrase at the same time. This resulted in a race condition,
where the image and audio had different CAPTCHA phrases and some users
weren't able to pass the CAPTCHA at all. This was occuring especially in Safari,
(maybe somehow due the type dectection range "preflight" request).

Now, the phrase is initialized on the CAPTCHA page load (and reloaded via AJAX),
so we don't need to store any additional metadata, apart from the phrase itself.

[MAILPOET-6038]x
2024-08-05 13:28:52 +02:00
3b0dd085bd Update Create an account label 2024-08-05 13:07:49 +02:00
784d7c1189 Move building Newsletter tests to their job
[MAILPOET-6178]
2024-08-05 12:31:08 +02:00
e2e1346649 Use skipping test in build all command
[MAILPOET-6178]
2024-08-05 12:31:08 +02:00
d12f88e80c Fix typo in filename, which prevents removing the file on case sensitive file systems
[MAILPOET-6172]
2024-08-02 12:03:45 +02:00
f2e048282a Reset terminal color
This caused that all output below this was in red color, even if it's unrelated to this script

[MAILPOET-6172]
2024-08-02 12:03:45 +02:00
e28faf837d Fix flaky ReceiveScheduledEmailCest test
[MAILPOET-6172]
2024-08-02 12:03:45 +02:00
d7330a1f65 Fix flaky ScheduleNewsletterCest test
[MAILPOET-6172]
2024-08-02 12:03:45 +02:00
83da3ada72 Fix typo causing all options to have the same key
Console Warning: Encountered two children with the same key, `option-8:00 am`.

[MAILPOET-6172]
2024-08-02 12:03:45 +02:00