@@ -45,6 +45,7 @@ public function testAccessibilityAndUTMParameters(EndToEndTester $I)
4545 $ I ->seeInSource ('<label for="debug"> ' );
4646 $ I ->seeInSource ('<label for="no_scripts"> ' );
4747 $ I ->seeInSource ('<label for="no_css"> ' );
48+ $ I ->seeInSource ('<label for="no_add_new_button"> ' );
4849 $ I ->seeInSource ('<label for="usage_tracking"> ' );
4950
5051 // Confirm that the UTM parameters exist for the documentation links.
@@ -778,6 +779,48 @@ public function testEnableAndDisableCSSSetting(EndToEndTester $I)
778779 $ I ->seeInSource ('<link rel="stylesheet" id="convertkit-frontend-css" href=" ' . $ _ENV ['WORDPRESS_URL ' ] . '/wp-content/plugins/convertkit/resources/frontend/css/frontend.css ' );
779780 }
780781
782+ /**
783+ * Test that no PHP errors or notices are displayed on the Plugin's Setting screen
784+ * when the Disable Add New Landing Page / Member Content button settings is unchecked, and that CSS is output
785+ * on the frontend web site.
786+ *
787+ * @since 3.2.0
788+ *
789+ * @param EndToEndTester $I Tester.
790+ */
791+ public function testEnableAndDisableAddNewLandingPageMemberContentButtonSetting (EndToEndTester $ I )
792+ {
793+ // Setup Plugin.
794+ $ I ->setupKitPlugin ($ I );
795+
796+ // Go to the Plugin's Settings Screen.
797+ $ I ->loadKitSettingsGeneralScreen ($ I );
798+
799+ // Tick field.
800+ $ I ->checkOption ('#no_add_new_button ' );
801+
802+ // Click the Save Changes button.
803+ $ I ->click ('Save Changes ' );
804+
805+ // Check that no PHP warnings or notices were output.
806+ $ I ->checkNoWarningsAndNoticesOnScreen ($ I );
807+
808+ // Check the field remains ticked.
809+ $ I ->seeCheckboxIsChecked ('#no_add_new_button ' );
810+
811+ // Untick field.
812+ $ I ->uncheckOption ('#no_add_new_button ' );
813+
814+ // Click the Save Changes button.
815+ $ I ->click ('Save Changes ' );
816+
817+ // Check that no PHP warnings or notices were output.
818+ $ I ->checkNoWarningsAndNoticesOnScreen ($ I );
819+
820+ // Check the field remains unticked.
821+ $ I ->dontSeeCheckboxIsChecked ('#no_add_new_button ' );
822+ }
823+
781824 /**
782825 * Test that no PHP errors or notices are displayed on the Plugin's Setting screen
783826 * when the Usage Tracking settings is unchecked, and that CSS is output
0 commit comments