[RNMobile] Update "testAddGalleryBlock" test case to reflect expected content for v1 of Gallery block #18898
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
After we re-introduced support for v1 of the Gallery block in WordPress/gutenberg#41533, the
testAddGalleryBlock
test case within iOS'EditorGutenbergTests
file began to fail with the following error:The reason for this is that v1 is used by default when no API is mocked. Unlike v2 of the Gallery block, v1 doesn't use additional inner blocks when images are used. As additional blocks aren't added to the editor when images are uploaded to v1 of the block, the number of expected blocks has changed:
This PR updates
verifyContentStructure
to reflect the fact we currently only expected 2 blocks whentestAddGalleryBlock
runs.In the future, we may seek to mock an API request and update the test case to expect v2 of the Gallery block. We're going with this simpler solution for now in order to move forward with others PRs and address the failing test.
Testing
To test: Verify that all tests pass on this PR, with no failures.
Regression Notes
I'm not aware of other areas of the code base that could be impacted by this change, though it's possible that other tests may rely on the
testAddGalleryBlock
case somehow.Ensured all tests pass for this PR.
N/A
PR submission checklist:
RELEASE-NOTES.txt
if necessary.