File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ export class WebviewMessages {
124124 return this . focusSortsTree ( )
125125
126126 case MessageFromWebviewType . OPEN_PLOTS_WEBVIEW :
127- return this . showPlots ( )
127+ return this . showPlotsToSide ( )
128128
129129 case MessageFromWebviewType . SHARE_EXPERIMENT_AS_BRANCH :
130130 return commands . executeCommand (
@@ -143,7 +143,7 @@ export class WebviewMessages {
143143 case MessageFromWebviewType . SET_EXPERIMENTS_AND_OPEN_PLOTS :
144144 return Promise . all ( [
145145 this . setSelectedExperiments ( message . payload ) ,
146- this . showPlots ( )
146+ this . showPlotsToSide ( )
147147 ] )
148148
149149 case MessageFromWebviewType . SET_EXPERIMENTS_HEADER_HEIGHT : {
@@ -316,7 +316,10 @@ export class WebviewMessages {
316316 )
317317 }
318318
319- private showPlots ( ) {
320- return commands . executeCommand ( RegisteredCommands . PLOTS_SHOW , this . dvcRoot )
319+ private showPlotsToSide ( ) {
320+ return commands . executeCommand (
321+ RegisteredCommands . EXPERIMENT_AND_PLOTS_SHOW ,
322+ this . dvcRoot
323+ )
321324 }
322325}
Original file line number Diff line number Diff line change @@ -1015,10 +1015,14 @@ suite('Experiments Test Suite', () => {
10151015
10161016 it ( 'should be able to handle a message to compare experiments plots' , async ( ) => {
10171017 const { experiments, experimentsModel } = buildExperiments ( disposable )
1018- const mockShowPlots = stub (
1019- WorkspacePlots . prototype ,
1020- 'showWebview'
1021- ) . resolves ( undefined )
1018+ const mockShowPlots = stub ( WorkspacePlots . prototype , 'showWebview' )
1019+
1020+ const dataSent = new Promise ( resolve =>
1021+ mockShowPlots . callsFake ( ( ) => {
1022+ resolve ( undefined )
1023+ return Promise . resolve ( undefined )
1024+ } )
1025+ )
10221026
10231027 await experiments . isReady ( )
10241028
@@ -1039,7 +1043,7 @@ suite('Experiments Test Suite', () => {
10391043 type : MessageFromWebviewType . SET_EXPERIMENTS_AND_OPEN_PLOTS
10401044 } )
10411045
1042- await tableChangePromise
1046+ await Promise . all ( [ tableChangePromise , dataSent ] )
10431047
10441048 const selectExperimentIds = experimentsModel
10451049 . getSelectedRevisions ( )
You can’t perform that action at this time.
0 commit comments