Skip to content

Test with useButton gives me the famous "act" warning #2743

Answered by snowystinger
manelsanz asked this question in Q&A
Discussion options

You must be logged in to vote

That test works for us


Would you mind trying what we do in triggerPress? (we need to update that now that userEvent has had some releases that cover the problems we used to have with it)
https://github.com/adobe/react-spectrum/blob/main/packages/dev/test-utils/src/events.ts#L19
You could try some other versions of userEvent as well.

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@manelsanz
Comment options

@snowystinger
Comment options

@pentzzsolt
Comment options

@LFDanLu
Comment options

LFDanLu Aug 10, 2023
Collaborator

@pentzzsolt
Comment options

Answer selected by snowystinger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants