-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: define multiple test cases for a single test
- Loading branch information
1 parent
da3dc5e
commit a89847a
Showing
4 changed files
with
116 additions
and
66 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
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
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,20 +1,32 @@ | ||
import { expect, test } from '@playwright/test' | ||
import { expect, test } from '@playwright/test'; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto('https://playwright.dev/') | ||
}) | ||
await page.goto('https://playwright.dev/'); | ||
}); | ||
|
||
test.describe('Describe', () => { | ||
test('[3] Should page opened', async ({ page }) => { | ||
await page.locator('text=Get started').click() | ||
await expect(page).toHaveTitle(/Getting started/) | ||
}) | ||
await page.locator('text=Get started').click(); | ||
await expect(page).toHaveTitle(/Getting started/); | ||
}); | ||
test('[7] Should page closed', async ({ page }) => { | ||
await page.locator('text=Get started').click() | ||
await expect(page).toHaveTitle(/Getting started/) | ||
}) | ||
await page.locator('text=Get started').click(); | ||
await expect(page).toHaveTitle(/Getting started/); | ||
}); | ||
test('[8] Awaiting for user input', async ({ page }) => { | ||
await page.locator('text=Get started').click() | ||
await expect(page).toHaveTitle(/Getting started/) | ||
}) | ||
}) | ||
await page.locator('text=Get started').click(); | ||
await expect(page).toHaveTitle(/Getting started/); | ||
}); | ||
test('[3] [7] [8] Awaiting for user input', async ({ page }) => { | ||
await page.locator('text=Get started').click(); | ||
await expect(page).toHaveTitle(/Getting started/); | ||
}); | ||
test('[3,7,8] Awaiting for user input', async ({ page }) => { | ||
await page.locator('text=Get started').click(); | ||
await expect(page).toHaveTitle(/Getting started/); | ||
}); | ||
test('[3, 7, 8] Awaiting for user input', async ({ page }) => { | ||
await page.locator('text=Get started').click(); | ||
await expect(page).toHaveTitle(/Getting started/); | ||
}); | ||
}); |
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