Skip to content

Commit

Permalink
Fix snapshot test for oauth with license key
Browse files Browse the repository at this point in the history
  • Loading branch information
tarecord committed Sep 13, 2024
1 parent 2f5d4d3 commit 4f13cbd
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 32 deletions.
2 changes: 1 addition & 1 deletion tests/wpunit/Admin/Fields/FieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public function it_should_render_correct_html_for_oauth_resource_with_license_ke
update_option( 'test_storage', [
'stellarwp_auth_url_service_oauth_with_license_key_field_1' => [
'expiration' => 0,
'value' => 'https://licensing.stellarwp.com/account-auth?uplink_domain=&uplink_slug=service-oauth-with-license-key-field-1&_uplink_nonce=535281edcd',
'value' => 'https://licensing.stellarwp.com/account-auth',
]
] );
$collection = $this->container->get( Collection::class );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@

<div class="stellarwp-uplink__license-field">
<div
class="stellarwp-uplink-license-key-field"
id="/var/www/html/wp-content/plugins/uplink/tests/service-oauth-with-license-key-field-1.php"
data-slug="/var/www/html/wp-content/plugins/uplink/tests/service-oauth-with-license-key-field-1.php"
data-plugin="/var/www/html/wp-content/plugins/uplink/tests/service-oauth-with-license-key-field-1.php"
data-plugin-slug="service-oauth-with-license-key-field-1"
data-action="test"
>
<fieldset class="stellarwp-uplink__settings-group">
<input type='hidden' name='option_page' value='stellarwp_uplink_group_service-oauth-with-license-key-field-1' /><input type="hidden" name="action" value="update" /><input type="hidden" id="_wpnonce" name="_wpnonce" value="535281edcd" /><input type="hidden" name="_wp_http_referer" value="" />

<input
type="text"
name=""
value=""
placeholder="License key"
class="regular-text stellarwp-uplink__settings-field"
/>
<p class="tooltip description">
A valid license key is required for support and updates</p>
<div class="license-test-results">
<img src="http://wordpress.test/wp-admin/images/wpspin_light.gif" class="ajax-loading-license" alt="Loading" style="display: none"/>
<div class="key-validity"></div>
</div>
</fieldset>
<input type="hidden" class="wp-nonce-fluent" name="stellarwp-uplink-license-key-nonce__service-oauth-with-license-key-field-1" value="535281edcd" /> </div>
</div>

<div class="stellarwp-uplink__license-field">
<div
class="stellarwp-uplink-license-key-field"
id="/var/www/html/wp-content/plugins/uplink/tests/service-oauth-with-license-key-field-1.php"
data-slug="/var/www/html/wp-content/plugins/uplink/tests/service-oauth-with-license-key-field-1.php"
data-plugin="/var/www/html/wp-content/plugins/uplink/tests/service-oauth-with-license-key-field-1.php"
data-plugin-slug="service-oauth-with-license-key-field-1"
data-action="test"
>
<fieldset class="stellarwp-uplink__settings-group">
<input type='hidden' name='option_page' value='stellarwp_uplink_group_service-oauth-with-license-key-field-1' /><input type="hidden" name="action" value="update" /><input type="hidden" id="_wpnonce" name="_wpnonce" value="535281edcd" /><input type="hidden" name="_wp_http_referer" value="" />

<input
type="text"
name=""
value=""
placeholder="License key"
class="regular-text stellarwp-uplink__settings-field"
/>

<div class="uplink-authorize-container">
<a href="https://licensing.stellarwp.com/account-auth?uplink_domain=&#038;uplink_slug=service-oauth-with-license-key-field-1&#038;_uplink_nonce=535281edcd?uplink_callback=aHR0cDovL3dvcmRwcmVzcy50ZXN0L3dwLWFkbWluL2luZGV4LnBocD91cGxpbmtfc2x1Zz1zZXJ2aWNlLW9hdXRoLXdpdGgtbGljZW5zZS1rZXktZmllbGQtMSZfdXBsaW5rX25vbmNlPTUzNTI4MWVkY2Q1MzUyODFlZA%3D%3D"
<a href="https://licensing.stellarwp.com/account-auth?uplink_callback=aHR0cDovL3dvcmRwcmVzcy50ZXN0L3dwLWFkbWluL2luZGV4LnBocD91cGxpbmtfZG9tYWluPWh0dHAlM0ElMkYlMkZ3b3JkcHJlc3MudGVzdCZ1cGxpbmtfc2x1Zz1zZXJ2aWNlLW9hdXRoLXdpdGgtbGljZW5zZS1rZXktZmllbGQtMSZfdXBsaW5rX25vbmNlPTUzNTI4MWVkY2Q1MzUyODFlZA%3D%3D"
target="_blank"
class="button uplink-authorize not-authorized" >
class="button uplink-authorize not-authorized" data-plugin-slug="service-oauth-with-license-key-field-1"
>
Connect </a>
</div>

<p class="tooltip description">
A valid license key is required for support and updates</p>
<div class="license-test-results">
<img src="http://wordpress.test/wp-admin/images/wpspin_light.gif" class="ajax-loading-license" alt="Loading" style="display: none"/>
<div class="key-validity"></div>
</div>
</fieldset>
<input type="hidden" class="wp-nonce-fluent" name="stellarwp-uplink-license-key-nonce__service-oauth-with-license-key-field-1" value="535281edcd" /> </div>
</div>

0 comments on commit 4f13cbd

Please sign in to comment.