diff --git a/ghost/admin/app/components/koenig-lexical-editor.js b/ghost/admin/app/components/koenig-lexical-editor.js index 704aac7e6d..f2a471a463 100644 --- a/ghost/admin/app/components/koenig-lexical-editor.js +++ b/ghost/admin/app/components/koenig-lexical-editor.js @@ -680,7 +680,7 @@ export default class KoenigLexicalEditor extends Component { const KGEditorComponent = ({isInitInstance}) => { return ( -
+
{ }); }); + test.describe('Lexical Rendering', () => { + test.describe.configure({retries: 1}); + + test('Renders Lexical editor', async ({sharedPage: adminPage}) => { + await adminPage.goto('/ghost'); + + await createPostDraft(adminPage, {title: 'Lexical editor test', body: 'This is my post body.'}); + + // Check if the lexical editor is present + expect(await adminPage.locator('[data-kg="editor"]').first()).toBeVisible(); + }); + + test('Renders secondary hidden lexical editor', async ({sharedPage: adminPage}) => { + await adminPage.goto('/ghost'); + + await createPostDraft(adminPage, {title: 'Secondary lexical editor test', body: 'This is my post body.'}); + + // Check if the secondary lexical editor exists but is hidden. + expect(await adminPage.locator('[data-secondary-instance="true"]')).toBeHidden(); + }); + }); + test.describe('Update post', () => { test.describe.configure({retries: 1});