Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not set foreground colors of test status bar #7651

Merged
merged 1 commit into from
Sep 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/2 Fixes/4387.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not change `foreground` colors in test statusbar.
7 changes: 0 additions & 7 deletions src/client/testing/display/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,31 +80,25 @@ export class TestResultDisplay implements ITestResultDisplay {
// Treat errors as a special case, as we generally wouldn't have any errors
const statusText: string[] = [];
const toolTip: string[] = [];
let foreColor = '';

if (tests.summary.passed > 0) {
statusText.push(`${constants.Octicons.Test_Pass} ${tests.summary.passed}`);
toolTip.push(`${tests.summary.passed} Passed`);
foreColor = '#66ff66';
}
if (tests.summary.skipped > 0) {
statusText.push(`${constants.Octicons.Test_Skip} ${tests.summary.skipped}`);
toolTip.push(`${tests.summary.skipped} Skipped`);
foreColor = '#66ff66';
}
if (tests.summary.failures > 0) {
statusText.push(`${constants.Octicons.Test_Fail} ${tests.summary.failures}`);
toolTip.push(`${tests.summary.failures} Failed`);
foreColor = 'yellow';
}
if (tests.summary.errors > 0) {
statusText.push(`${constants.Octicons.Test_Error} ${tests.summary.errors}`);
toolTip.push(`${tests.summary.errors} Error${tests.summary.errors > 1 ? 's' : ''}`);
foreColor = 'yellow';
}
this.statusBar.tooltip = toolTip.length === 0 ? 'No Tests Ran' : `${toolTip.join(', ')} (Tests)`;
this.statusBar.text = statusText.length === 0 ? 'No Tests Ran' : statusText.join(' ');
this.statusBar.color = foreColor;
this.statusBar.command = constants.Commands.Tests_View_UI;
this.didChange.fire();
if (statusText.length === 0 && !debug) {
Expand Down Expand Up @@ -193,7 +187,6 @@ export class TestResultDisplay implements ITestResultDisplay {
this.statusBar.tooltip = 'Discover Tests';
this.statusBar.command = constants.Commands.Tests_Discover;
this.statusBar.show();
this.statusBar.color = 'yellow';
if (reason !== CANCELLATION_REASON) {
this.statusBar.text = '$(alert) Test discovery failed';
this.statusBar.tooltip = 'Discovering Tests failed (view \'Python Test Log\' output panel for details)';
Expand Down