Skip to content

Commit

Permalink
BUGFIX: Try to fix content node creation
Browse files Browse the repository at this point in the history
  • Loading branch information
markusguenther committed Dec 5, 2024
1 parent e6152f0 commit a1acdf5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
4 changes: 4 additions & 0 deletions Tests/IntegrationTests/Fixtures/1Dimension/syncing.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down Expand Up @@ -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'));
Expand Down
3 changes: 0 additions & 3 deletions Tests/IntegrationTests/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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});

Expand All @@ -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}</${tagName}>` : text;
console.log('content', content);
editor.ckeditorInstance.data.set(content);
},
{dependencies: {selector, text, tagName}}
Expand Down

0 comments on commit a1acdf5

Please sign in to comment.