Skip to content

Commit

Permalink
Welcome guide headline update (#67654)
Browse files Browse the repository at this point in the history
* Welcome guide headline update

* Updated texts in automated test code

----

Co-authored-by: benazeer-ben <benazeer@git.wordpress.org>
Co-authored-by: annezazu <annezazu@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>
  • Loading branch information
4 people authored Dec 6, 2024
1 parent 5ed400c commit 6c312f7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 26 deletions.
10 changes: 5 additions & 5 deletions packages/edit-post/src/components/welcome-guide/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function WelcomeGuideDefault() {
return (
<Guide
className="edit-post-welcome-guide"
contentLabel={ __( 'Welcome to the block editor' ) }
contentLabel={ __( 'Welcome to the editor' ) }
finishButtonText={ __( 'Get started' ) }
onFinish={ () => toggleFeature( 'welcomeGuide' ) }
pages={ [
Expand All @@ -32,7 +32,7 @@ export default function WelcomeGuideDefault() {
content: (
<>
<h1 className="edit-post-welcome-guide__heading">
{ __( 'Welcome to the block editor' ) }
{ __( 'Welcome to the editor' ) }
</h1>
<p className="edit-post-welcome-guide__text">
{ __(
Expand All @@ -52,7 +52,7 @@ export default function WelcomeGuideDefault() {
content: (
<>
<h1 className="edit-post-welcome-guide__heading">
{ __( 'Make each block your own' ) }
{ __( 'Customize each block' ) }
</h1>
<p className="edit-post-welcome-guide__text">
{ __(
Expand All @@ -72,7 +72,7 @@ export default function WelcomeGuideDefault() {
content: (
<>
<h1 className="edit-post-welcome-guide__heading">
{ __( 'Get to know the block library' ) }
{ __( 'Explore all blocks' ) }
</h1>
<p className="edit-post-welcome-guide__text">
{ createInterpolateElement(
Expand Down Expand Up @@ -102,7 +102,7 @@ export default function WelcomeGuideDefault() {
content: (
<>
<h1 className="edit-post-welcome-guide__heading">
{ __( 'Learn how to use the block editor' ) }
{ __( 'Learn more' ) }
</h1>
<p className="edit-post-welcome-guide__text">
{ createInterpolateElement(
Expand Down
6 changes: 3 additions & 3 deletions packages/edit-widgets/src/components/welcome-guide/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default function WelcomeGuide() {
content: (
<>
<h1 className="edit-widgets-welcome-guide__heading">
{ __( 'Make each block your own' ) }
{ __( 'Customize each block' ) }
</h1>
<p className="edit-widgets-welcome-guide__text">
{ __(
Expand All @@ -138,7 +138,7 @@ export default function WelcomeGuide() {
content: (
<>
<h1 className="edit-widgets-welcome-guide__heading">
{ __( 'Get to know the block library' ) }
{ __( 'Explore all blocks' ) }
</h1>
<p className="edit-widgets-welcome-guide__text">
{ createInterpolateElement(
Expand Down Expand Up @@ -169,7 +169,7 @@ export default function WelcomeGuide() {
content: (
<>
<h1 className="edit-widgets-welcome-guide__heading">
{ __( 'Learn how to use the block editor' ) }
{ __( 'Learn more' ) }
</h1>
<p className="edit-widgets-welcome-guide__text">
{ createInterpolateElement(
Expand Down
28 changes: 10 additions & 18 deletions test/e2e/specs/editor/various/nux.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,36 @@ test.describe( 'New User Experience (NUX)', () => {
await admin.createNewPost( { showWelcomeGuide: true } );

const welcomeGuide = page.getByRole( 'dialog', {
name: 'Welcome to the block editor',
name: 'Welcome to the editor',
} );
const guideHeading = welcomeGuide.getByRole( 'heading', { level: 1 } );
const nextButton = welcomeGuide.getByRole( 'button', { name: 'Next' } );
const prevButton = welcomeGuide.getByRole( 'button', {
name: 'Previous',
} );

await expect( guideHeading ).toHaveText(
'Welcome to the block editor'
);
await expect( guideHeading ).toHaveText( 'Welcome to the editor' );

await nextButton.click();
await expect( guideHeading ).toHaveText( 'Make each block your own' );
await expect( guideHeading ).toHaveText( 'Customize each block' );

await prevButton.click();
// Guide should be on page 1 of 4
await expect( guideHeading ).toHaveText(
'Welcome to the block editor'
);
await expect( guideHeading ).toHaveText( 'Welcome to the editor' );

// Press the button for Page 2.
await welcomeGuide
.getByRole( 'button', { name: 'Page 2 of 4' } )
.click();
await expect( guideHeading ).toHaveText( 'Make each block your own' );
await expect( guideHeading ).toHaveText( 'Customize each block' );

// Press the right arrow key for Page 3.
await page.keyboard.press( 'ArrowRight' );
await expect( guideHeading ).toHaveText(
'Get to know the block library'
);
await expect( guideHeading ).toHaveText( 'Explore all blocks' );

// Press the right arrow key for Page 4.
await page.keyboard.press( 'ArrowRight' );
await expect( guideHeading ).toHaveText(
'Learn how to use the block editor'
);
await expect( guideHeading ).toHaveText( 'Learn more' );

// Click on the *visible* 'Get started' button.
await welcomeGuide
Expand Down Expand Up @@ -77,7 +69,7 @@ test.describe( 'New User Experience (NUX)', () => {
await admin.createNewPost( { showWelcomeGuide: true } );

const welcomeGuide = page.getByRole( 'dialog', {
name: 'Welcome to the block editor',
name: 'Welcome to the editor',
} );

await expect( welcomeGuide ).toBeVisible();
Expand All @@ -100,7 +92,7 @@ test.describe( 'New User Experience (NUX)', () => {
await admin.createNewPost( { showWelcomeGuide: true } );

const welcomeGuide = page.getByRole( 'dialog', {
name: 'Welcome to the block editor',
name: 'Welcome to the editor',
} );

await expect( welcomeGuide ).toBeVisible();
Expand All @@ -117,7 +109,7 @@ test.describe( 'New User Experience (NUX)', () => {
} ) => {
await admin.createNewPost();
const welcomeGuide = page.getByRole( 'dialog', {
name: 'Welcome to the block editor',
name: 'Welcome to the editor',
} );

await expect( welcomeGuide ).toBeHidden();
Expand Down

0 comments on commit 6c312f7

Please sign in to comment.