Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,11 @@ describe("QueryHistoryManager", () => {
});

// should be selected
expect(queryHistoryManager.treeDataProvider.getCurrent()).toEqual(
selected,
);
expect(
(
queryHistoryManager.treeDataProvider.getCurrent() as VariantAnalysisHistoryItem
).variantAnalysis.id,
).toBe(selected.variantAnalysis.id);
});

it("should remove the item", async () => {
Expand All @@ -384,9 +386,11 @@ describe("QueryHistoryManager", () => {
// remove an item
await queryHistoryManager.handleRemoveHistoryItem([toDelete]);

expect(queryHistoryManager.treeDataProvider.getCurrent()).toEqual(
selected,
);
expect(
(
queryHistoryManager.treeDataProvider.getCurrent() as VariantAnalysisHistoryItem
).variantAnalysis.id,
).toBe(selected.variantAnalysis.id);
expect(variantAnalysisManagerStub.showView).toHaveBeenCalledWith(
selected.variantAnalysis.id,
);
Expand Down Expand Up @@ -505,9 +509,11 @@ describe("QueryHistoryManager", () => {
});

// should be selected
expect(queryHistoryManager.treeDataProvider.getCurrent()).toEqual(
selected,
);
expect(
(
queryHistoryManager.treeDataProvider.getCurrent() as VariantAnalysisHistoryItem
).variantAnalysis.id,
).toBe(selected.variantAnalysis.id);

// remove an item
await queryHistoryManager.handleRemoveHistoryItem([toDelete]);
Expand All @@ -523,9 +529,11 @@ describe("QueryHistoryManager", () => {
});

it("should not change the selection", () => {
expect(queryHistoryManager.treeDataProvider.getCurrent()).toEqual(
selected,
);
expect(
(
queryHistoryManager.treeDataProvider.getCurrent() as VariantAnalysisHistoryItem
).variantAnalysis.id,
).toBe(selected.variantAnalysis.id);
expect(variantAnalysisManagerStub.showView).toHaveBeenCalledWith(
selected.variantAnalysis.id,
);
Expand Down