@@ -6155,6 +6155,9 @@ public function testGetLandingPageHTML()
6155
6155
$ result = $ this ->api ->get_landing_page_html ($ _ENV ['CONVERTKIT_API_LANDING_PAGE_URL ' ]);
6156
6156
$ this ->assertNotInstanceOf (WP_Error::class, $ result );
6157
6157
$ this ->assertStringContainsString ('<form method="POST" action="https://app.convertkit.com/forms/ ' . $ _ENV ['CONVERTKIT_API_LANDING_PAGE_ID ' ] . '/subscriptions" data-sv-form=" ' . $ _ENV ['CONVERTKIT_API_LANDING_PAGE_ID ' ] . '" data-uid="99f1db6843" class="formkit-form" ' , $ result );
6158
+
6159
+ // Check that rocket-loader.min.js has been removed, as including it breaks landing page redirects.
6160
+ $ this ->assertStringNotContainsString ('rocket-loader.min.js ' , $ result );
6158
6161
}
6159
6162
6160
6163
/**
@@ -6171,6 +6174,9 @@ public function testGetLandingPageWithCharacterEncodingHTML()
6171
6174
6172
6175
// Assert that character encoding works, and that special characters are not malformed.
6173
6176
$ this ->assertStringContainsString ('Vantar þinn ungling sjálfstraust í stærðfræði? ' , $ result );
6177
+
6178
+ // Check that rocket-loader.min.js has been removed, as including it breaks landing page redirects.
6179
+ $ this ->assertStringNotContainsString ('rocket-loader.min.js ' , $ result );
6174
6180
}
6175
6181
6176
6182
/**
@@ -6184,6 +6190,9 @@ public function testGetLegacyLandingPageHTML()
6184
6190
$ result = $ this ->api ->get_landing_page_html ($ _ENV ['CONVERTKIT_API_LEGACY_LANDING_PAGE_URL ' ]);
6185
6191
$ this ->assertNotInstanceOf (WP_Error::class, $ result );
6186
6192
$ this ->assertStringContainsString ('<form id="ck_subscribe_form" class="ck_subscribe_form" action="https://app.convertkit.com/landing_pages/ ' . $ _ENV ['CONVERTKIT_API_LEGACY_LANDING_PAGE_ID ' ] . '/subscribe" data-remote="true"> ' , $ result );
6193
+
6194
+ // Check that rocket-loader.min.js has been removed, as including it breaks landing page redirects.
6195
+ $ this ->assertStringNotContainsString ('rocket-loader.min.js ' , $ result );
6187
6196
}
6188
6197
6189
6198
/**
0 commit comments