Questions tagged [jest-puppeteer]

121 questions
0
votes
0 answers

How to measure test execution time in jest-puppeteer for suite or each test

I have a multiple suites which have multiple tests. When I execute the tests, I want to get the test execution time for each suite and its respective test. Note that some tests are common across multiple suites. I expect the results Suite…
Sunny More
  • 13
  • 3
0
votes
0 answers

Puppeteer TimeoutError: Navigation timeout of 90000 ms exceeded

I'm running into a timeout error when using Puppeteer to navigate to a heavy website with lots of videos. I've increased the timeout to 690000 ms using page.goto(), and set the default navigation timeout to 0 using…
0
votes
0 answers

Puppeteer. Headless test for stripe

I wrote a test to subscribe to stripe on my site, it works fine in basic chrome, but when I add the --headless flag, I get a CORS error. I tried this: await stripe.confirmSetup({ confirmParams: {return_url: `http://localhost:3000/plans`}, …
0
votes
0 answers

Browser not Defined error in Jest-Image-Snapshot Testing in React

I want to implement https://github.com/americanexpress/jest-image-snapshot#-api in my React application and tried writing one of the test cases but gives me an error saying the browser is not defined when trying to run a test using the command "npm…
0
votes
0 answers

How to add IDE IntelliSense in VS Code for the global page and browser objects provided by jest-puppeteer

We are using jest-puppeteer to run integration and e2e tests in our website and we use a gatsby with a js setup, is there a way to add a /// /// to help auto-completion of global page object? we are not using typescript for now. I'm expecting auto…
0
votes
0 answers

No tests found, exiting with code 1 in Jenkins Pipeline

No tests found, exiting with code 1 in Jenkins Pipeline, I'm using jest-puppeteer, local all tests are running fine but whenever I run tests in Jenkin's pipeline its giving error "No tests found, exiting with code 1". I have configure…
0
votes
0 answers

how to get code coverage reports for many test suites

We plan to use puppeteer to get code coverage reports. npm i -D puppeteer-to-istanbul npm i nyc -g use code like this https://www.educative.io/answers/what-is-code-coverage-in-puppeteer nyc report --reporter=html but we have many test suites (the…
change
  • 1
  • 1
0
votes
1 answer

How to run all my puppeteer tests in a single tab with jest-puppeteer?

I setup jest-puppeteer and it was really easy to make it work, and it is fast enough for what I was looking for. The issue that I am having is that, at the moment I have two tests and both have the same setup steps (beforeAll). I tried to add a…
Ricardo Silva
  • 1,221
  • 9
  • 19
0
votes
0 answers

reset puppeteer's page for each test

I'm running jest tests using puppeteer. On some of them I manually add some specific css styles and other tweaks like the following: const content = ` *, *::after, *::before { transition-delay: 0s !important; …
Bertuz
  • 2,390
  • 3
  • 25
  • 50
0
votes
0 answers

Puppeteer timeout on waitforselector

So I created my first web scrapper with Puppeteer and it works fine. I call the scrapper function in my server at 5mins time intervals but after calling it a couple times about 10 to 15 times, i begin to get this timeout error TimeoutError: waiting…
0
votes
0 answers

Make multiple API calls with Jest-environment-Puppeteer

How to intercept multiple http requests (API calls) with jest & puppeteer environment? I have the following code but I get error Request already handled when I make more than one API call. Code: export const apiPostMethodResponseStatusCheckUtil…
user923499
  • 305
  • 1
  • 6
  • 18
0
votes
1 answer

How to setup jest and puppeteer to work with a react app?

I want to use jest and puppeteer to do e2e testing on a react app. I want the dev server to start up as part of the command to start the tests. In other words, I dont want to have to start the dev server separately and then run the e2e tests. Im…
slipperypete
  • 5,358
  • 17
  • 59
  • 99
0
votes
0 answers

Read a page stylesheet and check a specific property with puppeteer

What I am trying to do is: Load the page Gain access to the contents of an external css named "mystyle.css" Check if ".some_class" border has the value "2px" I have tried describe('CSS tests', () => { it('.some_class border is 2px', async…
0
votes
0 answers

Can not access some url with jest-cucumber

I am using some simple code to implement e2e testes with jest-cucumber. export const givenOpenUrl = (given) => { given(/^I open "(.*)"$/, async (arg0) => { await page.goto(`${arg0}`) }) } export const thenMatchPageTitle = (then) => { …
marian.vladoi
  • 7,663
  • 1
  • 15
  • 29
0
votes
0 answers

Testing API with axios - getting triggerUncaughtException(err, true /* fromPromise */);

function signup(data_var) { const options = { method: 'POST', url: 'xxx', headers: { 'Content-Type': 'application/json', Authorization: 'Bearer undefined', }, data: data_var, }; return axios …
1 2 3
8 9