Commit Graph

17 Commits

Author SHA1 Message Date
Mike Jolley
0d6fe6e5eb Apply rules to tests and tasks 2024-03-21 16:57:59 +01:00
John Oleksowicz
314b1f3c27 Change method for detecting empty product pages
The previous method was relying on the idea that product pages would not
 trigger the `the_content` filter since they don't have to render the
 content. Testing revealed that this idea was unreliable.

In one instance WordPress was triggering `the_content` when attempting
to filter the excerpt, even though the excerpt was empty.

This changes the detection method to a much more direct inspection of
the post's content.

MAILPOET-5859
2024-03-08 12:27:06 +01:00
John Oleksowicz
0ab2be782d Show forms on empty product pages
The current logic for form rendering assumes that a single product page
will trigger the filter `the_content`. This is not always true. In cases
where the product has no description, WooCommerce does not render the
description tab at all, which is where that filter usually fires (in my
testing).

This change ensures that we still give these forms a chance to render on
 such pages.

MAILPOET-5859
2024-03-08 12:27:06 +01:00
Rodrigo Primo
b5b4106da4 Replace expect()->endsWith() with verify()->stringEndsWith()
codeception/verify 2.1 removed support for expect()->endsWith() so we need
to replace it with verify()->stringEndsWith().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
00c5250cff Replace expect()->notEquals() with verify()->notEquals()
codeception/verify 2.1 removed support for expect()->notEquals() so we need
to replace it with verify()->notEquals().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
709be1d541 Replace expect()->null() with verify()->null()
codeception/verify 2.1 removed support for expect()->null() so we need
to replace it with verify()->null().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rodrigo Primo
afe378ba22 Replace expect()->equals() with verify()->equals()
codeception/verify 2.1 removed support for expect()->equals() so we need
to replace it with verify()->equals().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
John Oleksowicz
c0a0dc6188 Add test to confirm no duplicate rendering
MAILPOET-4897
2023-07-12 10:14:52 +02:00
John Oleksowicz
677ae370ed Handle special case for selected Posts page
MAILPOET-4897
2023-07-12 10:14:52 +02:00
John Oleksowicz
481f5585a0 Add form placement options for homepage, archives
MAILPOET-4897
2023-07-12 10:14:52 +02:00
Oluwaseun Olorunsola
0019ad110e Update DisplayFormInWPContent::display method type and add more tests
MAILPOET-4885
MAILPOET-4820
2023-01-25 13:15:08 +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
Oluwaseun Olorunsola
5a0ec403f6 Update test cases to reflect change in method location
MAILPOET-4663
2022-11-01 14:58:47 +01:00
Oluwaseun Olorunsola
8c24d59f43 Add tests for form display on Woo Shop listing page
MAILPOET-4663
2022-11-01 14:58:47 +01:00
Brezo Cordero
bfa9a98df6 Do not display form if logged in and registered to any segment.
[MAILPOET-3059]
2022-02-23 15:22:24 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00