From a1acdf517d1a591fd0822fe3e1250eba72bec85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Gu=CC=88nther?= Date: Thu, 5 Dec 2024 20:48:12 +0100 Subject: [PATCH] BUGFIX: Try to fix content node creation --- .../Fixtures/1Dimension/richTextEditor.e2e.js | 2 +- Tests/IntegrationTests/Fixtures/1Dimension/syncing.e2e.js | 4 ++++ Tests/IntegrationTests/utils.js | 3 --- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Tests/IntegrationTests/Fixtures/1Dimension/richTextEditor.e2e.js b/Tests/IntegrationTests/Fixtures/1Dimension/richTextEditor.e2e.js index 78ca3745bd..a3073b342f 100644 --- a/Tests/IntegrationTests/Fixtures/1Dimension/richTextEditor.e2e.js +++ b/Tests/IntegrationTests/Fixtures/1Dimension/richTextEditor.e2e.js @@ -17,7 +17,7 @@ test('Can crop an image', async t => { // const ckeContent = await Selector('.ck-content p'); await t .click(rteInspectorEditor.findReact('Button')); - await typeTextInline(t, '.ck-content p', testContent, false); + await typeTextInline(t, '.ck-content p', testContent, '', false); await t .wait(400) .click(Selector('#neos-Inspector-Apply')); diff --git a/Tests/IntegrationTests/Fixtures/1Dimension/syncing.e2e.js b/Tests/IntegrationTests/Fixtures/1Dimension/syncing.e2e.js index 1210c5f65e..e4dedd01ee 100644 --- a/Tests/IntegrationTests/Fixtures/1Dimension/syncing.e2e.js +++ b/Tests/IntegrationTests/Fixtures/1Dimension/syncing.e2e.js @@ -158,6 +158,8 @@ async function prepareContentElementConflictBetweenAdminAndEditor(t) { await t .wait(1000) .click(Page.treeNode.withText('Content Collection (main)')) + .click(Page.treeNode.withText('Content Collection (main)')) + .wait(1000) .click(Selector('#neos-ContentTree-AddNode')) .click(Selector('button#into')) .click(ReactSelector('NodeTypeItem').find('button>span>span').withText('Headline_Test')) @@ -218,6 +220,8 @@ async function prepareDocumentConflictBetweenAdminAndEditor(t) { await t .wait(1000) .click(Page.treeNode.withText('Content Collection (main)')) + .click(Page.treeNode.withText('Content Collection (main)')) + .wait(1000) .click(Selector('#neos-ContentTree-AddNode')) .click(Selector('button#into')) .click(ReactSelector('NodeTypeItem').find('button>span>span').withText('Headline_Test')); diff --git a/Tests/IntegrationTests/utils.js b/Tests/IntegrationTests/utils.js index 5317eb4593..220a83ef87 100644 --- a/Tests/IntegrationTests/utils.js +++ b/Tests/IntegrationTests/utils.js @@ -85,12 +85,10 @@ export async function typeTextInline(t, selector, text, textType, switchToIframe }; if (!Object.keys(textTypeToTagMap).includes(textType)) { - console.warn('Invalid textType, defaulting to "paragraph".'); textType = 'paragraph'; } const tagName = textTypeToTagMap[textType] || ''; - try { const contentIframeSelector = Selector('[name="neos-content-main"]', {timeout: 2000}); @@ -102,7 +100,6 @@ export async function typeTextInline(t, selector, text, textType, switchToIframe const element = window.document.querySelector(selector); const editor = element.closest('.ck-editor__editable'); const content = tagName !== '' ? `<${tagName}>${text}` : text; - console.log('content', content); editor.ckeditorInstance.data.set(content); }, {dependencies: {selector, text, tagName}}