diff --git a/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormBuilderCest.php b/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormBuilderCest.php index 3ba66bd14..2f02ca7da 100644 --- a/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormBuilderCest.php +++ b/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormBuilderCest.php @@ -84,12 +84,9 @@ public function testFormBuilderBlockWithDefaultConfiguration(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page. @@ -188,12 +185,9 @@ public function testFormBuilderBlockWithTextCustomization(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page. @@ -304,12 +298,9 @@ public function testFormBuilderBlockWithFormEnabled(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page. @@ -412,12 +403,9 @@ public function testFormBuilderBlockWithTaggingEnabled(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page. @@ -519,12 +507,9 @@ public function testFormBuilderBlockWithSequenceEnabled(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page. @@ -625,12 +610,9 @@ public function testFormBuilderBlockWithCustomField(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page. @@ -761,12 +743,9 @@ public function testFormBuilderBlockWithRedirectOption(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -915,12 +894,9 @@ public function testFormBuilderFieldsCanOnlyBeInsertedToFormBuilderBlock(EndToEn ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Confirm the Form Field blocks cannot be added, as we are not within the Form Builder block. @@ -974,12 +950,9 @@ public function testFormBuilderSupportsCoreBlocks(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add the Form Builder block. @@ -1031,12 +1004,9 @@ public function testFormBuilderWithRecaptchaEnabled(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page. @@ -1098,12 +1068,9 @@ public function testFormBuilderWithRecaptchaEnabledAndHighMinimumScore(EndToEndT ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page. @@ -1154,12 +1121,9 @@ public function testFormBuilderWithStoreEntriesEnabled(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page. diff --git a/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormCest.php b/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormCest.php index fef694c58..6c77321b4 100644 --- a/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormCest.php +++ b/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormCest.php @@ -43,12 +43,9 @@ public function testFormBlockWithValidFormParameter(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -98,12 +95,9 @@ public function testFormBlockWithValidLegacyFormParameter(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -144,12 +138,9 @@ public function testFormBlockWithValidModalFormParameter(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -198,12 +189,9 @@ public function testFormBlocksWithValidModalFormParameter(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -262,12 +250,9 @@ public function testFormBlockWithValidSlideInFormParameter(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -316,12 +301,9 @@ public function testFormBlocksWithValidSlideInFormParameter(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -380,12 +362,9 @@ public function testFormBlockWithValidStickyBarFormParameter(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -434,12 +413,9 @@ public function testFormBlocksWithValidStickyBarFormParameter(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -497,12 +473,9 @@ public function testFormBlockWithNoFormParameter(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page. @@ -662,12 +635,9 @@ public function testFormBlockWithAutoptimizePlugin(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -720,12 +690,9 @@ public function testFormBlockWithDebloatPlugin(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -779,12 +746,9 @@ public function testFormBlockWithJetpackBoostPlugin(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -842,12 +806,9 @@ public function testFormBlockWithSitegroundSpeedOptimizerPlugin(EndToEndTester $ ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -899,12 +860,9 @@ public function testFormBlockWithLiteSpeedCachePlugin(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -965,12 +923,9 @@ public function testFormBlockWithPerfmattersPlugin(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -1022,12 +977,9 @@ public function testFormBlockWithWPRocketPluginDelayJS(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -1086,12 +1038,9 @@ public function testFormBlockWithWPRocketPluginMinifyJS(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. diff --git a/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormTriggerCest.php b/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormTriggerCest.php index bb51a118f..9046ecbde 100644 --- a/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormTriggerCest.php +++ b/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormTriggerCest.php @@ -43,12 +43,9 @@ public function testFormTriggerBlockWithValidFormParameter(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -93,12 +90,9 @@ public function testFormTriggerBlocksWithValidFormParameter(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -157,12 +151,9 @@ public function testFormTriggerBlockWithNoFormParameter(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page. diff --git a/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormatterFormTriggerCest.php b/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormatterFormTriggerCest.php index f5f57ab9e..e96e4e00e 100644 --- a/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormatterFormTriggerCest.php +++ b/tests/EndToEnd/forms/blocks-shortcodes/PageBlockFormatterFormTriggerCest.php @@ -43,12 +43,9 @@ public function testFormTriggerFormatterWithModalForm(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add paragraph to Page. @@ -104,12 +101,9 @@ public function testFormTriggerFormatterToggleFormSelection(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add paragraph to Page. @@ -167,12 +161,9 @@ public function testFormTriggerFormatterWithNoForm(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - 'wp-convertkit-meta-box', - [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add paragraph to Page. diff --git a/tests/EndToEnd/forms/general/EditFormLinkCest.php b/tests/EndToEnd/forms/general/EditFormLinkCest.php index acea99ae5..0be4b40e0 100644 --- a/tests/EndToEnd/forms/general/EditFormLinkCest.php +++ b/tests/EndToEnd/forms/general/EditFormLinkCest.php @@ -77,12 +77,9 @@ public function testEditFormLinkOnPageWithNoForm(EndToEndTester $I) ); // Configure metabox's Form setting = None. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - metabox: 'wp-convertkit-meta-box', - configuration: [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Publish and view the Page on the frontend site. @@ -177,12 +174,9 @@ public function testEditFormLinkOnPageWithLegacyForm(EndToEndTester $I) ); // Configure metabox's Form setting = Legacy. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - metabox: 'wp-convertkit-meta-box', - configuration: [ - 'form' => [ 'select2', $_ENV['CONVERTKIT_API_LEGACY_FORM_NAME'] ], - ] + form: $_ENV['CONVERTKIT_API_LEGACY_FORM_NAME'] ); // Publish and view the Page on the frontend site. @@ -218,12 +212,9 @@ public function testEditFormLinkOnPageWithFormBlock(EndToEndTester $I) ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - metabox: 'wp-convertkit-meta-box', - configuration: [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. @@ -270,12 +261,9 @@ public function testEditFormLinkOnPageWithFormBlockSpecifyingNonInlineForm(EndTo ); // Configure metabox's Form setting = None, ensuring we only test the block in Gutenberg. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - metabox: 'wp-convertkit-meta-box', - configuration: [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add block to Page, setting the Form setting to the value specified in the .env file. diff --git a/tests/EndToEnd/forms/general/NonInlineFormCest.php b/tests/EndToEnd/forms/general/NonInlineFormCest.php index 13fbfa037..c626e82b4 100644 --- a/tests/EndToEnd/forms/general/NonInlineFormCest.php +++ b/tests/EndToEnd/forms/general/NonInlineFormCest.php @@ -234,12 +234,9 @@ public function testDefaultNonInlineFormIgnoredWhenPageNonInlineFormDefined(EndT ); // Configure metabox's Form setting = Modal Form. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - metabox: 'wp-convertkit-meta-box', - configuration: [ - 'form' => [ 'select2', $_ENV['CONVERTKIT_API_FORM_FORMAT_MODAL_NAME'] ], - ] + form: $_ENV['CONVERTKIT_API_FORM_FORMAT_MODAL_NAME'] ); // Publish and view the Page on the frontend site. @@ -278,12 +275,9 @@ public function testPageLevelNoneSettingIgnored(EndToEndTester $I) ); // Configure metabox's Form setting = None. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - metabox: 'wp-convertkit-meta-box', - configuration: [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Publish and view the Page on the frontend site. @@ -323,12 +317,9 @@ public function testPageLevelNoneSettingHonored(EndToEndTester $I) ); // Configure metabox's Form setting = None. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - metabox: 'wp-convertkit-meta-box', - configuration: [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Publish and view the Page on the frontend site. @@ -366,12 +357,9 @@ public function testDefaultNonInlineFormIgnoredWhenPageNonInlineFormDefinedInBlo ); // Configure metabox's Form setting = None. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - metabox: 'wp-convertkit-meta-box', - configuration: [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Add Form block to the Page set to the Modal Form. @@ -513,12 +501,9 @@ public function testDefaultNonInlineFormIgnoredWhenPostNonInlineFormDefined(EndT ); // Configure metabox's Form setting = Modal Form. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - metabox: 'wp-convertkit-meta-box', - configuration: [ - 'form' => [ 'select2', $_ENV['CONVERTKIT_API_FORM_FORMAT_MODAL_NAME'] ], - ] + form: $_ENV['CONVERTKIT_API_FORM_FORMAT_MODAL_NAME'] ); // Publish and view the Post on the frontend site. @@ -615,12 +600,9 @@ public function testPostLevelNoneSettingIgnored(EndToEndTester $I) ); // Configure metabox's Form setting = None. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - metabox: 'wp-convertkit-meta-box', - configuration: [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Publish and view the Post on the frontend site. @@ -661,12 +643,9 @@ public function testPostLevelNoneSettingHonored(EndToEndTester $I) ); // Configure metabox's Form setting = None. - $I->configureMetaboxSettings( + $I->configurePluginSidebarSettings( $I, - metabox: 'wp-convertkit-meta-box', - configuration: [ - 'form' => [ 'select2', 'None' ], - ] + form: 'None' ); // Publish and view the Post on the frontend site. diff --git a/tests/EndToEnd/forms/post-types/CPTFormCest.php b/tests/EndToEnd/forms/post-types/CPTFormCest.php index fbefdf635..4fd14c8f1 100644 --- a/tests/EndToEnd/forms/post-types/CPTFormCest.php +++ b/tests/EndToEnd/forms/post-types/CPTFormCest.php @@ -32,7 +32,8 @@ public function _before(EndToEndTester $I) } /** - * Test that the Articles > Add New screen has expected a11y output, such as label[for]. + * Test that the Articles > Add New screen has expected a11y output, such as label[for], + * when using the Classic Editor. * * @since 2.4.3 * @@ -40,6 +41,9 @@ public function _before(EndToEndTester $I) */ public function testAccessibility(EndToEndTester $I) { + // Activate Classic Editor Plugin. + $I->activateThirdPartyPlugin($I, 'classic-editor'); + // Setup Kit Plugin. $I->setupKitPlugin($I); $I->setupKitPluginResources($I); @@ -50,6 +54,9 @@ public function testAccessibility(EndToEndTester $I) // Confirm that settings have label[for] attributes. $I->seeInSource('