Skip to content

Routing example - fireEvent.click #250

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

Closed
ed-sparkes opened this issue Oct 5, 2021 · 3 comments · Fixed by #287
Closed

Routing example - fireEvent.click #250

ed-sparkes opened this issue Oct 5, 2021 · 3 comments · Fixed by #287
Labels

Comments

@ed-sparkes
Copy link

Hi,

Is there no way to make the router tests work by simulating the user action fireEvent.click(elem) rather than using the navigate(elem) method.

Thanks, Ed

@timdeschryver
Copy link
Member

Hi Ed, sadly this is a known issue...
At the time when I wrote it, I didn't find a way on how to navigate to a route by simply clicking on the element.
That's why navigate came to life, because it picks the href from the route and navigates to it (link to code).
If you know a way on how we can resolve this I'm all ears. because it's a bit cumbersome that we have to do it like this.

We could monkey-patch click, but eh...

@timdeschryver
Copy link
Member

Thanks to @meirka we were able to provide a fix for this issue in #286.
I've refactored the navigation example in #287

@github-actions
Copy link

🎉 This issue has been resolved in version 11.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants