-
-
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
4 changed files
with
15 additions
and
29 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,7 +1,5 @@ | ||
Feature: Playwright Home Page | ||
|
||
Scenario: Check title | ||
Given I am on Playwright home page | ||
When I click link "Get started" | ||
Then I see in title "Installation" | ||
Given step | ||
|
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,14 +1,5 @@ | ||
import { expect } from "@playwright/test"; | ||
import { Given, When, Then } from "./fixtures"; | ||
|
||
Given("I am on Playwright home page", async ({ page }) => { | ||
await page.goto("https://playwright.dev"); | ||
}); | ||
|
||
When("I click link {string}", async ({ page }, name: string) => { | ||
await page.getByRole("link", { name }).click(); | ||
}); | ||
|
||
Then("I see in title {string}", async ({ page }, text: string) => { | ||
await expect(page).toHaveTitle(new RegExp(text)); | ||
Given("step", async ({}) => { | ||
throw new Error("Fail in bdd 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { test } from "@playwright/test"; | ||
|
||
test("non bdd test", async ({}) => { | ||
throw new Error("Fail in non bdd 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