Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Fix _load_textdomain_just_in_time PHP Notice #747

Merged
merged 28 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
06e5762
Block Visibility: Support non-inline Forms
n7studios Nov 21, 2024
0129473
Fix characater encoding when inserting Form after specific HTML element
n7studios Nov 23, 2024
2b7591f
Merge branch 'main' into add-block-visibility-support-non-inline-forms
n7studios Nov 25, 2024
8f1425a
Merge branch 'main' into fix-character-encoding-form-insertion
n7studios Nov 25, 2024
1ab25aa
Added tests
n7studios Nov 25, 2024
dd54bc1
Tests: Update WP Crontrol URL for 1.17.1
n7studios Nov 25, 2024
5a98919
Merge branch 'main' into add-block-visibility-support-non-inline-forms
n7studios Nov 25, 2024
e148298
Merge branch 'main' into fix-character-encoding-form-insertion
n7studios Nov 25, 2024
edbf182
Merge branch 'fix-cron-tests' into add-block-visibility-support-non-i…
n7studios Nov 25, 2024
cb933ec
Merge branch 'fix-cron-tests' into fix-character-encoding-form-insertion
n7studios Nov 25, 2024
de19774
Tests: Install ‘Disable doing_it_wrong’ Plugin
n7studios Nov 25, 2024
9619381
Activate Plugin
n7studios Nov 25, 2024
07600e7
Merge remote-tracking branch 'origin/fix-tests-doing-it-wrong-notice'…
n7studios Nov 25, 2024
c68962e
Merge remote-tracking branch 'origin/fix-cron-tests' into fix-charact…
n7studios Nov 25, 2024
3650bb1
Merge remote-tracking branch 'origin/fix-cron-tests' into add-block-v…
n7studios Nov 25, 2024
4f2414d
Fix CLI command
n7studios Nov 25, 2024
c0a0bbf
Output all Plugins in CLI
n7studios Nov 25, 2024
78a8304
Tests: List plugins
n7studios Nov 25, 2024
419cc8d
Remove activation step
n7studios Nov 25, 2024
bab65a6
Divi: Disable notices
n7studios Nov 25, 2024
51efc82
Fix failing tests
n7studios Nov 25, 2024
0a7d4a6
Fix tests
n7studios Nov 25, 2024
0a7c4a6
Coding standards
n7studios Nov 25, 2024
ab74d31
Merge remote-tracking branch 'origin/fix-tests-doing-it-wrong-notice'…
n7studios Nov 25, 2024
826b26f
Merge remote-tracking branch 'origin/fix-tests-doing-it-wrong-notice'…
n7studios Nov 25, 2024
46b002f
Fix failing test
n7studios Nov 26, 2024
cd7bb60
Merge pull request #744 from Kit/add-block-visibility-support-non-inl…
n7studios Nov 27, 2024
4e69f84
Merge pull request #745 from Kit/fix-character-encoding-form-insertion
n7studios Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
DB_PASS: root
DB_HOST: localhost
INSTALL_PLUGINS: "admin-menu-editor autoptimize beaver-builder-lite-version contact-form-7 classic-editor custom-post-type-ui elementor forminator jetpack-boost woocommerce wordpress-seo wpforms-lite litespeed-cache wp-crontrol wp-super-cache w3-total-cache wp-fastest-cache wp-optimize sg-cachepress" # Don't include this repository's Plugin here.
INSTALL_PLUGINS_URLS: "https://downloads.wordpress.org/plugin/convertkit-for-woocommerce.1.6.4.zip http://cktestplugins.wpengine.com/wp-content/uploads/2024/01/convertkit-action-filter-tests.zip" # URLs to specific third party Plugins
INSTALL_PLUGINS_URLS: "https://downloads.wordpress.org/plugin/convertkit-for-woocommerce.1.6.4.zip http://cktestplugins.wpengine.com/wp-content/uploads/2024/01/convertkit-action-filter-tests.zip http://cktestplugins.wpengine.com/wp-content/uploads/2024/11/disable-doing-it-wrong-notices.zip" # URLs to specific third party Plugins
CONVERTKIT_API_KEY: ${{ secrets.CONVERTKIT_API_KEY }} # ConvertKit API Key, stored in the repository's Settings > Secrets
CONVERTKIT_API_SECRET: ${{ secrets.CONVERTKIT_API_SECRET }} # ConvertKit API Secret, stored in the repository's Settings > Secrets
CONVERTKIT_API_KEY_NO_DATA: ${{ secrets.CONVERTKIT_API_KEY_NO_DATA }} # ConvertKit API Key for ConvertKit account with no data, stored in the repository's Settings > Secrets
Expand Down
13 changes: 11 additions & 2 deletions tests/_support/Helper/Acceptance/WPCron.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
*/
class WPCron extends \Codeception\Module
{
/**
* Holds the admin UI URL for WP Crontrol.
*
* @since 2.6.6
*
* @var string
*/
private $adminURL = 'tools.php?page=wp-crontrol';

/**
* Asserts if the given event name is scheduled in WordPress' Cron.
*
Expand Down Expand Up @@ -49,7 +58,7 @@ public function dontSeeCronEvent($I, $name)
public function runCronEvent($I, $name)
{
// List cron event in WP-Crontrol Plugin.
$I->amOnAdminPage('tools.php?page=crontrol_admin_manage_page&s=' . $name);
$I->amOnAdminPage($this->adminURL . '&s=' . $name);

// Hover mouse over event's name.
$I->moveMouseOver('#the-list tr');
Expand All @@ -74,7 +83,7 @@ public function runCronEvent($I, $name)
public function deleteCronEvent($I, $name)
{
// List cron event in WP-Crontrol Plugin.
$I->amOnAdminPage('tools.php?page=crontrol_admin_manage_page&s=' . $name);
$I->amOnAdminPage($this->adminURL . '&s=' . $name);

// Hover mouse over event's name.
$I->moveMouseOver('#the-list tr');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ public function testFormShortcodeWithPerfmattersPlugin(AcceptanceTester $I)
$I->setupConvertKitPluginResources($I);

// Activate Perfmatters Plugin.
$I->activateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
$I->activateThirdPartyPlugin($I, 'perfmatters');

// Enable Defer and Delay JavaScript.
Expand Down Expand Up @@ -700,6 +701,7 @@ public function testFormShortcodeWithPerfmattersPlugin(AcceptanceTester $I)

// Deactivate Perfmatters Plugin.
$I->deactivateThirdPartyPlugin($I, 'perfmatters');
$I->deactivateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
}

/**
Expand Down Expand Up @@ -770,6 +772,7 @@ public function testFormShortcodeWithWPRocketPlugin(AcceptanceTester $I)
$I->setupConvertKitPluginResources($I);

// Activate WP Rocket Plugin.
$I->activateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
$I->activateThirdPartyPlugin($I, 'wp-rocket');

// Configure WP Rocket.
Expand Down Expand Up @@ -806,6 +809,7 @@ public function testFormShortcodeWithWPRocketPlugin(AcceptanceTester $I)

// Deactivate WP Rocket Plugin.
$I->deactivateThirdPartyPlugin($I, 'wp-rocket');
$I->deactivateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
}

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/acceptance/integrations/other/DiviBroadcastsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class DiviBroadcastsCest
public function _before(AcceptanceTester $I)
{
$I->activateConvertKitPlugin($I);
$I->activateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
$I->activateThirdPartyPlugin($I, 'divi-builder');
}

Expand Down Expand Up @@ -173,6 +174,7 @@ public function testBroadcastsModuleInFrontendEditorWhenNoBroadcasts(AcceptanceT
public function _passed(AcceptanceTester $I)
{
$I->deactivateThirdPartyPlugin($I, 'divi-builder');
$I->deactivateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
$I->deactivateConvertKitPlugin($I);
$I->resetConvertKitPlugin($I);
}
Expand Down
2 changes: 2 additions & 0 deletions tests/acceptance/integrations/other/DiviFormCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class DiviFormCest
public function _before(AcceptanceTester $I)
{
$I->activateConvertKitPlugin($I);
$I->activateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
$I->activateThirdPartyPlugin($I, 'divi-builder');
}

Expand Down Expand Up @@ -228,6 +229,7 @@ public function testFormModuleWithNoFormParameter(AcceptanceTester $I)
public function _passed(AcceptanceTester $I)
{
$I->deactivateThirdPartyPlugin($I, 'divi-builder');
$I->deactivateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
$I->deactivateConvertKitPlugin($I);
$I->resetConvertKitPlugin($I);
}
Expand Down
2 changes: 2 additions & 0 deletions tests/acceptance/integrations/other/DiviFormTriggerCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class DiviFormTriggerCest
public function _before(AcceptanceTester $I)
{
$I->activateConvertKitPlugin($I);
$I->activateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
$I->activateThirdPartyPlugin($I, 'divi-builder');
}

Expand Down Expand Up @@ -193,6 +194,7 @@ public function testFormTriggerModuleWithNoFormParameter(AcceptanceTester $I)
public function _passed(AcceptanceTester $I)
{
$I->deactivateThirdPartyPlugin($I, 'divi-builder');
$I->deactivateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
$I->deactivateConvertKitPlugin($I);
$I->resetConvertKitPlugin($I);
}
Expand Down
2 changes: 2 additions & 0 deletions tests/acceptance/integrations/other/DiviProductCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class DiviProductCest
public function _before(AcceptanceTester $I)
{
$I->activateConvertKitPlugin($I);
$I->activateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
$I->activateThirdPartyPlugin($I, 'divi-builder');
}

Expand Down Expand Up @@ -186,6 +187,7 @@ public function testProductModuleWithNoProductParameter(AcceptanceTester $I)
public function _passed(AcceptanceTester $I)
{
$I->deactivateThirdPartyPlugin($I, 'divi-builder');
$I->deactivateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
$I->deactivateConvertKitPlugin($I);
$I->resetConvertKitPlugin($I);
}
Expand Down
2 changes: 2 additions & 0 deletions tests/acceptance/landing-pages/PageLandingPageCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ public function testAddNewPageUsingDefinedLandingPageWithPerfmattersPlugin(Accep
$I->setupConvertKitPluginResources($I);

// Activate Perfmatters Plugin.
$I->activateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
$I->activateThirdPartyPlugin($I, 'perfmatters');

// Enable Lazy Loading.
Expand Down Expand Up @@ -373,6 +374,7 @@ public function testAddNewPageUsingDefinedLandingPageWithPerfmattersPlugin(Accep

// Deactivate Perfmatters Plugin.
$I->deactivateThirdPartyPlugin($I, 'perfmatters');
$I->deactivateThirdPartyPlugin($I, 'disable-_load_textdomain_just_in_time-doing_it_wrong-notice');
}

/**
Expand Down