fix(ui-mode): Watch mode button doesn't show active when test selected
description: The watch mode button was not showing as highlighted when a test in the tree view was focused and the watch icon was being clicked. Handled this issue for both, light moide and dark mode visibility
This commit is contained in:
parent
88c01434c6
commit
4971b3e1ba
|
|
@ -69,6 +69,10 @@
|
|||
color: var(--vscode-list-activeSelectionForeground) !important;
|
||||
}
|
||||
|
||||
.tree-view-content:focus .tree-view-entry.selected button.eye.toggled .codicon {
|
||||
color: var(--vscode-editorInfo-foreground) !important;
|
||||
}
|
||||
|
||||
.tree-view-empty {
|
||||
flex: auto;
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -320,3 +320,25 @@ test('should not watch output', async ({ runUITest }) => {
|
|||
expect(commands).toContain('runTests');
|
||||
expect(commands).not.toContain('listTests');
|
||||
});
|
||||
|
||||
|
||||
test('should have watch icon highlighted when a test is focused and watch on the test is enabled', async ({ runUITest, writeFiles }) => {
|
||||
const { page } = await runUITest({
|
||||
'a.test.ts': `
|
||||
import { test, expect } from '@playwright/test';
|
||||
test('passes', () => {});
|
||||
`,
|
||||
});
|
||||
|
||||
await page.getByText('a.test.ts').click();
|
||||
// watch icon should not be highlight till the watch icon is clicked
|
||||
await expect(page.getByRole('treeitem', { name: 'a.test.ts' }).getByRole('button', { name: 'Watch' })).toHaveCSS('color', 'rgb(255, 255, 255)');
|
||||
|
||||
await page.getByRole('treeitem', { name: 'passes' }).hover();
|
||||
await page.getByRole('treeitem', { name: 'passes' }).getByRole('button', { name: 'Watch' }).click();
|
||||
await expect(page.getByRole('treeitem', { name: 'passes' }).getByRole('button', { name: 'Watch' }).locator('.codicon-eye')).toHaveCSS('color', 'rgb(26, 133, 255)');
|
||||
await expect.poll(dumpTestTree(page)).toBe(`
|
||||
▼ ◯ a.test.ts
|
||||
◯ passes 👁 <=
|
||||
`);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue