Blocks: Replace store name string with exposed store definition#27336
Conversation
|
It failed again. I tried rerunning the tests locally, apparently, it's all good: As text:I'm not sure why they're failing in the checks... |
|
I just tried:
Same results, all tests passed. I also checked manually one of the errors that happened in the build, and apparently, it's all good; the element exists: I'm open to ideas. I have no clue what's happening. 😞 |
|
Feel free to ignore those failing e2e tests, they shouldn't be relevant to your changes. As far as I remember, there is PR that tries to make them more stable on CI. |
|
Umm... Yeah. Sorry... I should've checked the E2E status before commenting/testing. Apparently, #27347 will fix it 😸 |
gziolo
left a comment
There was a problem hiding this comment.
Everything looks good, thank you for another great PR 👍
| select: jest.fn( ( store ) => { | ||
| switch ( store ) { | ||
| case 'core/blocks': { | ||
| case [ mockStoreName ]: |
There was a problem hiding this comment.
Quite tricky, but it makes a lot of sense 👍
There was a problem hiding this comment.
I could be replacing the switch statement to an if if that's better 😅.
There was a problem hiding this comment.
I was commenting about the whole process of mocking. It is it what it is, we better leave it 😃




Description
Addresses #27088. Replaces the
core/blocksstore name references (hardcoded strings) with the exposedstoredefinitions. Had to change somecore/blocksunit tests too, since they're testing the exposed definition now.How has this been tested?
Just making sure
npm run testwasn't failing.Screenshots
Types of changes
Code refactoring, non-breaking change.
Checklist: