From 005947e3b8edf7a23bfdfbfcc44337873ef7d999 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Tue, 30 Nov 2021 11:54:28 -0800 Subject: [PATCH] fix #137722 fix #137808 --- test/automation/src/terminal.ts | 6 +++--- test/smoke/src/areas/terminal/terminal-editors.test.ts | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/test/automation/src/terminal.ts b/test/automation/src/terminal.ts index bd0d35a91c8..fe7cba5fdc4 100644 --- a/test/automation/src/terminal.ts +++ b/test/automation/src/terminal.ts @@ -15,7 +15,6 @@ export enum Selector { PlusButton = '.codicon-plus', EditorGroups = '.editor .split-view-view', EditorTab = '.terminal-tab', - EditorTabIcon = '.terminal-tab.codicon-', SingleTab = '.single-terminal-tab', Tabs = '.tabs-list .monaco-list-row', SplitButton = '.editor .codicon-split-horizontal' @@ -149,10 +148,11 @@ export class Terminal { await this.code.waitForElement(`${selector}`, singleTab => !!singleTab && !!singleTab?.textContent.match(nameRegex)); } if (color) { - await this.code.waitForElement(`${selector}.terminal-icon-terminal_ansi${color}`); + await this.code.waitForElement(`${selector}`, singleTab => !!singleTab && !!singleTab.className.includes(`terminal-icon-terminal_ansi${color}`)); } if (icon) { - await this.code.waitForElement(selector === Selector.EditorTab ? `${Selector.EditorTabIcon}${icon}` : `${selector} .codicon-${icon}`); + selector = selector === Selector.EditorTab ? selector : `${selector} .codicon`; + await this.code.waitForElement(`${selector}`, singleTab => !!singleTab && !!singleTab.className.includes(icon)); } } } diff --git a/test/smoke/src/areas/terminal/terminal-editors.test.ts b/test/smoke/src/areas/terminal/terminal-editors.test.ts index c69f87b756b..1dd76c6a03e 100644 --- a/test/smoke/src/areas/terminal/terminal-editors.test.ts +++ b/test/smoke/src/areas/terminal/terminal-editors.test.ts @@ -16,16 +16,14 @@ export function setup(opts: ParsedArgs) { terminal = app.workbench.terminal; }); - // TODO: This was flaky in CI - it.skip('should update color of the tab', async () => { + it('should update color of the tab', async () => { await terminal.runCommand(TerminalCommandId.CreateNewEditor); const color = 'Cyan'; await terminal.runCommandWithValue(TerminalCommandIdWithValue.ChangeColor, color); await terminal.assertSingleTab({ color }, true); }); - // TODO: Flaky https://github.com/microsoft/vscode/issues/137808 - it.skip('should update icon of the tab', async () => { + it('should update icon of the tab', async () => { await terminal.runCommand(TerminalCommandId.CreateNewEditor); const icon = 'symbol-method'; await terminal.runCommandWithValue(TerminalCommandIdWithValue.ChangeIcon, icon);