cucumber-playwright
cucumber-playwright copied to clipboard
Add playwright.config.ts
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.tsin cucumber.js - add a
defineConfigcall 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.