Skip to content

Commit

Permalink
chore(E2E): update button text for installation prompt in dashboard n…
Browse files Browse the repository at this point in the history
…otice
  • Loading branch information
Soare-Robert-Daniel committed Dec 19, 2024
1 parent 07f2122 commit d73cb1a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const SSTryButton: React.FC = () => {
installing || activating ? 'is-loading' : '',
]);

let buttonLabel = __('Try one of our ready to use Starter Sites', 'neve');
let buttonLabel = __('Explore Templates and Start Building Now!', 'neve');
if (installing) {
buttonLabel = __('Installing', 'neve');
}
Expand Down
10 changes: 4 additions & 6 deletions e2e-tests/specs/admin/tpc-notice-install.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ test.describe('Dashboard Notice', () => {

await expect(page).toHaveURL(/wp-admin\/index.php/);

await expect(page.locator('button.install-now')).toContainText(
'Try one of our ready to use Starter Sites'
);
await expect(page.locator('button.install-now')).toBeVisible();
await expect(page.locator('.button.install-now')).toBeVisible();
await expect(page.locator('a.ti-return-dashboard')).toBeVisible();

await Promise.all([
page.waitForURL(/wp-admin\/admin.php\?page=neve-onboarding/),
page.locator('button.install-now').click(),
expect(page.locator('button.install-now')).toContainText(
page.locator('.button.install-now').click(),
expect(page.locator('.button.install-now')).toContainText(
/(Activating|Installing)/
),
]);
Expand Down
6 changes: 4 additions & 2 deletions inc/core/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ public function welcome_notice_content() {
);

$onboarding_notice_exit_btn = sprintf(
'<a href="%1$s" class=" ti-return-dashboard button button-link button-hero install-now" >
'<a href="%1$s" class="ti-return-dashboard button button-link button-hero" >
<span>%2$s</span>
</a>',
esc_url( admin_url( '?page=neve-welcome' ) ),
Expand All @@ -523,7 +523,9 @@ public function welcome_notice_content() {
<h2 class="nv-notice-title">%2$s</h2>
<p class="about-description">%3$s</h3>
<div class="nv-notice-actions">
%4$s
<div id="neve-ss-install">
%4$s
</div>
%5$s
</div>
',
Expand Down

0 comments on commit d73cb1a

Please sign in to comment.