diff --git a/test/e2e/specs/editor/blocks/navigation.spec.js b/test/e2e/specs/editor/blocks/navigation.spec.js index dc303141957310..e776b160d55bc8 100644 --- a/test/e2e/specs/editor/blocks/navigation.spec.js +++ b/test/e2e/specs/editor/blocks/navigation.spec.js @@ -396,6 +396,26 @@ test.describe( 'Navigation block', () => { `, }; + test.beforeAll( async ( { requestUtils } ) => { + // We need pages to be published so the Link Control can return pages + await requestUtils.createPage( { + title: 'Test Page 1', + status: 'publish', + } ); + await requestUtils.createPage( { + title: 'Test Page 2', + status: 'publish', + } ); + await requestUtils.createPage( { + title: 'Test Page 3', + status: 'publish', + } ); + } ); + + test.afterAll( async ( { requestUtils } ) => { + await requestUtils.deleteAllPages(); + } ); + test.use( { linkControl: async ( { page }, use ) => { await use( new LinkControl( { page } ) );