nx-plugins icon indicating copy to clipboard operation
nx-plugins copied to clipboard

jest-playwright - not able to run in headless:false or change browser

Open alex-scn opened this issue 3 years ago • 3 comments

Hello,

the browser is not shown with --headless false. Every test fails with "Browser has been closed". The chromium opens for a millisecond. The only way to see chromium is start in debug mode PWDEBUG=1.

Also for every run it shows me RUNS browser: chromium even when in jest.config.js my settings are:

testEnvironmentOptions: {
    'jest-playwright': {
      browsers: ['firefox', 'webkit'],

I also added jest.setTimeout(35*1000) before my test.

alex-scn avatar Feb 17 '22 21:02 alex-scn

To be frank, I am no longer using Playwright and I am not sure that is the problem. I have updated playwright along with other packages recently and perhaps there were some changes that should have been marked as breaking change. If you have an idea how to fix it I would welcome a PR.

Bielik20 avatar Feb 18 '22 15:02 Bielik20

@Bielik20 what do you use instead of Playwright?

CharlieGreenman avatar Jun 15 '22 13:06 CharlieGreenman

@CharlieGreenman We use Cypress. We do consider trying out Playwright again, but it is a big decision and involves a lot of work.

@alex-scn Did you find an answer? If not I am ok to leave this issue open, but if you did please share what the problem was and we can close this.

Bielik20 avatar Jun 18 '22 09:06 Bielik20