Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions tests/EndToEnd/forms/general/NonInlineFormCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ public function testDefaultNonInlineFormIgnoredWhenDefaultPageNonInlineFormDefin
),
]
);
$I->setupKitPluginResources($I);

// Add a Page using the Gutenberg editor.
$I->addGutenbergPage($I, 'page', 'Kit: Page: Non-Inline Form: Default');
Expand Down Expand Up @@ -233,6 +234,7 @@ public function testDefaultNonInlineFormIgnoredWhenPageNonInlineFormDefined(EndT
),
]
);
$I->setupKitPluginResources($I);

// Add a Page using the Gutenberg editor.
$I->addGutenbergPage(
Expand Down Expand Up @@ -276,6 +278,7 @@ public function testPageLevelNoneSettingIgnored(EndToEndTester $I)
),
]
);
$I->setupKitPluginResources($I);

// Add a Page using the Gutenberg editor.
$I->addGutenbergPage(
Expand Down Expand Up @@ -320,6 +323,7 @@ public function testPageLevelNoneSettingHonored(EndToEndTester $I)
'non_inline_form_honor_none_setting' => 'on',
]
);
$I->setupKitPluginResources($I);

// Add a Page using the Gutenberg editor.
$I->addGutenbergPage(
Expand Down Expand Up @@ -362,6 +366,7 @@ public function testDefaultNonInlineFormIgnoredWhenPageNonInlineFormDefinedInBlo
),
]
);
$I->setupKitPluginResources($I);

// Add a Page using the Gutenberg editor.
$I->addGutenbergPage(
Expand Down Expand Up @@ -415,6 +420,7 @@ public function testDefaultNonInlineFormIgnoredWhenPageNonInlineFormDefinedInSho
),
]
);
$I->setupKitPluginResources($I);

// Add a Page using the Classic Editor.
$I->addClassicEditorPage(
Expand Down Expand Up @@ -470,6 +476,7 @@ public function testDefaultNonInlineFormIgnoredWhenDefaultPostNonInlineFormDefin
),
]
);
$I->setupKitPluginResources($I);

// Add a Post using the Gutenberg editor.
$I->addGutenbergPage(
Expand Down Expand Up @@ -514,6 +521,7 @@ public function testDefaultNonInlineFormIgnoredWhenPostNonInlineFormDefined(EndT
),
]
);
$I->setupKitPluginResources($I);

// Add a Post using the Gutenberg editor.
$I->addGutenbergPage(
Expand Down Expand Up @@ -558,6 +566,7 @@ public function testDefaultNonInlineFormIgnoredWhenPostCategoryNonInlineFormDefi
),
]
);
$I->setupKitPluginResources($I);

// Create Category.
$termID = $I->haveTermInDatabase(
Expand Down Expand Up @@ -614,6 +623,7 @@ public function testPostLevelNoneSettingIgnored(EndToEndTester $I)
),
]
);
$I->setupKitPluginResources($I);

// Add a Post using the Gutenberg editor.
$I->addGutenbergPage(
Expand Down Expand Up @@ -659,6 +669,7 @@ public function testPostLevelNoneSettingHonored(EndToEndTester $I)
'non_inline_form_honor_none_setting' => 'on',
]
);
$I->setupKitPluginResources($I);

// Add a Post using the Gutenberg editor.
$I->addGutenbergPage(
Expand Down Expand Up @@ -703,6 +714,7 @@ public function testNonInlineFormLimitPerSession(EndToEndTester $I)
'non_inline_form_limit_per_session' => 'on',
]
);
$I->setupKitPluginResources($I);

// Create a Page in the database that uses a different non-inline form.
$I->havePostInDatabase(
Expand Down Expand Up @@ -760,6 +772,7 @@ public function testNonInlineFormLimitPerSessionDoesNotSetCookieWhenDisabled(End
),
]
);
$I->setupKitPluginResources($I);

// Create a Page in the database.
$I->havePostInDatabase(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function _before(EndToEndTester $I)
// Activate and Setup Kit plugin.
$I->activateKitPlugin($I);
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Clear up any cache configuration files that might exist from previous tests.
$I->deleteWPCacheConfigFiles($I);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public function testNoFilterOnPrivateCPT(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Navigate to Private CPT.
$I->amOnAdminPage('edit.php?post_type=private');
Expand All @@ -103,6 +104,7 @@ public function testFilterByProduct(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create Article, set to restrict content to a Product.
$I->createRestrictedContentPage(
Expand Down Expand Up @@ -153,6 +155,7 @@ public function testFilterByTag(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create Article, set to restrict content to a Product.
$I->createRestrictedContentPage(
Expand Down Expand Up @@ -203,6 +206,7 @@ public function testFilterByForm(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create Article, set to restrict content to a Product.
$I->createRestrictedContentPage(
Expand Down Expand Up @@ -253,6 +257,7 @@ public function testFilterByAllMemberOnlyContent(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create a mix of Posts restricted and not restricted to Forms, Tags and Products.
$I->createRestrictedContentPage(
Expand Down Expand Up @@ -340,6 +345,7 @@ public function testNoFilteringWhenAllContentSelected(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create a mix of Posts restricted and not restricted to Forms, Tags and Products.
$I->createRestrictedContentPage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public function testFilterByProduct(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create Page, set to restrict content to a Product.
$I->createRestrictedContentPage(
Expand Down Expand Up @@ -126,6 +127,7 @@ public function testFilterByTag(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create Page, set to restrict content to a Tag.
$I->createRestrictedContentPage(
Expand Down Expand Up @@ -175,6 +177,7 @@ public function testFilterByForm(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create Page, set to restrict content to a Form.
$I->createRestrictedContentPage(
Expand Down Expand Up @@ -225,6 +228,7 @@ public function testFilterByAllMemberOnlyContent(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create a mix of Pages restricted and not restricted to Forms, Tags and Products.
$I->createRestrictedContentPage(
Expand Down Expand Up @@ -312,6 +316,7 @@ public function testNoFilteringWhenAllContentSelected(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create a mix of Posts restricted and not restricted to Forms, Tags and Products.
$I->createRestrictedContentPage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public function testFilterByProduct(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create Post, set to restrict content to a Product.
$I->createRestrictedContentPage(
Expand Down Expand Up @@ -127,6 +128,7 @@ public function testFilterByTag(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create Post, set to restrict content to a Tag.
$I->createRestrictedContentPage(
Expand Down Expand Up @@ -177,6 +179,7 @@ public function testFilterByForm(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create Post, set to restrict content to a Form.
$I->createRestrictedContentPage(
Expand Down Expand Up @@ -227,6 +230,7 @@ public function testFilterByAllMemberOnlyContent(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create a mix of Posts restricted and not restricted to Forms, Tags and Products.
$I->createRestrictedContentPage(
Expand Down Expand Up @@ -314,6 +318,7 @@ public function testNoFilteringWhenAllContentSelected(EndToEndTester $I)
{
// Setup Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Create a mix of Posts restricted and not restricted to Forms, Tags and Products.
$I->createRestrictedContentPage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function testRestrictContentByForm(EndToEndTester $I)
{
// Setup Kit Plugin, disabling JS.
$I->setupKitPluginDisableJS($I);
$I->setupKitPluginResources($I);

// Add a Page using the Gutenberg editor.
$I->addGutenbergPage(
Expand Down Expand Up @@ -85,6 +86,7 @@ public function testRestrictContentByFormWithLoginModal(EndToEndTester $I)
{
// Setup Kit Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Add a Page using the Gutenberg editor.
$I->addGutenbergPage(
Expand Down Expand Up @@ -137,6 +139,7 @@ public function testRestrictContentByInvalidForm(EndToEndTester $I)
{
// Setup Kit Plugin, disabling JS.
$I->setupKitPluginDisableJS($I);
$I->setupKitPluginResources($I);

// Programmatically create a Page.
$pageID = $I->createRestrictedContentPage(
Expand Down Expand Up @@ -166,6 +169,7 @@ public function testRestrictContentByFormUsingQuickEdit(EndToEndTester $I)
{
// Setup Kit Plugin, disabling JS.
$I->setupKitPluginDisableJS($I);
$I->setupKitPluginResources($I);

// Programmatically create a Page.
$pageID = $I->createRestrictedContentPage(
Expand Down Expand Up @@ -205,6 +209,7 @@ public function testRestrictContentByFormUsingBulkEdit(EndToEndTester $I)
{
// Setup Kit Plugin, disabling JS.
$I->setupKitPluginDisableJS($I);
$I->setupKitPluginResources($I);

// Programmatically create two Pages.
$pageIDs = array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function _before(EndToEndTester $I)

// Setup Kit Plugin, disabling JS.
$I->setupKitPluginDisableJS($I);
$I->setupKitPluginResources($I);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function testRestrictContentByTag(EndToEndTester $I)
{
// Setup Kit Plugin, disabling JS.
$I->setupKitPluginDisableJS($I);
$I->setupKitPluginResources($I);

// Add a Page using the Gutenberg editor.
$I->addGutenbergPage(
Expand Down Expand Up @@ -88,6 +89,7 @@ public function testRestrictContentByTagWithRequireLoginEnabled(EndToEndTester $
{
// Setup Kit Plugin, disabling JS.
$I->setupKitPluginDisableJS($I);
$I->setupKitPluginResources($I);

// Setup Restrict Content functionality with Require Login enabled.
$I->setupKitPluginRestrictContent(
Expand Down Expand Up @@ -156,6 +158,7 @@ public function testRestrictContentByTagWithRecaptchaAndRequireLoginEnabled(EndT
'recaptcha_minimum_score' => '0.01', // Set a low score to ensure reCAPTCHA passes the subscriber.
]
);
$I->setupKitPluginResources($I);

// Define reCAPTCHA settings.
$options = [
Expand Down Expand Up @@ -220,6 +223,7 @@ public function testRestrictContentByTagUsingLoginModal(EndToEndTester $I)
{
// Setup Kit Plugin.
$I->setupKitPlugin($I);
$I->setupKitPluginResources($I);

// Define Restrict Content settings.
$options = [
Expand Down Expand Up @@ -282,6 +286,7 @@ public function testRestrictContentByInvalidTag(EndToEndTester $I)
{
// Setup Kit Plugin, disabling JS.
$I->setupKitPluginDisableJS($I);
$I->setupKitPluginResources($I);

// Programmatically create a Page.
$pageID = $I->createRestrictedContentPage(
Expand Down Expand Up @@ -319,6 +324,7 @@ public function testRestrictContentByTagWithRecaptchaEnabled(EndToEndTester $I)
'recaptcha_minimum_score' => '0.01', // Set a low score to ensure reCAPTCHA passes the subscriber.
]
);
$I->setupKitPluginResources($I);

// Setup Restrict Content functionality.
$I->setupKitPluginRestrictContent($I);
Expand Down Expand Up @@ -379,6 +385,7 @@ public function testRestrictContentByTagWithRecaptchaEnabledWithHighMinimumScore
'recaptcha_minimum_score' => '0.99', // Set a high score to ensure reCAPTCHA blocks the subscriber.
]
);
$I->setupKitPluginResources($I);

// Setup Restrict Content functionality.
$I->setupKitPluginRestrictContent($I);
Expand Down Expand Up @@ -438,6 +445,7 @@ public function testRestrictContentByTagUsingQuickEdit(EndToEndTester $I)
{
// Setup Kit Plugin, disabling JS.
$I->setupKitPluginDisableJS($I);
$I->setupKitPluginResources($I);

// Programmatically create a Page.
$pageID = $I->createRestrictedContentPage(
Expand Down Expand Up @@ -477,6 +485,7 @@ public function testRestrictContentByTagUsingBulkEdit(EndToEndTester $I)
{
// Setup Kit Plugin, disabling JS.
$I->setupKitPluginDisableJS($I);
$I->setupKitPluginResources($I);

// Programmatically create two Pages.
$pageIDs = array(
Expand Down
Loading