@@ -79,7 +79,8 @@ describe('Variant Analyses and QueryHistoryManager', function() {
7979 onVariantAnalysisAdded : sandbox . stub ( ) ,
8080 onVariantAnalysisRemoved : sandbox . stub ( ) ,
8181 removeRemoteQuery : removeVariantAnalysisStub ,
82- rehydrateVariantAnalysis : rehydrateVariantAnalysisStub
82+ rehydrateVariantAnalysis : rehydrateVariantAnalysisStub ,
83+ onVariantAnalysisStatusUpdated : sandbox . stub ( )
8384 } as any as VariantAnalysisManager ;
8485
8586 rawQueryHistory = fs . readJSONSync ( path . join ( STORAGE_DIR , 'workspace-query-history.json' ) ) . queries ;
@@ -134,7 +135,7 @@ describe('Variant Analyses and QueryHistoryManager', function() {
134135 // Remove the first variant analysis
135136 await qhm . handleRemoveHistoryItem ( qhm . treeDataProvider . allHistory [ 0 ] ) ;
136137
137- expect ( removeVariantAnalysisStub ) . calledOnceWithExactly ( rawQueryHistory [ 0 ] . historyItemId ) ;
138+ expect ( removeVariantAnalysisStub ) . calledOnceWithExactly ( rawQueryHistory [ 0 ] . variantAnalysis . id . toString ( ) ) ;
138139 expect ( rehydrateVariantAnalysisStub ) . to . have . callCount ( 2 ) ;
139140
140141 expect ( rehydrateVariantAnalysisStub . getCall ( 0 ) . args [ 0 ] ) . to . deep . eq ( rawQueryHistory [ 0 ] . variantAnalysis ) ;
@@ -143,7 +144,7 @@ describe('Variant Analyses and QueryHistoryManager', function() {
143144 expect ( rehydrateVariantAnalysisStub . getCall ( 1 ) . args [ 0 ] ) . to . deep . eq ( rawQueryHistory [ 1 ] . variantAnalysis ) ;
144145 expect ( rehydrateVariantAnalysisStub . getCall ( 1 ) . args [ 1 ] ) . to . deep . eq ( rawQueryHistory [ 1 ] . status ) ;
145146
146- expect ( openRemoteQueryResultsStub ) . calledOnceWithExactly ( rawQueryHistory [ 1 ] . historyItemId ) ;
147+ expect ( openRemoteQueryResultsStub ) . calledOnceWithExactly ( rawQueryHistory [ 1 ] . variantAnalysis . id . toString ( ) ) ;
147148 expect ( qhm . treeDataProvider . allHistory ) . to . deep . eq ( rawQueryHistory . slice ( 1 ) ) ;
148149
149150 // Add it back to the history
@@ -161,8 +162,8 @@ describe('Variant Analyses and QueryHistoryManager', function() {
161162 await qhm . handleRemoveHistoryItem ( undefined ! , [ qhm . treeDataProvider . allHistory [ 1 ] , qhm . treeDataProvider . allHistory [ 0 ] ] ) ;
162163
163164 expect ( removeVariantAnalysisStub . callCount ) . to . eq ( 2 ) ;
164- expect ( removeVariantAnalysisStub . getCall ( 0 ) . args [ 0 ] ) . to . eq ( rawQueryHistory [ 1 ] . historyItemId ) ;
165- expect ( removeVariantAnalysisStub . getCall ( 1 ) . args [ 0 ] ) . to . eq ( rawQueryHistory [ 0 ] . historyItemId ) ;
165+ expect ( removeVariantAnalysisStub . getCall ( 0 ) . args [ 0 ] ) . to . eq ( rawQueryHistory [ 1 ] . variantAnalysis . id . toString ( ) ) ;
166+ expect ( removeVariantAnalysisStub . getCall ( 1 ) . args [ 0 ] ) . to . eq ( rawQueryHistory [ 0 ] . variantAnalysis . id . toString ( ) ) ;
166167 expect ( qhm . treeDataProvider . allHistory ) . to . deep . eq ( [ ] ) ;
167168
168169 // also, both queries should be removed from disk storage
@@ -176,7 +177,7 @@ describe('Variant Analyses and QueryHistoryManager', function() {
176177 await qhm . readQueryHistory ( ) ;
177178
178179 await qhm . handleItemClicked ( qhm . treeDataProvider . allHistory [ 0 ] , [ ] ) ;
179- expect ( openRemoteQueryResultsStub ) . calledOnceWithExactly ( rawQueryHistory [ 0 ] . historyItemId ) ;
180+ expect ( openRemoteQueryResultsStub ) . calledOnceWithExactly ( rawQueryHistory [ 0 ] . variantAnalysis . id . toString ( ) ) ;
180181 } ) ;
181182
182183 it ( 'should get the query text' , async ( ) => {
0 commit comments