From c3cc8b5fc2728c99ad4f93cb5842c8b1762f8558 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Wed, 14 Dec 2022 16:18:31 +0000 Subject: [PATCH 1/3] =?UTF-8?q?Don=E2=80=99t=20toggle=20the=20product=20sh?= =?UTF-8?q?ort=20description=20metabox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WooCommerce 7.2 no longer auto collapses the short description field, so we don’t need to open it. See https://github.com/woocommerce/woocommerce/pull/35213 --- tests/_support/Helper/Acceptance/WPClassicEditor.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/_support/Helper/Acceptance/WPClassicEditor.php b/tests/_support/Helper/Acceptance/WPClassicEditor.php index 12b3e24d7..833125fd0 100644 --- a/tests/_support/Helper/Acceptance/WPClassicEditor.php +++ b/tests/_support/Helper/Acceptance/WPClassicEditor.php @@ -50,7 +50,6 @@ public function addVisualEditorShortcode($I, $shortcodeName, $shortcodeConfigura switch ($targetEditor) { case 'excerpt': $I->scrollTo('#postexcerpt'); - $I->click('#postexcerpt button.handlediv'); break; default: $I->scrollTo('h1.wp-heading-inline'); From 489f208401d3232fe3c5a287dff553c157f85fe2 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Wed, 14 Dec 2022 17:01:53 +0000 Subject: [PATCH 2/3] =?UTF-8?q?Don=E2=80=99t=20toggle=20product=20short=20?= =?UTF-8?q?description=20metabox=20for=20text=20editor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/_support/Helper/Acceptance/WPClassicEditor.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/_support/Helper/Acceptance/WPClassicEditor.php b/tests/_support/Helper/Acceptance/WPClassicEditor.php index 833125fd0..2e2a5048f 100644 --- a/tests/_support/Helper/Acceptance/WPClassicEditor.php +++ b/tests/_support/Helper/Acceptance/WPClassicEditor.php @@ -117,7 +117,6 @@ public function addTextEditorShortcode($I, $shortcodeProgrammaticName, $shortcod switch ($targetEditor) { case 'excerpt': $I->scrollTo('#postexcerpt'); - $I->click('#postexcerpt button.handlediv'); break; default: $I->scrollTo('h1.wp-heading-inline'); From 885f104e1ac1d742f05f81a511dcc26f4c07bd4b Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Wed, 14 Dec 2022 17:02:03 +0000 Subject: [PATCH 3/3] Scroll to ConvertKit meta box before attempting to select a form --- .../integrations/WooCommerceProductFormCest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/acceptance/integrations/WooCommerceProductFormCest.php b/tests/acceptance/integrations/WooCommerceProductFormCest.php index 5586aeedf..9c6758bda 100644 --- a/tests/acceptance/integrations/WooCommerceProductFormCest.php +++ b/tests/acceptance/integrations/WooCommerceProductFormCest.php @@ -90,6 +90,9 @@ public function testAddNewProductUsingNoForm(AcceptanceTester $I) // Navigate to Products > Add New. $I->amOnAdminPage('post-new.php?post_type=product'); + // Scroll to ConvertKit meta box. + $I->scrollTo('#wp-convertkit-meta-box'); + // Change Form to None. $I->fillSelect2Field($I, '#select2-wp-convertkit-form-container', 'None', 'aria-owns'); @@ -119,6 +122,9 @@ public function testAddNewProductUsingDefinedForm(AcceptanceTester $I) // Navigate to Products > Add New. $I->amOnAdminPage('post-new.php?post_type=product'); + // Scroll to ConvertKit meta box. + $I->scrollTo('#wp-convertkit-meta-box'); + // Change Form to Form setting in .env file. $I->fillSelect2Field($I, '#select2-wp-convertkit-form-container', $_ENV['CONVERTKIT_API_FORM_NAME'], 'aria-owns'); @@ -148,6 +154,9 @@ public function testAddNewProductUsingFormShortcodeInVisualEditor(AcceptanceTest // Add a Product using the Classic Editor. $I->addClassicEditorPage($I, 'product', 'ConvertKit: Product: Form: Shortcode: Visual Editor'); + // Scroll to ConvertKit meta box. + $I->scrollTo('#wp-convertkit-meta-box'); + // Configure metabox's Form setting = None, ensuring we only test the shortcode in the Classic Editor. $I->fillSelect2Field($I, '#select2-wp-convertkit-form-container', 'None', 'aria-owns'); @@ -195,6 +204,9 @@ public function testAddNewProductUsingFormShortcodeInTextEditor(AcceptanceTester // Add a Product using the Classic Editor. $I->addClassicEditorPage($I, 'product', 'ConvertKit: Product: Form: Shortcode: Text Editor'); + // Scroll to ConvertKit meta box. + $I->scrollTo('#wp-convertkit-meta-box'); + // Configure metabox's Form setting = None, ensuring we only test the shortcode in the Classic Editor. $I->fillSelect2Field($I, '#select2-wp-convertkit-form-container', 'None', 'aria-owns');