diff --git a/packages/playground/remote/src/lib/boot-playground-remote.ts b/packages/playground/remote/src/lib/boot-playground-remote.ts index 4b1e558d27..0ef0fc8a03 100644 --- a/packages/playground/remote/src/lib/boot-playground-remote.ts +++ b/packages/playground/remote/src/lib/boot-playground-remote.ts @@ -130,6 +130,9 @@ export async function bootPlaygroundRemote() { }); }, async goTo(requestedPath: string) { + if (!requestedPath.startsWith('/')) { + requestedPath = '/' + requestedPath; + } /** * People often forget to type the trailing slash at the end of * /wp-admin/ URL and end up with wrong relative hrefs. Let's diff --git a/packages/playground/website/cypress/e2e/blueprints.cy.ts b/packages/playground/website/cypress/e2e/blueprints.cy.ts index 1d104ca6c2..1a9a2db611 100644 --- a/packages/playground/website/cypress/e2e/blueprints.cy.ts +++ b/packages/playground/website/cypress/e2e/blueprints.cy.ts @@ -33,6 +33,15 @@ describe('Blueprints', () => { cy.wordPressDocument().its('body').should('contain', 'Sample Page'); }); + it('Landing page without the initial slash should work', () => { + const blueprint: Blueprint = { + landingPage: 'wp-admin/plugins.php', + login: true, + }; + cy.visit('/#' + JSON.stringify(blueprint)); + cy.wordPressDocument().its('body').should('contain.text', 'Plugins'); + }); + it('enableMultisite step should enable a multisite', () => { const blueprint: Blueprint = { landingPage: '/',