Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK: More isolated e2e tests (on their own page) #3543

Draft
wants to merge 1 commit into
base: 8.3
Choose a base branch
from

Conversation

mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented Jun 26, 2023

resolves: #3542

I tried to start with my proposed changes. For now i want to run the createNewNodes.e2e.js on their own site. But for some reason i can't create new nodes via the inline ui if there is no existing node in the content collection. (At least thats the difference between when the test is run on the home page. And removing the existing node on the homepage yields the same error)

So i tried to debug this test yarn run testcafe chrome Tests/IntegrationTests/Fixtures -T 'Can create content node from inside InlineUI' --debug-on-fail

It testcafe just says 1) Uncaught object "[object Object]" was thrown. Throw Error instead.. I could narrow it down via a try catch to the following lines. And after refining i found out that the line click(Selector('.neos-contentcollection')) was failing.

test('Can create content node from inside InlineUI', async t => {
const headlineTitle = 'Helloworld!';
subSection('Create a headline node');
await Page.waitForIframeLoading(t);
await t
.switchToIframe(contentIframeSelector)
.click(Selector('.neos-contentcollection'))
.click(Selector('#neos-InlineToolbar-AddNode'))
.switchToMainWindow()
.click(Selector('button#into'))
.click(ReactSelector('NodeTypeItem').withProps({nodeType: {label: 'Headline_Test'}}));

After putting it in a try catch, it logged

{
  callsite: CallsiteRecord {
    filename: 'Neos.Neos.Ui/Tests/IntegrationTests/Fixtures/1Dimension/createNewNodes.e2e.js',
    lineNum: 166,
    callsiteFrameIdx: 5,
    stackFrames: [
      [Object],    [Object],
      [Object],    [Object],
      [Object],    [Object],
      CallSite {}, [Object],
      [Object],    [Object]
    ],
    isV8Frames: true
  }
}

which is indeed not an error but a normal object ...

if i dont wrap it in a try catch, testcafe will just fail:

image

And without the try catch testcafe doesnt find the inline add node button ...

The tests Check the nodetype help in create dialog and Check that nodetype without help has no help button should currently fail due to the same behaviour ...

@mhsdesign mhsdesign changed the title TASK: More isolated e2e tests TASK: More isolated e2e tests (on their own page) Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant