-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
BUGFIX SpeedUp Inspector Title E2E Test #3688
Conversation
Previously do to some automatic magic tescafe would wait before clicking into the iframe because the unappliedChangesOverlay is already in the dom and this warning is shown: > TestCafe cannot interact with the <iframe name="neos-content-main"> element because another element obstructs it. When something overlaps the action target, TestCafe performs the action with the topmost element at the original target's location. The following element with a greater z-order replaced the original action target: <div class="unappliedChangesOverlay">. Review your code to prevent this behavior. This waiting results in a super slow down of multiple seconds! To fix this we dont attempt to click directly in the iframe via selector but we use click left to the inspector (via negative offset) that allows to trick tescafe. Alternative options are possibly to use a ClientFunction, absolute coordinate clicking (doesnt seem possible with testcafe) or adding a timeout `Selector('iframe', {timeout: 200})` to the selector, which would still cause the warning to dispatch though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mhsdesign,
makes total sense. I wouldn't even call that a hack, since the whole purpose of the unapplied changes overlay is to obstruct the <iframe/>
, which is duely recognized by test café :)
I read your change as "click somewhere in the general area where the guest frame should be, expect it to be obstructed and to trigger the unapplied changes dialog".
So, overall this LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can verify that it works, and it is much faster for the test cases.
.click(Selector('#neos-UnappliedChangesDialog-apply')) | ||
.expect(InspectorTitleProperty.value) | ||
.eql('Home-1-3') | ||
.click(Selector('[name="neos-content-main"]')) | ||
.click(Selector('#neos-Inspector'), {offsetX: -400}) // hack to click into the iframe even with overlaying changes div in dom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a worst-case screen size, it can happen that you click the left sidebar instead of the content canvas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes and that still would trigger the overlay ^^ also the tests are run in a fixed window sized :D
Previously do to some automatic magic tescafe would wait before clicking into the iframe because the unappliedChangesOverlay is already in the dom and this warning is shown:
This waiting results in a super slow down of multiple seconds! To fix this we dont attempt to click directly in the iframe via selector but we use click left to the inspector (via negative offset) that allows to trick tescafe.
Alternative options are possibly to use a ClientFunction, absolute coordinate clicking (doesnt seem possible with testcafe) or adding a timeout
Selector('iframe', {timeout: 200})
to the selector, which would still cause the warning to dispatch though.What I did
How I did it
How to verify it