Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function LinkUIPageCreator( {
initialTitle = '',
} ) {
const [ title, setTitle ] = useState( initialTitle );
const [ shouldPublish, setShouldPublish ] = useState( false );
const [ shouldPublish, setShouldPublish ] = useState( true );

// Check if the title is valid for submission
const isTitleValid = title.trim().length > 0;
Expand Down Expand Up @@ -136,9 +136,9 @@ export function LinkUIPageCreator( {
/>

<CheckboxControl
label={ __( 'Publish immediately' ) }
label={ __( 'Publish' ) }
help={ __(
'If unchecked, the page will be created as a draft.'
"Turn off to save as a draft. Drafts won't appear on your site until published."
) }
checked={ shouldPublish }
onChange={ setShouldPublish }
Expand Down
7 changes: 3 additions & 4 deletions test/e2e/specs/editor/blocks/navigation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -955,15 +955,14 @@ test.describe( 'Navigation block', () => {
const createPageButton = page.getByRole( 'button', {
name: 'Create page',
} );
// Publish the page immediately
// Verify the Publish checkbox (on by default)
await page.keyboard.press( 'Tab' );
const publishCheckbox = page.getByRole( 'checkbox', {
name: 'Publish immediately',
name: 'Publish',
} );
// expect to be on the checkbox
await expect( publishCheckbox ).toBeFocused();
await page.keyboard.press( 'Space' );
// expect the checkbox to be checked
// expect the checkbox to be checked (publish is the default)
await expect( publishCheckbox ).toBeChecked();
// Tab to the Create page button
await pageUtils.pressKeys( 'Tab', { times: 2 } );
Expand Down
Loading