From ba6ae472c31aabc42e22a173d8ad8e5536aa2f1d Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Fri, 2 Jun 2023 12:52:57 +0100 Subject: [PATCH] Renamed editor beta route closes https://github.com/TryGhost/Team/issues/3369 - removes `lexical` from user-visible URL - only renames path rather than renaming all associated files to keep changeset minimal prior to beta launch --- ghost/admin/app/router.js | 2 +- .../tests/acceptance/editor/lexical-test.js | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ghost/admin/app/router.js b/ghost/admin/app/router.js index 757bb99987..882b06451f 100644 --- a/ghost/admin/app/router.js +++ b/ghost/admin/app/router.js @@ -40,7 +40,7 @@ Router.map(function () { this.route('edit', {path: ':type/:post_id'}); }); - this.route('lexical-editor', function () { + this.route('lexical-editor', {path: 'editor-beta'}, function () { this.route('new', {path: ':type'}); this.route('edit', {path: ':type/:post_id'}); }); diff --git a/ghost/admin/tests/acceptance/editor/lexical-test.js b/ghost/admin/tests/acceptance/editor/lexical-test.js index 928acf6867..769ec38f57 100644 --- a/ghost/admin/tests/acceptance/editor/lexical-test.js +++ b/ghost/admin/tests/acceptance/editor/lexical-test.js @@ -30,7 +30,7 @@ describe('Acceptance: Lexical editor', function () { }); it('redirects to signin when not authenticated', async function () { - await visit('/lexical-editor/post/'); + await visit('/editor-beta/post/'); expect(currentURL(), 'currentURL').to.equal('/signin'); }); @@ -40,21 +40,21 @@ describe('Acceptance: Lexical editor', function () { config.save(); await loginAsRole('Administrator', this.server); - await visit('/lexical-editor/post/'); + await visit('/editor-beta/post/'); expect(currentURL(), 'currentURL').to.equal('/posts'); }); it('loads when editor.url is present', async function () { await loginAsRole('Administrator', this.server); - await visit('/lexical-editor/post/'); - expect(currentURL(), 'currentURL').to.equal('/lexical-editor/post/'); + await visit('/editor-beta/post/'); + expect(currentURL(), 'currentURL').to.equal('/editor-beta/post/'); }); it('shows feedback link in lexical editor', async function () { await loginAsRole('Administrator', this.server); - await visit('/lexical-editor/post/'); - expect(currentURL(), 'currentURL').to.equal('/lexical-editor/post/'); + await visit('/editor-beta/post/'); + expect(currentURL(), 'currentURL').to.equal('/editor-beta/post/'); expect(find('.gh-editor-feedback'), 'feedback button').to.exist; }); @@ -67,7 +67,7 @@ describe('Acceptance: Lexical editor', function () { await loginAsRole('Administrator', this.server); await visit(`/editor/post/${post.id}`); - expect(currentURL()).to.equal(`/lexical-editor/post/${post.id}`); + expect(currentURL()).to.equal(`/editor-beta/post/${post.id}`); }); it('redirects lexical editor to mobiledoc editor when post.mobiledoc is present', async function () { @@ -76,7 +76,7 @@ describe('Acceptance: Lexical editor', function () { }); await loginAsRole('Administrator', this.server); - await visit(`/lexical-editor/post/${post.id}`); + await visit(`/editor-beta/post/${post.id}`); expect(currentURL()).to.equal(`/editor/post/${post.id}`); });