[Feature] Component testing and page.goto
See original GitHub issueContext:
- Playwright Version: 1.24.0
- Operating System: All
- Node.js version: v17.3.0
- Browser: Chromium
- Extra: Vue component testing
I’ve been playing with the Vue component testing feature and it seems like the page.goto()
is not working properly.
For example i have a failing test that should be passing.
It should navigate to the 404 page because i have a catch all specified /:pathMatch(.*)*
inside Vue router see the code here.
The Vue router plugin is registered here.
Here you can see another example that also uses the page.goto
function that i can’t get to work.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Component Testing Tutorial: A Comprehensive Guide With ...
This Component testing tutorial delves deeper into its importance, techniques, phases, and how to perform Component testing with examples.
Read more >What is Component Testing Or Module Testing (Learn With ...
What is Component Testing also called Module Testing in Software Testing: A component is the lowest unit of any application.
Read more >Basics of testing components - Angular
But in many cases, testing the component class alone, without DOM ... To write these kinds of test, you'll use additional features of...
Read more >Functional browser testing with Puppeteer - CircleCI
Learn how to write functional browser tests for your CI pipeline with Puppeteer.
Read more >React end-to-end testing with Jest and Puppeteer
Like the previous test we wrote, the beforeAll function is used to create new instances of Puppeteer and a new page. Then, we...
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
Thanks for explaining! Yes, makes sense. Yeah i believe it’s either history mode or hash mode.
The first use case/test is works!
Navigating before mount doesn’t work yet. I need to debug it a little further.
Don’t you think that the API for navigating in SPA’s is a bit too verbose? I think the
config.use.baseURL
setting is not respected when usingpage.evaluate(() => window.history.....)
as well right?Why not something like?:
I don’t think a link is the only contract. Users are able to type the url in the browsers address bar as well (aka
page.goto
). imo we should be able to mimic the user’s behaviour even if this reloads the JS state.