fix #137808
This commit is contained in:
Megan Rogge 2021-11-30 11:54:28 -08:00
parent e89889fe54
commit 005947e3b8
No known key found for this signature in database
GPG key ID: 69182D7934F25879
2 changed files with 5 additions and 7 deletions

View file

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

View file

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