mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: additional test for setup/teardown (#24261)
This commit is contained in:
parent
896390d952
commit
af3e735147
@ -173,3 +173,23 @@ test('should run setup and teardown projects (3)', async ({ runUITest }) => {
|
||||
await expect(page.getByTestId('output')).not.toContainText(`from-setup`);
|
||||
await expect(page.getByTestId('output')).not.toContainText(`from-teardown`);
|
||||
});
|
||||
|
||||
test('should run part of the setup only', async ({ runUITest }) => {
|
||||
const { page } = await runUITest(testsWithSetup);
|
||||
await page.getByText('Status:').click();
|
||||
await page.getByLabel('setup').setChecked(true);
|
||||
await page.getByLabel('teardown').setChecked(true);
|
||||
await page.getByLabel('test').setChecked(true);
|
||||
|
||||
await page.getByText('setup.ts').hover();
|
||||
await page.getByRole('listitem').filter({ hasText: 'setup.ts' }).getByTitle('Run').click();
|
||||
|
||||
await expect.poll(dumpTestTree(page)).toBe(`
|
||||
▼ ✅ setup.ts <=
|
||||
✅ setup
|
||||
▼ ✅ teardown.ts
|
||||
✅ teardown
|
||||
▼ ◯ test.ts
|
||||
◯ test
|
||||
`);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user