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

Add playwright.config.ts

Open DerZyklop opened this issue 1 year ago • 0 comments

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.

DerZyklop avatar Mar 06 '24 15:03 DerZyklop