Skip to content

Commit 6aff81d

Browse files
authored
Merge pull request #1058 from Kit/tests-no-forms-refactor
Tests: Classic Editor: No Forms: Refactor
2 parents ac0306c + cac6954 commit 6aff81d

2 files changed

Lines changed: 27 additions & 72 deletions

File tree

tests/EndToEnd/forms/post-types/ClassicEditorFormCest.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,33 @@ public function testAccessibility(EndToEndTester $I)
7474
}
7575
}
7676

77+
/**
78+
* Test that UTM parameters are included in links displayed in the metabox for the user to sign in to
79+
* their Kit account.
80+
*
81+
* @since 1.9.6
82+
*
83+
* @param EndToEndTester $I Tester.
84+
*/
85+
public function testUTMParametersExist(EndToEndTester $I)
86+
{
87+
// Setup Kit plugin with no credentials or data.
88+
$I->setupKitPluginCredentialsNoData($I);
89+
$I->setupKitPluginResourcesNoData($I);
90+
91+
// Navigate to Pages > Add New.
92+
$I->amOnAdminPage('post-new.php?post_type=page');
93+
94+
// Check that no PHP warnings or notices were output.
95+
$I->checkNoWarningsAndNoticesOnScreen($I);
96+
97+
// Check that the metabox is displayed.
98+
$I->seeElementInDOM('#wp-convertkit-meta-box');
99+
100+
// Confirm that UTM parameters exist for the 'sign in to Kit' link.
101+
$I->seeInSource('<a href="https://app.kit.com/?utm_source=wordpress&amp;utm_term=en_US&amp;utm_content=convertkit" target="_blank">sign in to Kit</a>');
102+
}
103+
77104
/**
78105
* Test that the 'Default' option for the Default Form setting in the Plugin Settings works when
79106
* creating and viewing a new WordPress Page, Post or Article, and there is no Default Form specified in the Plugin

tests/EndToEnd/forms/post-types/PageNoFormCest.php

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)