Commit Graph

19873 Commits

Author SHA1 Message Date
John Oleksowicz
8bf3eddf09 Return cached item for homepage stats
MAILPOET-5439
2023-07-10 11:04:33 +02:00
Veljko
52dba60b7b Improve managing segments test
[MAILPOET-5329]
2023-07-06 13:58:19 +03:00
Veljko
0f80c03fe6 Improve the scenario creating editing segment
[MAILPOET-5329]
2023-07-06 13:58:19 +03:00
John Oleksowicz
43c7e457ca Visit admin page first to install automate woo tables
AutomateWoo currently does not create its database tables until youy
visit an admin page. Starting with version 5.8.1, this was causing some
tests to fail because AutomateWoo was trying to run a scheduled task
that relied on a database table that didn't exist yet. This is a quick
attempt to fix this by visiting the admin to trigger table creation.

MAILPOET-5449
2023-07-05 14:28:35 -05:00
John Oleksowicz
fd17a1aa42 Ensure confirmation emails enabled
These tests have a final assertion that assumes confirmation emails are
enabled. If a previous test switched confirmation emails off, these
would fail.

MAILPOET-5449
2023-07-05 14:28:35 -05:00
Rodrigo Primo
ac40e3d802 Refactor segments.jsx to segments.tsx
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
Rodrigo Primo
34937e99c0 Refactor dynamic/list.jsx to dynamic/list.tsx
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
Rodrigo Primo
4583b80fa6 Move SegmentResponse type to types.ts to be able to reuse it
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
Rodrigo Primo
75ed1681e8 Refactor list.jsx to list.tsx
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
Rodrigo Primo
ad6d92f2f7 Refactor heading.jsx to heading.tsx
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
Rodrigo Primo
f991b40a6f Refactor form.jsx to form.tsx
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
Veljko
5e016b2b17 Improved the test for segment newsletter stats
[MAILPOET-5328]
2023-07-05 12:22:49 +03:00
Rodrigo Primo
d17d9ce246 Remove one more deprecated method from the Segment model
This methods was deprecated a long time ago and it is not used anymore.

[MAILPOET-5455]
2023-07-05 12:09:22 +03:00
Rodrigo Primo
bb16e94a5b Remove deprecated methods from the Segment model
Those methods were long deprecated and are not used anymore.

[MAILPOET-5455]
2023-07-05 12:09:22 +03:00
Rodrigo Primo
fb08b3e7ec Make sure long option names don't break the select layout
The segment `used shipping method` might contain long names that are
displayed inside the select box to select shipping method names. Those
long names were breaking the layout of the select box. This commit fixes
this problem by adding a scrollbar to each option when needed.

See https://github.com/mailpoet/mailpoet/pull/4967#issuecomment-1602425406

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
Rodrigo Primo
841745c706 Remove shipping method IDs from the 'used shipping method' query
This commit simplifies the logic of the 'used shipping method' segment
by removing the shipping method IDs from the queries. After some
considering, we have come to the conclusion that using just the shipping
method instance ID is enough.

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
Rodrigo Primo
60d3aa853c Fix prettier formatting issues during rebase
For some reason those issues were not fixed automatically. I will
investigate if I'm missing a pre-commit hook or something in my
environment.

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
Rodrigo Primo
f20878f7f3 Update the queries of the 'used shipping method' filter
This commit changes the logic of the code that builds the queries for
the 'used shipping method' filter. The initial implementation relied
only on the shipping method name that is stored in
wp_woocommerce_order_items.  This implementation did not work as the
name is not unique. The new implementation use the shipping method id
and the instance id that are stored in wp_woocommerce_order_itemmeta and
the combination of both fields is unique.

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
Rodrigo Primo
993e292fd0 Fix typo
[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
Rodrigo Primo
f85b7a52fc Change logic of the code to build the 'used shipping method' segment UI
This commit fixes an issue with the initial logic used to retrieve
shipping methods to build the UI of the 'used shipping method' segment.
It updates the code to properly retrieve WooCommerce shipping methods
configured for all zones. Before the code was getting just the shipping
method types and the shipping method instances.

The query that is used to get the subscribers that match this segment
will be updated in another commit.

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
Rodrigo Primo
5447e253e5 Add backend logic to handle new "used shipping method" segment
[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
Rodrigo Primo
243c096643 Add UI for new "used shipping method" segment
[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
Veljko
4a26d3a067 Additional scenario added
[MAILPOET-5322]
2023-07-04 17:46:55 +02:00
Veljko
fcf164a67d Include one more newsletter and segment
[MAILPOET-5322]
2023-07-04 17:46:55 +02:00
Veljko
530addfa5f Improve the test archive page
[MAILPOET-5322]
2023-07-04 17:46:55 +02:00
Brezo Cordero
dc4788d440 Release 4.20.1 2023-07-04 14:46:59 +03:00
Veljko
96d78554ba Update tests to include await and update helper method
[MAILPOET-5451]
2023-07-04 13:38:29 +02:00
alex-mailpoet
5d88f02216 Replace multiple subscriber update queries with one in sending loop
[MAILPOET-5178]
2023-07-03 16:52:46 +02:00
alex-mailpoet
764114edc7 Replace two counting DB queries with arithmetic in sending loop
[MAILPOET-5178]
2023-07-03 16:52:46 +02:00
David Remer
aadd6d6dba Fix email action styles
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
f89cd3d84f Improve method name
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
43a540c03c Order emails by order in automation
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
53f58fd1a4 Use one formatter
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
87ef876f73 Add whitespace only when subvalue empty
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
f5046ca445 Ensure string in link
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
190da3b0e5 Use WooCommerce wrapper instead of native functions, test if WC is active
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
8b1d51fcd6 Apply prettier 2023-07-03 12:44:07 +02:00
David Remer
c03a3becc4 Use WooCommerce abstraction from automations instead of MP 2023-07-03 12:44:07 +02:00
David Remer
2203629991 Fix small styling issues
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
3b8569e47e Ensure newsletter exists
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
4c6f0ff073 Add interactive elements to email tab
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
1bd4050c1a Format prices in frontend
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
be29c00f08 Add price formatter
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
49a83b3760 Remove padding from components popover
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
16d8f04d9f Empty data when updating asynchronosly to show loading indicators
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
David Remer
aa7ca7039a Add Email Tab
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
Veljko
81f7ddba9d Update onboarding test scenario 2023-06-29 17:16:34 +03:00
Veljko
aa678b4609 Include wait in onboarding scenario 2023-06-29 17:16:34 +03:00
Veljko
5c33dbe220 Update forms adding and helper method 2023-06-29 17:16:34 +03:00
Veljko
7d748b0844 Improve auth and add try finally to all tests 2023-06-29 17:16:34 +03:00