chore: additional test for setup/teardown (#24261)

This commit is contained in:
Pavel Feldman 2023-07-17 12:29:16 -07:00 committed by GitHub
parent 896390d952
commit af3e735147
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
`);
});