Skip to content

Add tests for the ItemList component#413

Merged
brookewp merged 11 commits intotrunkfrom
add/itemlist-tests
Mar 11, 2025
Merged

Add tests for the ItemList component#413
brookewp merged 11 commits intotrunkfrom
add/itemlist-tests

Conversation

@brookewp
Copy link
Copy Markdown
Contributor

There have been quite a few recent changes to the ItemList component (aka our implementation of DataViews), and there are more upcoming, so I thought it might be helpful to test expected behaviours for users regardless of implementation.

I plan to add more tests, but we would need to consider some changes before those work.

I've also added @testing-library/user-event which is the preferred method over fireEvent by testing library for simulation of user actions.

So I can follow up by replacing fireEvent for our other tests.

brookewp added 6 commits March 7, 2025 15:14
Signed-off-by: brookewp <brooke.kaminski@automattic.com>
Signed-off-by: brookewp <brooke.kaminski@automattic.com>
Signed-off-by: brookewp <brooke.kaminski@automattic.com>
Signed-off-by: brookewp <brooke.kaminski@automattic.com>
Signed-off-by: brookewp <brooke.kaminski@automattic.com>
Signed-off-by: brookewp <brooke.kaminski@automattic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Test this PR in WordPress Playground.

Signed-off-by: brookewp <brooke.kaminski@automattic.com>
Signed-off-by: brookewp <brooke.kaminski@automattic.com>
Signed-off-by: brookewp <brooke.kaminski@automattic.com>
Signed-off-by: brookewp <brooke.kaminski@automattic.com>
Signed-off-by: brookewp <brooke.kaminski@automattic.com>
Copy link
Copy Markdown
Member

@chriszarate chriszarate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preapproving this awesome PR!

@brookewp
Copy link
Copy Markdown
Contributor Author

I plan to add more tests, but we would need to consider some changes before those work.

I'll merge this as the baseline. And then we can follow up with more tests as we go. 🙂

@brookewp brookewp merged commit 0d32abc into trunk Mar 11, 2025
@brookewp brookewp deleted the add/itemlist-tests branch March 11, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants