Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change expect timeout #674

Closed
Pi-fe opened this issue Jun 14, 2023 · 7 comments
Closed

Change expect timeout #674

Pi-fe opened this issue Jun 14, 2023 · 7 comments

Comments

@Pi-fe
Copy link

Pi-fe commented Jun 14, 2023

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 :)

@Tallyb
Copy link
Owner

Tallyb commented Jun 14, 2023

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.

@Pi-fe
Copy link
Author

Pi-fe commented Jun 15, 2023

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

@Tallyb
Copy link
Owner

Tallyb commented Jun 15, 2023

@PotatoesMaster
Copy link

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. ☹️

@Pi-fe
Copy link
Author

Pi-fe commented Jul 27, 2023

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

@qubaoqa
Copy link

qubaoqa commented Oct 23, 2023

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

@Tallyb
Copy link
Owner

Tallyb commented Jul 21, 2024

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 Tallyb closed this as completed Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants