diff --git a/packages/block-library/src/navigation-link/link-ui/page-creator.js b/packages/block-library/src/navigation-link/link-ui/page-creator.js index 63e1dc22b7c1e2..30d1799f190979 100644 --- a/packages/block-library/src/navigation-link/link-ui/page-creator.js +++ b/packages/block-library/src/navigation-link/link-ui/page-creator.js @@ -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; @@ -136,9 +136,9 @@ export function LinkUIPageCreator( { /> { 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 } );