puppeteer is closing the browser before running all the jest tests
See original GitHub issueSteps to reproduce
git clone https://github.com/anikethsaha/docsify
git checkout
e2e-test-puppeteer`npm i
npm run test:e2e
- check the tests for
sideBar.spec.js
It will fail are running 31 tests out of 122 tests
Tell us about your environment:
- Puppeteer version: ^2.0.0
- Platform / OS version: windows 10
- URLs (if applicable): https://travis-ci.org/docsifyjs/docsify/jobs/631003978?utm_medium=notification&utm_source=github_status
- Node.js version: v10.15.3
What steps will reproduce the problem?
npm run test:e2e
Please include code that reproduces the issue.
What is the expected result? It should run all the test cases 122
What happens instead? But instead, its running only 31 tests and the browser is closing after that and then remaining 91 tests are not running
Context
I am using live-server
to run a server that will serve my files and it is being done in a custom jest environment.
I have a sideBar.spec.js
file which tests all the sidebar links by clicking them and then taking a snapshot using jest-image-snapshot
.
In this test, I am clicking every possible anchor links using the page.click
method.
it is not running the remaining 91 tests.
I increased the timeout to 300 sec but still, it’s stopping before that.
I saw a weird behavior that is, the sidebar comes with a toggle button. So by default that sidebar is open. But before exiting of closing the browser, IDK but it’s toggling the sidebar to close it and then closing the browser.
check the tests for sideBar.spec.js
You can find the behavior of the test here https://travis-ci.org/docsifyjs/docsify/jobs/631003978?utm_medium=notification&utm_source=github_status
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top GitHub Comments
No reply here from anyone at Google in half a year, which isn’t a good sign. This is normal for personal projects by individuals, but not for projects backed by big companies.
Unfortunately, I have not.
Is puppeteer being actively maintained by someone from Google Chrome? Seems like the updates and fixes have slowed down.