tests: backfill tests for ContentBlockResolver
#292
Merged
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.
What
This PR backfills additional test cases for the
ContentBlocksResolver
class inContentBlocksResolverTest
.How
The following test cases are included:
test_pre_resolved_blocks_filter_returns_non_null
ensures that thewpgraphql_content_blocks_pre_resolve_blocks
filter correctly modifies the block content before the blocks are resolved.test_returns_empty_array_for_empty_content
checks that an empty array is returned when the post content is empty, ensuring proper behavior for posts with no blocks.test_filters_wpgraphql_content_blocks_resolve_blocks
ensures that thewpgraphql_content_blocks_resolve_blocks
filter correctly modifies block content after the blocks are resolved.test_inner_blocks
tests resolution for both flat and nested blocks, including the correctparentClientIds
are set, and that there are no discrepancies between flat/nested resolution.