Skip to content

Commit

Permalink
Merge branch 'main' into do-not-snapshot-progress-ring
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon authored Nov 30, 2022
2 parents 34bc562 + 6ea4d6d commit e39784a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
11 changes: 7 additions & 4 deletions extension/src/experiments/webview/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class WebviewMessages {
return this.focusSortsTree()

case MessageFromWebviewType.OPEN_PLOTS_WEBVIEW:
return this.showPlots()
return this.showPlotsToSide()

case MessageFromWebviewType.SHARE_EXPERIMENT_AS_BRANCH:
return commands.executeCommand(
Expand All @@ -143,7 +143,7 @@ export class WebviewMessages {
case MessageFromWebviewType.SET_EXPERIMENTS_AND_OPEN_PLOTS:
return Promise.all([
this.setSelectedExperiments(message.payload),
this.showPlots()
this.showPlotsToSide()
])

case MessageFromWebviewType.SET_EXPERIMENTS_HEADER_HEIGHT: {
Expand Down Expand Up @@ -316,7 +316,10 @@ export class WebviewMessages {
)
}

private showPlots() {
return commands.executeCommand(RegisteredCommands.PLOTS_SHOW, this.dvcRoot)
private showPlotsToSide() {
return commands.executeCommand(
RegisteredCommands.EXPERIMENT_AND_PLOTS_SHOW,
this.dvcRoot
)
}
}
14 changes: 9 additions & 5 deletions extension/src/test/suite/experiments/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1015,10 +1015,14 @@ suite('Experiments Test Suite', () => {

it('should be able to handle a message to compare experiments plots', async () => {
const { experiments, experimentsModel } = buildExperiments(disposable)
const mockShowPlots = stub(
WorkspacePlots.prototype,
'showWebview'
).resolves(undefined)
const mockShowPlots = stub(WorkspacePlots.prototype, 'showWebview')

const dataSent = new Promise(resolve =>
mockShowPlots.callsFake(() => {
resolve(undefined)
return Promise.resolve(undefined)
})
)

await experiments.isReady()

Expand All @@ -1039,7 +1043,7 @@ suite('Experiments Test Suite', () => {
type: MessageFromWebviewType.SET_EXPERIMENTS_AND_OPEN_PLOTS
})

await tableChangePromise
await Promise.all([tableChangePromise, dataSent])

const selectExperimentIds = experimentsModel
.getSelectedRevisions()
Expand Down

0 comments on commit e39784a

Please sign in to comment.