Repository navigation
Fix editor canvas detaching error in e2e tests - #49374
Conversation
draganescu
left a comment
There was a problem hiding this comment.
I have tested this with a failing test because of the detached iframe problem and it fixes the issue successfully.
|
@kevin940726, tests seem to be failing on CI, you can see inline comments on the files tab. |
8df2920 to
b3a7952
Compare
|
@Mamaduka Oops, yep, I'll fix them! Thanks! |
|
Size Change: 0 B Total Size: 1.34 MB ℹ️ View Unchanged
|
|
@kevin940726, maybe we should use the method from #49203 to enter editing mode using query args for the templates parts tests where it makes sense. Then we can have a separate test for the site editor to confirm that clicking on the body works. I know that this doesn't solve the frame getting detached, but in the context of these tests might make more sense. P.S. I might have a branch locally where I started updating tests. |
I 100% agree. Let's go for that!
This is still an issue though, and it's causing some other flakinesses. I need to come up with a better way that's stable but also ergonomically easy-to-use (doesn't require a separate |
b3a7952 to
7aff89a
Compare
|
@kevin940726, I think the latest approach worked 🎉 I restarted the tests to be sure, but we can go with this universal fix. |
What?
For some reason that I don't know yet, the editor canvas in the site editor will detach and attach itself on the first load. It's likely caused by a recent commit because it was not happening before for me. This however causes some e2e tests to be flaky because the original
frame( 'editor-canvas' )gets detached. This can be reproduced consistently locally but only intermittently on CI.Why?
To fix flaky e2e tests and unblock local testing. I think this is related to #49203 (c.c. @Mamaduka). Should also fix #48504.
How?
Wait for the body to be loaded in
visitSiteEditor.Testing Instructions
CI should pass.