File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed
test/vscode-tests/no-workspace/query-history Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,6 @@ const SHOW_QUERY_TEXT_QUICK_EVAL_MSG = `\
101101
102102` ;
103103
104- /**
105- * Path to icon to display next to a failed query history item.
106- */
107- const FAILED_QUERY_HISTORY_ITEM_ICON = "media/red-x.svg" ;
108-
109104/**
110105 * Path to icon to display next to a successful local run.
111106 */
@@ -158,8 +153,6 @@ export class HistoryTreeDataProvider
158153
159154 private history : QueryHistoryInfo [ ] = [ ] ;
160155
161- private failedIconPath : string ;
162-
163156 private localSuccessIconPath : string ;
164157
165158 private remoteSuccessIconPath : string ;
@@ -171,7 +164,6 @@ export class HistoryTreeDataProvider
171164 private readonly labelProvider : HistoryItemLabelProvider ,
172165 ) {
173166 super ( ) ;
174- this . failedIconPath = join ( extensionPath , FAILED_QUERY_HISTORY_ITEM_ICON ) ;
175167 this . localSuccessIconPath = join (
176168 extensionPath ,
177169 LOCAL_SUCCESS_QUERY_HISTORY_ITEM_ICON ,
@@ -211,7 +203,7 @@ export class HistoryTreeDataProvider
211203 return this . remoteSuccessIconPath ;
212204 }
213205 case QueryStatus . Failed :
214- return this . failedIconPath ;
206+ return new ThemeIcon ( "error" ) ;
215207 default :
216208 assertNever ( element . status ) ;
217209 }
Original file line number Diff line number Diff line change @@ -1716,9 +1716,7 @@ describe("query-history", () => {
17161716 } ) ;
17171717
17181718 const treeItem = await historyTreeDataProvider . getTreeItem ( mockQuery ) ;
1719- expect ( treeItem . iconPath ) . toBe (
1720- vscode . Uri . file ( `${ mockExtensionLocation } /media/red-x.svg` ) . fsPath ,
1721- ) ;
1719+ expect ( treeItem . iconPath ) . toEqual ( new vscode . ThemeIcon ( "error" ) ) ;
17221720 } ) ;
17231721
17241722 it ( "should get a tree item that failed before creating any results" , async ( ) => {
@@ -1728,9 +1726,7 @@ describe("query-history", () => {
17281726 } ) ;
17291727
17301728 const treeItem = await historyTreeDataProvider . getTreeItem ( mockQuery ) ;
1731- expect ( treeItem . iconPath ) . toBe (
1732- vscode . Uri . file ( `${ mockExtensionLocation } /media/red-x.svg` ) . fsPath ,
1733- ) ;
1729+ expect ( treeItem . iconPath ) . toEqual ( new vscode . ThemeIcon ( "error" ) ) ;
17341730 } ) ;
17351731
17361732 it ( "should get a tree item that is in progress" , async ( ) => {
You can’t perform that action at this time.
0 commit comments