-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Navigation: Fix e2e test failures caused by sidebar title change #52308
Conversation
This reverts commit ea6b5a1.
Size Change: +32 B (0%) Total Size: 1.42 MB
ℹ️ View Unchanged
|
@glendaviesnz, I think we should apply a similar fix in |
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.
Tested with Console theme, and this fixes the bug.
P.S. I'm also curious why we're getting different shapes for a title and if there's a chance for it to affect other places in the editor.
will do this as a follow up so we don't hold up getting this patch in |
Yeh, it would be good to know the reason for that. This double return type also had to be handled here recently. |
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.
This fix works well for me and there are no failures when running the e2e spec locally.
There was a similar issue recently that was caused due to the difference in structure returned from useEntityRecord
vs useEditedEntityRecord
.
It looks like this component uses useEntityProp
that relies on the first two under the hood. I've only glanced at that hook so far, so take that with a grain of salt.
This might fix the core issue here: #52758 |
What?
This updates commit ea6b5a1 to add check for object as sometimes
title
is returned as object and sometimes as string.Why?
The original change caused e2e test failures due to the site editor crashing in instances where the title is an object.
How?
Added check for object and string for
title
Testing Instructions
npm run test:e2e:playwright -- --headed specs/editor/blocks/navigation.spec.js
completes