-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
Feature: Playwright Home Page | ||
|
||
Scenario: Check title | ||
@chrome | ||
Scenario: scenario for chromium | ||
Given I am on Playwright home page | ||
When I click link "Get started" | ||
Then I see in title "Installation" | ||
|
||
@WebKit | ||
Scenario: scenario for webkit | ||
Given I am on Playwright home page | ||
When I click link "Get started" | ||
Then I see in title "Installation" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
import { test as base, createBdd } from 'playwright-bdd'; | ||
|
||
type Fixtures = { | ||
// set types of your fixtures | ||
filterBrowsers: void; | ||
}; | ||
|
||
export const test = base.extend<Fixtures>({ | ||
// add your fixtures | ||
filterBrowsers: [ | ||
async ({ $tags, defaultBrowserType }, use, testInfo) => { | ||
if (defaultBrowserType === 'chromium' && !$tags.includes('@chrome')) testInfo.skip(); | ||
if (defaultBrowserType === 'webkit' && !$tags.includes('@WebKit')) testInfo.skip(); | ||
await use(); | ||
}, | ||
{ auto: true }, | ||
], | ||
}); | ||
|
||
export const { Given, When, Then } = createBdd(test); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters