-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Add BlockList coverage #50252
test: Add BlockList coverage #50252
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.
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.
2522cf0
to
84d84bc
Compare
Flaky tests detected in 84d84bc. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4867001957
|
packages/block-editor/src/components/block-list/test/index.native.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 🚀
What?
Add
BlockList
test 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
setupCoreBlock
test 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
listKey
was 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