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

Add playwright.config.ts #798

Closed
DerZyklop opened this issue Mar 6, 2024 · 2 comments
Closed

Add playwright.config.ts #798

DerZyklop opened this issue Mar 6, 2024 · 2 comments

Comments

@DerZyklop
Copy link
Contributor

DerZyklop commented Mar 6, 2024

I tried to add a playwright config file. But I could not get it to work.

The config file’s content looks like this:

import { defineConfig } from '@playwright/test';

export default defineConfig({
	expect: {
		/** Timeout for each test in milliseconds. */
		timeout: 1234,
	},
});

What i tried was:

  • Just put playwright.config.ts into the root folder as playwright’s docs say
  • add --require playwright.config.ts in cucumber.js
  • add a defineConfig call to the top of the custom-world.ts:
defineConfig({
	expect: {
		/** Timeout for each test in milliseconds. */
		timeout: 1234,
	},
});

The default value of expect.timeout is 5000. I have one test which takes longer as the default timeout. With all of the things i tried it always showed the error Timed out 5000ms waiting for expect(locator).toBeVisible(), which shows that my timeout 1234 did not reach playwright.

@Tallyb
Copy link
Owner

Tallyb commented Jul 21, 2024

You can specify timeout on a specific action. Sadly, the playwright team did not expose an option to set a timeout in the playwright library, only in playwright test runner, which is not used by this repository.
You might want to file an issue asking for it on their repository.

@Tallyb Tallyb closed this as completed Jul 21, 2024
@DerZyklop
Copy link
Contributor Author

microsoft/playwright#31860

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

2 participants