Support client side navigation
See original GitHub issue🚀 Feature Proposal
Support client side page navigation, e.g. Link and programatic navigation using router. This would make this library extremely useful for integration testing of NextJS applications.
Since this library is mocking the router, it is in full control over that and has access to handlers, right? In that case I assume this should be possible.
Example
describe('Blog page', () => {
it('renders blog page', async () => {
const Page = await getPage({
route: '/blog/1',
});
render(Page);
userEvent.click(screen.getByText('Link'))
await screen.findByText('Linked page')
});
});
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
How to get client-side navigation right - DEV Community
Classic navigation has support for scroll restoration: When the user navigates back or forward, the browser will restore the scroll position.
Read more >Client-Side Navigation - Navigate Between Pages - Next.js
Client -side navigation means that the page transition happens using JavaScript, which is faster than the default navigation done by the browser. Here's...
Read more >Modern client-side routing: the Navigation API
First is programmatic navigation, where navigation is caused by a method call inside your client-side code. You can call navigation.navigate('/another_page') ...
Read more >client-side-navigation in angular - liveBook · Manning
Arrange the client-side navigation using the powerful router ... Angular includes many classes supporting navigation—for example, Router , Route , Routes ...
Read more >Next.js - Client Side Navigation vs. changes in html
Here is how I understand it: The approach Next.js takes for client-side navigation is a mixture of SPA-style navigation and traditional ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Great work @toomuchdesign 👍 I will test it locally on a real world application this weekend.
Sounds great @Meemaw!