Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Welcome guide headline update #67654

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading