Commit Graph

134 Commits

Author SHA1 Message Date
Rodrigo Primo
8e0211913a Add basic integration test for the new single order value WC segment
[MAILPOET-4988]
2023-03-28 15:51:01 +02:00
Rostislav Wolny
e1be576525 Fix coding style issue in Woo Subscriptions filter test
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
Rostislav Wolny
4200781a56 Remove temporary action for disabling Woo compatibility check in test
WooSubscriptions declared compatibility with HPOS in version 4.9.0
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
Rostislav Wolny
78feddd30a Enable WooSubscriptions test when HPOS is active
We need to temporarily turn off plugin compatibility check in Woo
because current Woo Subscriptions are still officially not marked as
HPOS compatible.
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
Rostislav Wolny
14515c4140 Refactor WooSubscriptions integration test to use factory instead post
The factory uses wcs_create_subscription and creates the subscription order
in proper table according to HPOS setting.
[MAILPOET-4568]
2023-03-27 12:26:35 +02:00
Rodrigo Primo
2bcd1ace70 Fix PHPStan errors in tests/integration/Segments/DynamicSegments/
[MAILPOET-4037]
2023-02-23 14:13:17 +01:00
Rostislav Wolny
78446d174a Fix quotes in a queries processed by $wpdb
These queries failed when ANSI_QUOTES mode is enabled
[MAILPOET-4887]
2022-12-12 13:59:09 +01:00
Jan Jakes
82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
David Remer
7db40b27b5 Fix errors automatically with phpcbf
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
David Remer
d2ec7bba42 Replace instance_of asserts in integration tests
[MAILPOET-4258]
2022-11-25 14:32:34 +01:00
Rodrigo Primo
f2ab875bd9 Skip WooCommerce Subscriptions integration tests when Woo COT is enabled
WooCommerce Subscriptions doesn't support WooCommerce Custom Orders
Tables, so we should skip the WooCommerce Subscriptions related tests
when Woo COT is enabled.

[MAILPOET-4695]
2022-10-07 18:31:10 +02:00
Rostislav Wolny
960bac746e Refactor WooCommerceCountryTest to use Woo code for creating test data
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
3f186ea655 Fix inserting values into order lookup table
This fixes error on CI: Invalid datetime format: 1292 Incorrect datetime value: '0000-00-00 00:00:00' for column 'date_created' at row 1
Locally this error wasn't present but we use a different DB because of ARM architecture.
Also previously we created the lookup table using a custom SQL but now they are created by WooCommerce plugin itself.
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
0d594c2bb3 Remove usages of Database helper for creating WooCommerce tables in tests
This is no longer needed since the tables are created when we activate the plugin.
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
ed5bd8de61 Add Woo dependent tests to woo group
Mark all integration tests that are related to WooCommerce with group "woo".
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
John Oleksowicz
8665750767 Use new helpers for creating orders
MAILPOET-4566
2022-09-08 13:02:52 +02:00
Sam Najian
609d80ca05 Fix issue of getting none-customer subs for # order filter
[MAILPOET-4390]
2022-06-06 12:06:07 +02:00
Brezo Cordero
ec47cf429a Remove PHPStan level 6 errors from DynamicSegments
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

[MAILPOET-3720]
2022-05-23 12:04:36 +02:00
Brezo Cordero
1885825e24 Remove PHPStan level 6 errors from DynamicSegments Filters
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

[MAILPOET-3720]
2022-05-23 12:04:36 +02:00
Brezo Cordero
4cd3c4ed77 Remove PHPStan level 6 errors from Segments
Remove the following errors:
(Method|Property|Function) has no (return )?type specified.
(Method|Function) has parameter with no type (specified).

[MAILPOET-3720]
2022-05-23 12:04:12 +02:00
Jan Lysý
6ee1955f53 Improve not_equals condition for custom fields
[MAILPOET-4157]
2022-04-18 14:11:52 +02:00
Rostislav Wolny
095f85c897 Update PHPStan and fix new issues
[MAILPOET-4175]
2022-03-28 13:49:41 +02:00
David Remer
a8f80e61d1 Exclude wc-on-hold and wc-pending orders from calculating segment
[MAILPOET-4127]
2022-03-24 16:00:16 +01:00
David Remer
7f13774ce6 Exclude wc-on-hold and wc-pending orders from calculating segment
[MAILPOET-4127]
2022-03-24 16:00:16 +01:00
David Remer
62a3e47632 Add integration test for WooCommerceSubscription dynamic filter
[MAILPOET-4109]
2022-03-07 16:05:11 +01:00
Rostislav Wolny
75ab2338d6 Remove backward compatibility code for email action filters
This commit cleans up code that is no longer needed after email actions filter data migration.
[MAILPOET-3951]
2022-01-19 16:18:08 +01:00
Rostislav Wolny
e5fa13231e Update clicked links filter logic that no selected links mean all links
As we always supported the filter even without specified links we needed
to update the logic only for newly added all of operator.
[MAILPOET-3951]
2022-01-19 16:18:08 +01:00
Rostislav Wolny
efa7a55486 Fix cannot access offset PHP stan errors in EmailActionsTest
[MAILPOET-3951]
2022-01-19 16:18:08 +01:00
Rostislav Wolny
7b47523d27 Add support for all of and none of to clicked links segment filter
[MAILPOER-3951]
2022-01-19 16:18:08 +01:00
Rostislav Wolny
ea8bfdc863 Add multiple emails support with any of and all of for machine-opened
[MAILPOET-3957]
2022-01-19 16:18:08 +01:00
Rostislav Wolny
8a51b573ab Allow multiple links with any of operator in clicked segment filter
[MAILPOET-3951]
2022-01-19 16:18:08 +01:00
Brezo Cordero
b0dde5c547 Add test for Purchased in Categories segment
[MAILPOET-4201]
2022-01-19 16:16:21 +01:00
Brezo Cordero
a350f668df Add test for Purchased Products segment
[MAILPOET-4201]
2022-01-19 16:16:21 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00