@@ -11,14 +11,26 @@ import { CancellationTokenSource, Uri } from "vscode";
1111import { tmpDir } from "../../../src/helpers" ;
1212import { QueryResultType } from "../../../src/pure/legacy-messages" ;
1313import { QueryInProgress } from "../../../src/legacy-query-server/run-queries" ;
14+ import { RemoteQueryHistoryItem } from "../../../src/remote-queries/remote-query-history-item" ;
15+ import { VariantAnalysisHistoryItem } from "../../../src/remote-queries/variant-analysis-history-item" ;
16+ import { QueryHistoryInfo } from "../../../src/query-history-info" ;
17+ import { createMockRemoteQueryHistoryItem } from "../../factories/remote-queries/remote-query-history-item" ;
18+ import { createMockVariantAnalysisHistoryItem } from "../../factories/remote-queries/variant-analysis-history-item" ;
1419
1520describe ( "serialize and deserialize" , ( ) => {
1621 let infoSuccessRaw : LocalQueryInfo ;
1722 let infoSuccessInterpreted : LocalQueryInfo ;
1823 let infoEarlyFailure : LocalQueryInfo ;
1924 let infoLateFailure : LocalQueryInfo ;
20- let infoInprogress : LocalQueryInfo ;
21- let allHistory : LocalQueryInfo [ ] ;
25+ let infoInProgress : LocalQueryInfo ;
26+
27+ let remoteQuery1 : RemoteQueryHistoryItem ;
28+ let remoteQuery2 : RemoteQueryHistoryItem ;
29+
30+ let variantAnalysis1 : VariantAnalysisHistoryItem ;
31+ let variantAnalysis2 : VariantAnalysisHistoryItem ;
32+
33+ let allHistory : QueryHistoryInfo [ ] ;
2234 let queryPath : string ;
2335 let cnt = 0 ;
2436
@@ -56,13 +68,24 @@ describe("serialize and deserialize", () => {
5668 false ,
5769 ) ,
5870 ) ;
59- infoInprogress = createMockFullQueryInfo ( "e" ) ;
71+ infoInProgress = createMockFullQueryInfo ( "e" ) ;
72+
73+ remoteQuery1 = createMockRemoteQueryHistoryItem ( { } ) ;
74+ remoteQuery2 = createMockRemoteQueryHistoryItem ( { } ) ;
75+
76+ variantAnalysis1 = createMockVariantAnalysisHistoryItem ( { } ) ;
77+ variantAnalysis2 = createMockVariantAnalysisHistoryItem ( { } ) ;
78+
6079 allHistory = [
6180 infoSuccessRaw ,
6281 infoSuccessInterpreted ,
6382 infoEarlyFailure ,
6483 infoLateFailure ,
65- infoInprogress ,
84+ infoInProgress ,
85+ remoteQuery1 ,
86+ remoteQuery2 ,
87+ variantAnalysis1 ,
88+ variantAnalysis2 ,
6689 ] ;
6790 } ) ;
6891
@@ -72,6 +95,10 @@ describe("serialize and deserialize", () => {
7295 infoSuccessRaw ,
7396 infoSuccessInterpreted ,
7497 infoLateFailure ,
98+ remoteQuery1 ,
99+ remoteQuery2 ,
100+ variantAnalysis1 ,
101+ variantAnalysis2 ,
75102 ] ;
76103
77104 const allHistoryPath = join ( tmpDir . name , "workspace-query-history.json" ) ;
@@ -98,7 +125,7 @@ describe("serialize and deserialize", () => {
98125 }
99126 } ) ;
100127 expectedHistory . forEach ( ( info ) => {
101- if ( info . completedQuery ) {
128+ if ( info . t == "local" && info . completedQuery ) {
102129 ( info . completedQuery as any ) . dispose = undefined ;
103130 }
104131 } ) ;
0 commit comments