@@ -44,6 +44,7 @@ import {
4444 QuickPickItemWithValue ,
4545 QuickPickOptionsWithTitle
4646} from '../../../../vscode/quickPick'
47+ import * as QuickPickWrapper from '../../../../vscode/quickPick'
4748import { Response } from '../../../../vscode/response'
4849import { DvcExecutor } from '../../../../cli/dvc/executor'
4950import { Param } from '../../../../experiments/model/modify/collect'
@@ -63,6 +64,7 @@ suite('Experiments Tree Test Suite', () => {
6364 disposable . dispose ( )
6465 } )
6566
67+ // eslint-disable-next-line sonarjs/cognitive-complexity
6668 describe ( 'ExperimentsTree' , ( ) => {
6769 const { colors } = checkpointPlotsFixture
6870 const { domain, range } = colors
@@ -150,6 +152,34 @@ suite('Experiments Tree Test Suite', () => {
150152 ) . to . be . calledOnceWith ( false )
151153 } ) . timeout ( WEBVIEW_TEST_TIMEOUT )
152154
155+ it ( 'should not show queued experiments in the dvc.views.experimentsTree.selectExperiments quick pick' , async ( ) => {
156+ await buildPlots ( disposable )
157+
158+ const mockQuickPickLimitedValues = stub (
159+ QuickPickWrapper ,
160+ 'quickPickLimitedValues'
161+ ) . resolves ( undefined )
162+
163+ await commands . executeCommand ( RegisteredCommands . EXPERIMENT_SELECT )
164+
165+ const [ availableItems ] = mockQuickPickLimitedValues . lastCall . args
166+
167+ expect ( availableItems . length ) . to . be . greaterThan ( 0 )
168+ const queued = [ ]
169+
170+ for ( const experimentOrSeparator of availableItems ) {
171+ if (
172+ ( experimentOrSeparator ?. value as { type : ExperimentType } ) ?. type ===
173+ ExperimentType . QUEUED
174+ ) {
175+ queued . push ( experimentOrSeparator )
176+ }
177+ }
178+
179+ expect ( mockQuickPickLimitedValues ) . to . be . calledOnce
180+ expect ( queued ) . to . deep . equal ( [ ] )
181+ } ) . timeout ( WEBVIEW_TEST_TIMEOUT )
182+
153183 it ( 'should be able to select / de-select experiments using dvc.views.experimentsTree.selectExperiments' , async ( ) => {
154184 const { plots, messageSpy } = await buildPlots ( disposable )
155185
0 commit comments