Adds supported blocks parameter in FETCH_BLOCK_LAYOUTS action#1703
Adds supported blocks parameter in FETCH_BLOCK_LAYOUTS action#1703
Conversation
malinajirka
left a comment
There was a problem hiding this comment.
LGTM, thanks! I've left one minor comment.
| BuildConfig.TEST_WPORG_URL_SH_SIMPLE_ENDPOINT); | ||
|
|
||
| SiteModel firstSite = mSiteStore.getSites().get(0); | ||
| List<String> supportedBlocks = |
There was a problem hiding this comment.
Will we need to update this list whenever we add a support for a new block?
We might want to consider passing just three basic blocks. We are testing that the API is reachable and the payload is formatted as expected. Not that the result for all these blocks is what we expect it to be, right? Wdyt?
There was a problem hiding this comment.
Hello @malinajirka 👋
I agree that this test might be fragile. It will break if we remove all the layouts that contain only a subset of the supportedBlocks.
To my understanding adding new blocks will not break the test unless we include those in layouts and the above condition is not longer true.
I'm not sure that there is a layout that includes just three blocks.
There was a problem hiding this comment.
I see. Makes sense, let's keep it as is and modify it only if we find the need. Thanks!
Fixes wordpress-mobile/gutenberg-mobile#2444
Depends on: #1702
Description
This PR fetches adds supported blocks parameter in fetch block layouts call both for WPCom and self hosted site
To test
This can be tested with wordpress-mobile/WordPress-Android#13018
or by running the
testFetchBlockLayouts()tests.