cucumber-playwright icon indicating copy to clipboard operation
cucumber-playwright copied to clipboard

Change expect timeout

Open Pi-fe opened this issue 1 year ago • 6 comments

Hi! In my project I have expect that exceeds 5 seconds, how can i change the playwright settings with cucumber. (I already changed the setDefaultTimeout)

Thank you :)

Pi-fe avatar Jun 14 '23 09:06 Pi-fe

if it is only a single expect - you can put it in the relevant step. I am not sure the global timeout for PW can be changed.

Tallyb avatar Jun 14 '23 16:06 Tallyb

Yes, there are many expect. On playwright you can change the expect timeout like this: expect:{ timeout: 3000 }

but I don't know how to import it to this project, since the configuration is different

Pi-fe avatar Jun 15 '23 10:06 Pi-fe

I guess this should work: https://playwright.dev/docs/next/test-assertions#expectconfigure

Tallyb avatar Jun 15 '23 15:06 Tallyb

I want to do the same (setting a global expect timeout).

In a test run by the Cucumber runner the timeout I pass to expect.configure is ignored (the default of 5000ms is used). It works as expected in a test run by the Playwright runner. ☹️

PotatoesMaster avatar Jul 05 '23 14:07 PotatoesMaster

I want to do the same (setting a global expect timeout).

In a test run by the Cucumber runner the timeout I pass to expect.configure is ignored (the default of 5000ms is used). It works as expected in a test run by the Playwright runner. ☹️

Same issue... run only with playwright runner

Pi-fe avatar Jul 27 '23 15:07 Pi-fe

https://playwright.dev/docs/next/test-assertions#expectconfigure

Hi, I have the same issue, when do you change it? I change in cucumber.mjs file not sure it works or not

qubaoqa avatar Oct 23 '23 03:10 qubaoqa

timeouts are defined in playwright test runner which is not used in this repo (only PW library). File an issue on the PW repo to expose the action global timeouts in the library, and then it will be available.

Tallyb avatar Jul 21 '24 12:07 Tallyb