diff --git a/tests/Support/Data/dump.sql b/tests/Support/Data/dump.sql index 142f4cf2a..3f24ebc81 100644 --- a/tests/Support/Data/dump.sql +++ b/tests/Support/Data/dump.sql @@ -386,7 +386,8 @@ INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALU (20, 1, 'edit_page_per_page', '100'), (21, 1, 'edit_post_per_page', '100'), (22, 1, 'wp_persisted_preferences', 'a:4:{s:4:"core";a:2:{s:26:"isComplementaryAreaVisible";b:1;s:24:"enableChoosePatternModal";b:0;}s:14:"core/edit-post";a:4:{s:12:"welcomeGuide";b:0;s:23:"metaBoxesMainOpenHeight";i:540;s:20:"welcomeGuideTemplate";b:0;s:19:"metaBoxesMainIsOpen";b:1;}s:9:"_modified";s:24:"2024-07-18T02:45:41.491Z";s:17:"core/edit-widgets";a:2:{s:26:"isComplementaryAreaVisible";b:1;s:12:"welcomeGuide";b:0;}}'), -(23, 1, 'elementor_introduction', 'a:5:{s:7:"exit_to";b:1;s:27:"ai-get-started-announcement";b:1;s:20:"globals_introduction";b:1;s:6:"e-apps";b:1;s:27:"e-editor-one-notice-pointer";b:1;}'); +(23, 1, 'elementor_introduction', 'a:5:{s:7:"exit_to";b:1;s:27:"ai-get-started-announcement";b:1;s:20:"globals_introduction";b:1;s:6:"e-apps";b:1;s:27:"e-editor-one-notice-pointer";b:1;}'), +(24, 1, 'dismissed_no_secure_connection_notice', 'true'); DROP TABLE IF EXISTS `wp_users`; CREATE TABLE `wp_users` ( diff --git a/tests/Support/Helper/WPClassicEditor.php b/tests/Support/Helper/WPClassicEditor.php index 0d1f5c97b..c8a1aca82 100644 --- a/tests/Support/Helper/WPClassicEditor.php +++ b/tests/Support/Helper/WPClassicEditor.php @@ -300,6 +300,9 @@ public function publishAndViewClassicEditorPage($I) // Publish Page. $I->publishClassicEditorPage($I); + // Wait for the notice to display. + $I->waitForElementVisible('.notice-success'); + // Load the Page on the frontend site. $I->click('.notice-success a'); diff --git a/tests/Support/Helper/WPQuickEdit.php b/tests/Support/Helper/WPQuickEdit.php index ee921e43e..74002cf9c 100644 --- a/tests/Support/Helper/WPQuickEdit.php +++ b/tests/Support/Helper/WPQuickEdit.php @@ -61,13 +61,23 @@ public function openQuickEdit($I, $postType, $postID) // Navigate to Post Type's WP_List_Table. $I->amOnAdminPage('edit.php?post_type=' . $postType); - // Hover mouse over Post's table row. - $I->moveMouseOver('tr#post-' . $postID); + // Wait for the WP_List_Table to load. + $I->waitForElementVisible('table.wp-list-table'); - // Wait for Quick edit link to be visible. - $I->waitForElementVisible('tr#post-' . $postID . ' button.editinline'); + // Wait for the Post's row to exist in the table. + $I->waitForElementVisible('tr#post-' . $postID); - // Click Quick Edit link. + // Display all row actions by adding the `visible` class, as + // moveMouseOver() is flaky. + $I->executeJS( + ' + document.querySelectorAll(".row-actions").forEach(function(el){ + el.classList.add("visible"); + }); + ' + ); + + // Click Quick Edit link for the Post. $I->click('tr#post-' . $postID . ' button.editinline'); } }