Skip to content

Commit

Permalink
decorators test timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalets committed Mar 19, 2024
1 parent 71ed70a commit 3f19364
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const testDir = defineBddConfig({

export default defineConfig({
testDir,
timeout: 1000,
reporter: [cucumberReporter('html', { outputFile: 'cucumber-report/report.html' })],
projects: [
{
Expand Down
4 changes: 3 additions & 1 deletion steps/PlaywrightPage.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Page, expect } from '@playwright/test';
import { Fixture, Given, When } from 'playwright-bdd/decorators';
import type { test } from './fixtures';
import { test } from './fixtures';

export
@Fixture<typeof test>('playwrightPage')
Expand All @@ -9,7 +9,9 @@ class PlaywrightPage {

@Given('I am on Playwright home page')
async open() {
test.setTimeout(10 * 1000);
await this.page.goto('https://playwright.dev');
await this.page.waitForTimeout(2000);
}

@When('I click link {string}')
Expand Down

0 comments on commit 3f19364

Please sign in to comment.