Questions tagged [jest-puppeteer]

121 questions
1
vote
1 answer

jest puppeteer how to use setTimeout

I am a newbie at running Jest puppeteer. I'm trying to run a test suite locally that I did not write. All the tests fail to run and I get this error pointing at beforeEach... "beforeEach(async () => {" "thrown: "Exceeded timeout of 5000 ms for a…
Jessi
  • 791
  • 1
  • 12
  • 24
1
vote
1 answer

How can i use Extent report with puppeteer-Jest automation similar to Selenium

I am using Puppeteer for UI automation with jest Framework. i had worked previously selenium and used extend report i want similar kind of reporting with puppeteer. Is there a way i can use extent report or do we have some similar reporting for…
1
vote
0 answers

Run test cases with Device emulators in Puppeteer

I have 10 test cases in jest (Note: all tests are in .test.ts extension, for eg: frontPageTest.test.ts). I want to run the 10 test cases in Desktop view first, then the 10 test cases should run in mobile view. How to do it?
1
vote
2 answers

Storyshots doesn't work on local storybook-static folder

Problem Summary Storybook snapshot test on static storybook returning blank screenshots even though they look fine on localhost:8080 when I ran npx http-server storybook-static Tech stack and relevant code Vue…
Beast
  • 370
  • 2
  • 14
1
vote
1 answer

How to not skip tests in a suite upon failure?

I have a large number of tests, contained in "suites" or files, probably about 10-15 tests in each suite. The issue I'm having is that if the first test in a suite fails, then it just skips all the rest of the tests in that suite, and goes on to the…
Dan Walker
  • 63
  • 4
1
vote
1 answer

Jest calls async jest.config.ts twice

In my Typescript repository containing Puppeteer UI tests, i have a jest.config.ts file that was recently updated to export an async object because we had to make api calls to fetch information that needs to be put in a test report using jest's…
neonidian
  • 1,221
  • 13
  • 20
1
vote
1 answer

Unable to run Jest Snapshot tests with jest-puppeteer

I just added jest-puppeteer to include it in my testing suites. Part of the setup is to remove testEnvironment:"jsdom" in my jest.config.js according to https://github.com/smooth-code/jest-puppeteer. Considering I'm using Next.js which may be…
Nick.K
  • 320
  • 6
  • 11
1
vote
0 answers

how to catch loaded script errors using puppeteer

im currently trying to catch an error occured by injected script. what ive done const path = require('path'); const puppeteer = require('puppeteer'); describe('Test page', () => { it('should fail on script error', async () => { const browser…
ddeadlink
  • 249
  • 2
  • 13
1
vote
1 answer

Puppeteer: how to listen for http responses until you get to the right one?

Goal: I am writing a Puppeteer test which needs to listen for a certain response, check that the response url is of a certain format, and then save the response so that the values in the body can be used later. Current code: Suppose we have a const…
Marlo
  • 490
  • 3
  • 7
  • 21
1
vote
0 answers

Webscrape testing on a text field with jest-puppeteer

Okay everyone, got a bit of a doozy here. I am attempting to write a test using Jest and puppeteer for an email field. The problem is that I cannot seem to figure out how to get this test working. What I want to test is that if a user types in…
1
vote
0 answers

how to get WSendpoint of a puppeteer-cluster browser

in a project that requires: Starting each session with logging in credentials + notification/OTP work with multiple accounts asynchronously remote debugging or monitoring of the session 5+ different operations can be requested on a open session ,…
aypar
  • 11
  • 2
1
vote
1 answer

how do you loop through checkboxes using puppeteer?

I have a list of checkboxes , every time puppeteer run the test I need to : if a box is already selected then move to next box and select it , and if the next is selected move to the next checkbox and so on if(await page.$eval(firstcheckbox,…
Adam
  • 31
  • 2
1
vote
0 answers

how set geolocation to block in chrome using puppeteer

I am looking for a way to respond block when being asked about sharing my location I got to the point that I do const context = browser.defaultBrowserContext(); context.clearPermissionOverrides(); I when I do this and login to my app I get the…
1
vote
0 answers

switch extension toggle button

I'm working on automation project , and I need to know how to use puppeteer-Jest to check if the chrome extension is enabled or disabled? if the extension is enabled run these steps , if not run other steps ? I know that Java selenium has something…
Adam
  • 31
  • 2
1
vote
1 answer

Jest Puppeteer tests fail when running together (synchronously)

Technology Used: npm jest jest-puppeteer If I run my tests one by one they individually pass $ npm test test/file.to.test.js ... Test Suites: 1 passed, 1 total Tests: 6 passed, 6 total However if I run my tests as a group then then errors…
Jacksonkr
  • 31,583
  • 39
  • 180
  • 284
1 2
3
8 9