Commit Graph

16368 Commits

Author SHA1 Message Date
Rodrigo Primo
8743e5654b Remove leftover MP2 migration file that is not needed anymore
This file was loaded inside the MP2MigratorTest class that was removed (https://github.com/mailpoet/mailpoet/pull/4235/files#diff-fa71dea302390fbf7c04d9d882a5a66a70d3daa432883d4ba6951e2ec5abe287L123) and thus it is not needed anymore.

[MAILPOET-4612]
2022-09-12 14:46:41 +02:00
Rodrigo Primo
43ece08227 Remove errors to be ignored by PHPStan that don't exist anymore
Fixing the logic to load the PHPStan baseline in the previous commit,
uncovered some ignored errors in phpstan-8.1-baseline.neon that don't
exist anymore.

[MAILPOET-4626]
2022-09-12 10:28:59 +01:00
Rodrigo Primo
76501d89d2 Fix logic to decide which PHPStan baseline file to use
There was a bug in the code that is used to decide which version of
the PHPStan baseline file should be loaded depending on the PHP
version that is being used.

The if condition for PHP 8.1 was `$phpVersion == 80100` which means
that it matched only PHP 8.1.0 and not any of the 8.1 patch
versions (like 8.1.1 and 8.1.2).

This commit fixes this problem and it also changes the order of the
checks so that they follow the version numbers in ascending order.
Before the checks where unordered.

[MAILPOET-4626]
2022-09-12 10:28:59 +01:00
Veljko V
f62229eff4 Update file to pass prettier check 2022-09-09 15:14:52 +02:00
Veljko V
8e20366ede Add New Pull Request Template 2022-09-09 15:14:52 +02:00
Pavel Dohnal
9c5e9e0da6 Remove version number from API doc
[MAILPOET-4474]
2022-09-09 11:25:51 +02:00
Pavel Dohnal
c8293fd405 Remove version number from the newsletter tooltip
[MAILPOET-4474]
2022-09-09 11:25:51 +02:00
Pavel Dohnal
086852ee4d Remove version number from the source
[MAILPOET-4474]
2022-09-09 11:25:51 +02:00
Pavel Dohnal
941e443c22 Remove version number from the widget
[MAILPOET-4474]
2022-09-09 11:25:51 +02:00
Pavel Dohnal
279ffc311c Remove version number from the plugin name
[MAILPOET-4474]
2022-09-09 11:25:51 +02:00
Pavel Dohnal
cff9be902b Remove version number from the plugin icon
[MAILPOET-4474]
2022-09-09 11:25:51 +02:00
Pavel Dohnal
5984c1be04 Add a command to calculate number of pull requests 2022-09-09 11:02:50 +02:00
Pavel Dohnal
eef0b12af3 Update woocommerce packages installed by default
[MAILPOET-4615]
2022-09-09 10:56:52 +02:00
Pavel Dohnal
1388e053b4 Update woocommerce packages to follow the rule L-2
[MAILPOET-4615]
2022-09-09 10:56:52 +02:00
Rodrigo Primo
842f81d40b Add method to detected if WooCommerce Custom Order Tables is enabled
[MAILPOET-4567]
2022-09-09 10:43:11 +02:00
Oluwaseun Olorunsola
1c0d9da74a Fix issues with CSS and https://user-images.githubusercontent.com/30554163/176655015-777259ac-5748-48b0-8f27-41befac015a9.png
MAILPOET-4561
2022-09-09 10:16:50 +02:00
Oluwaseun Olorunsola
281ce6d787 Fix bug with email address authorization on newsletter editor
on newsletter editor page, after successfully authorized the email address the dialog disappears automatically, but the error message stays

MAILPOET-4561
2022-09-09 10:16:50 +02:00
Oluwaseun Olorunsola
e55d21e84a Fix Weird popup left on page after completing verification
MAILPOET-4561
2022-09-09 10:16:50 +02:00
John Oleksowicz
f72d72a28a Remove quotes from find/replace strings
These quotes were causing issues with translations where quote styles
are changed to anything other than double quotes. This was affecting
at least German and French translations.

Because the translations get applied before the search/replace,
changing to something other than standard double quotes meant that
the search string would never be found, leaving the characters
%1$s in the UI.

[MAILPOET-4185]
2022-09-09 10:06:43 +02:00
Rostislav Wolny
81f3a0420a Fix activation of plugins for multisite environments
We need to provide correct --url parameter to WP CLI commands so that
in multisite environment the correct site is affected.
Otherwise the plugins might not be activated for site we run tests on.
[MAILPOET-4625]
2022-09-08 16:53:49 +02:00
Rostislav Wolny
d643928f66 Fix indentation of code for installing WooCommerce core
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
e32b06a5a8 Add data cleanup after SendEmailActionTest tests
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
9e1f4ab947 Remove unused Database helper from tests
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
0b54ae6506 Refactor updating create and modified dates in WooCommerce order factory
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
bb5a955c69 Used Woo code for cleaning up orders data in WooCommerce segment test
[MAILPOET-4566]
2022-09-08 13:02:52 +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
77dfc8602f Skip download and installation of plugins if they are not needed
In case $SKIP_PLUGINS is set to 1 we don't activate installed plugins so it makes no sense to install them as well.
In this commit we add also skipping the installation of the plugins.
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
21508235fa Remove forgotten group annotation on a test case
The whole test has the group annotation so it is not needed for the particular tests case.
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
f05a7367ef Add shortcuts for Woo integration tests and base integration test to Robo
./do test:woo-integration - runs test from Woo group with and activate plugins
./do test:base-integration - runs test without Woo group with and doesn't activate plugins
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
16ddb93d79 Refactor WooCommerce Segments test to use wc_create_order
[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
8a48db30b6 Add backup and restore for global WC_Cart in AbandonedCartTest
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
0f091365b3 Remove code for creating WooCommerce lookup tables
We activate the Woo plugin and it creates the tables 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
04fe3a437c Skip 3rd party plugins activation in integration_test_base job on Circle CI
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
8d564a52f1 Add option for skipping 3rd party plugins activation in integration tests
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
99d4dfb558 Fix integration test to run without WooCommerce related test
SendEmailActionTest test was dependent on a cleanup
from a previous test, which was moved to the woo group.
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
bb7053306a Alway print versions of active plugins in tests
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
123204d817 Split integration tests run to Woo and Non Woo tests
The plugin needs to be able to run without WooCommerce active.
We want to splint tests that are related WooCommerce integration so that
we can run the others without WooCommerce installed, to be sure the plugin
is not accidentally dependent on WooCommerce.
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rostislav Wolny
7edb808e89 Move integration test run command out of parameters
When the command was defined as parameter other parameters used within the command were never interpreted.
This was causing that << parameters.multisite >> was always empty and we actually
never run the integration tests as multisite.
Moving the command directly under the command property fixes the issue.
The run_command parameter was never used to overwrite the default value
so we are save to move it.
[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
Rostislav Wolny
08d970a94b Add support for group to integration test robo command
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
John Oleksowicz
68b3b23e3c Assume WC is installed/activated for tests
MAILPOET-4566
2022-09-08 13:02:52 +02:00
John Oleksowicz
c403097c07 Always use real WC instead of mock
MAILPOET-4566
2022-09-08 13:02:52 +02:00
John Oleksowicz
c9ada07ad4 Include Woo plugins for integration tests
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
John Oleksowicz
7c54fc800a Give integration tester ability to create orders
MAILPOET-4566
2022-09-08 13:02:52 +02:00
John Oleksowicz
90dcbc2749 Add create order to WC helper
MAILPOET-4566
2022-09-08 13:02:52 +02:00
Oluwaseun Olorunsola
b18d8be3ca Chore: rename variables, PR feedback
MAILPOET-4311
2022-09-08 12:51:48 +02:00
Oluwaseun Olorunsola
c1f5ddf96e Improve the DMARC error message
When the DMARC error message is displayed, add the sentence Click here to start the authentication. This will be a link that opens the verify domain dialogue

MAILPOET-4311
2022-09-08 12:51:48 +02:00