Navigator: add more pattern matching tests, refine existing tests#47910
Conversation
| ); | ||
| } | ||
|
|
||
| function CustomNavigatorButtonWithFocusRestoration( { |
There was a problem hiding this comment.
Removed in favour of using CustomNavigatorButton everywhere, since today there are basically no differences between the two
| } ); | ||
|
|
||
| it( 'should escape the value of the `path` prop', async () => { | ||
| const user = userEvent.setup(); |
There was a problem hiding this comment.
Moved part of this test to a new test (should restore focus correctly even when the path needs to be escaped). Reviewing commit-by-commit should make this part easier to review.
youknowriad
left a comment
There was a problem hiding this comment.
Great additions. This is going to give us much needed confidence with the goToParent work.
|
Flaky tests detected in dae7b0a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4137292770
|
447e3cd to
2f3c758
Compare
2f3c758 to
dae7b0a
Compare
…7910) * Add one extra button to improve quality of focus restoration tests * Fix typo * Add screens with pattern matching to test component * Add named arguments tests * Refine invalid HTML attribute tests, split focus restoration part to new test * Remove reduntant component * CHANGELOG
|
Cherry-picked this PR to the wp/6.2 branch. |
What?
Following up the work in #47827, this PR adds more unit test to the suite of
Navigatorcomponents (and refines some existing ones).Why?
More tests, more confidence when making changes (especially in preparation for #47883)
How?
patternMatchunit tests)Testing Instructions
No runtime changes.
Make sure that unit test changes look good, and that tests pass.