-
Notifications
You must be signed in to change notification settings - Fork 2k
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
E2E tests fix in GB build #95282
E2E tests fix in GB build #95282
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
This reverts commit 1472a47.
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.
@@ -68,7 +68,10 @@ export function createBlockTests( specName: string, blockFlows: BlockFlow[] ): v | |||
const blockHandle = await editorPage.addBlockFromSidebar( | |||
blockFlow.blockSidebarName, | |||
blockFlow.blockEditorSelector, | |||
{ noSearch: true, blockFallBackName: blockFlow.blockTestFallBackName } | |||
{ | |||
noSearch: blockFlow.noSearch === false ? false : true, |
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.
Nitpicky - this works well enough, but I would use null coalescing here:
noSearch: blockFlow.noSearch === false ? false : true, | |
noSearch: blockFlow.noSearch ?? true, |
Then, if there's any non-nullish value in noSearch
(anything other than null
or undefined
), it'd be used. Otherwise, it'd default to true
. But that's just a preference - explicitly checking for false
also works.
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.
LGTM, the latest commit (c03aa49) fixed the tests.
I can confirm both specs/blocks/blocks__core.ts
and specs/blocks/blocks__core-jetpack-extended.ts
tests are passing for:
- Simple
- Simple + Edge
- Atomic
- Atomic + Edge
- Atomic + Nightly
Related to fixing e2e tests on Gutenberg build https://teamcity.a8c.com/viewLog.html?buildId=13488805
Proposed Changes
"YouTube Embed" block had a fallback named "YouTube", we've removed that to prevent the E2E from selecting the YouTube icon because of that.
Instagram's embed block name should be changed to "Instagram Embed" from "Instagram". As both of these blocks have the same name, I've made the test search in the inserter first using "Instagram embed" so that only the Embedding block remains. And then went with the inserting process.
The actual solution for this Instagram block would be to change the block's name in Gutenberg. So the current fix is a temporary one to enable a faster release. I'll create a PR on GB changing the name of the block later. Then we can remove this workaround.
Why are these changes being made?
Testing Instructions
Pre-merge Checklist