Skip to content

Commit 8855054

Browse files
authored
add push and pull to tracked tree title (#1678)
1 parent e759ab0 commit 8855054

File tree

2 files changed

+10
-36
lines changed

2 files changed

+10
-36
lines changed

extension/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,16 @@
944944
}
945945
],
946946
"view/title": [
947+
{
948+
"command": "dvc.pull",
949+
"when": "view == dvc.views.trackedExplorerTree",
950+
"group": "navigation@1"
951+
},
952+
{
953+
"command": "dvc.push",
954+
"when": "view == dvc.views.trackedExplorerTree",
955+
"group": "navigation@2"
956+
},
947957
{
948958
"command": "dvc.showExperiments",
949959
"when": "view == dvc.views.experimentsColumnsTree",

extension/src/test/suite/extension.test.ts

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { afterEach, beforeEach, describe, it, suite } from 'mocha'
33
import { expect } from 'chai'
44
import { stub, restore, spy, match } from 'sinon'
55
import { window, commands, workspace, Uri } from 'vscode'
6-
import { ensureFileSync } from 'fs-extra'
76
import {
87
closeAllEditors,
98
configurationChangeEvent,
@@ -27,10 +26,6 @@ import { OutputChannel } from '../../vscode/outputChannel'
2726
import { WorkspaceExperiments } from '../../experiments/workspace'
2827
import { QuickPickItemWithValue } from '../../vscode/quickPick'
2928
import { MIN_CLI_VERSION } from '../../cli/constants'
30-
import { dvcDemoPath } from '../util'
31-
import { fireWatcher } from '../../fileSystem/watcher'
32-
import { exists } from '../../fileSystem'
33-
import { getVenvBinPath } from '../../python'
3429

3530
suite('Extension Test Suite', () => {
3631
const dvcPathOption = 'dvc.dvcPath'
@@ -374,37 +369,6 @@ suite('Extension Test Suite', () => {
374369
{ duration: 0 }
375370
)
376371
}).timeout(WEBVIEW_TEST_TIMEOUT)
377-
378-
it('should call setup if the cli is inaccessible and a virtual environment is updated with DVC', async () => {
379-
const updateEvent = new Promise(resolve =>
380-
workspace.onDidChangeConfiguration(e => {
381-
if (e.affectsConfiguration(dvcPathOption)) {
382-
resolve(undefined)
383-
}
384-
})
385-
)
386-
387-
workspace
388-
.getConfiguration()
389-
.update(dvcPathOption, join('not', 'a', 'valid', 'dvc', 'path'), false)
390-
391-
await updateEvent
392-
393-
const mockSetup = stub(Setup, 'setup')
394-
const setupEvent = new Promise(resolve =>
395-
mockSetup.callsFake(() => {
396-
resolve(undefined)
397-
return Promise.resolve(undefined)
398-
})
399-
)
400-
401-
const dvcPath = getVenvBinPath(dvcDemoPath, '.env', 'dvc')
402-
exists(dvcPath) ? fireWatcher(dvcPath) : ensureFileSync(dvcPath)
403-
404-
await setupEvent
405-
406-
expect(mockSetup).to.be.calledOnce
407-
}).timeout(WEBVIEW_TEST_TIMEOUT)
408372
})
409373

410374
describe('dvc.stopRunningExperiment', () => {

0 commit comments

Comments
 (0)