Repository navigation
test: Add BlockList coverage - #50252
Merged
Merged
Conversation
This exclusion appears to be erroneous and prevents the `setupCoreBlock` test helper from succeeding when attempting to register the Group block type.
In order to assert the insertion point is in the correct index location, the index must be passed to the test ID for each insertion point.
Increase explicitness of test descriptions and repurpose tests for non-compact lists.
dcalhoun
force-pushed
the
test/add-block-list-coverage
branch
from
May 2, 2023 15:09
89a08cd to
2522cf0
Compare
|
Size Change: +190 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
A `listKey` was required to address the following error when running
tests against the `BlockList`:
```
VirtualizedList trace:
Child (vertical):
listKey: 8d343539-3801-4ff1-ac5b-858db2cdf662
cellKey: 8d343539-3801-4ff1-ac5b-858db2cdf662
Parent (vertical):
listKey: rootList
cellKey: rootList
```
Test additional block appender locations.
dcalhoun
force-pushed
the
test/add-block-list-coverage
branch
from
May 3, 2023 00:18
2522cf0 to
84d84bc
Compare
|
Flaky tests detected in 84d84bc. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4867001957
|
geriux
reviewed
May 3, 2023
geriux
reviewed
May 3, 2023
geriux
approved these changes
May 3, 2023
geriux
left a comment
Member
There was a problem hiding this comment.
This looks good! I only left one comment related to the code but it's not a blocker. There's another PR that will change the code of the BlockListItem component but it might be nice to have these tests before it gets merged 👍
I tested the changes locally using the demo app on both iOS and Android 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
Add
BlockListtest coverage.Why?
Relates to wordpress-mobile/gutenberg-mobile#5617. Enable future, stable refactors and avoid regressions.
How?
refactor: Add missing Group block type to core blocks list
This exclusion appears to be erroneous and prevents the
setupCoreBlocktest helper from succeeding when attempting to register the Group block
type.
test: Add BlockList tests
In order to assert the insertion point is in the correct index location,
the index must be passed to the test ID for each insertion point.
refactor: Increase uniqueness of virtualized list keys
A
listKeywas required to address the following error when runningtests against the
BlockList:Testing Instructions
Due to the changes to the virtualized list key, we should likely test
inserting, editing, moving, and removing various blocks.
Testing Instructions for Keyboard
n/a
Screenshots or screencast
n/a