0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

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
This commit is contained in:
Kevin Ansfield 2023-06-02 12:52:57 +01:00
parent 21bedec086
commit ba6ae472c3
No known key found for this signature in database
2 changed files with 9 additions and 9 deletions

View file

@ -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'});
});

View file

@ -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}`);
});