diff --git a/extension/package.json b/extension/package.json index 4f030440fd..1aae52c53c 100644 --- a/extension/package.json +++ b/extension/package.json @@ -944,6 +944,16 @@ } ], "view/title": [ + { + "command": "dvc.pull", + "when": "view == dvc.views.trackedExplorerTree", + "group": "navigation@1" + }, + { + "command": "dvc.push", + "when": "view == dvc.views.trackedExplorerTree", + "group": "navigation@2" + }, { "command": "dvc.showExperiments", "when": "view == dvc.views.experimentsColumnsTree", diff --git a/extension/src/test/suite/extension.test.ts b/extension/src/test/suite/extension.test.ts index 8c8ad4ab60..8e38d23c72 100644 --- a/extension/src/test/suite/extension.test.ts +++ b/extension/src/test/suite/extension.test.ts @@ -3,7 +3,6 @@ import { afterEach, beforeEach, describe, it, suite } from 'mocha' import { expect } from 'chai' import { stub, restore, spy, match } from 'sinon' import { window, commands, workspace, Uri } from 'vscode' -import { ensureFileSync } from 'fs-extra' import { closeAllEditors, configurationChangeEvent, @@ -27,10 +26,6 @@ import { OutputChannel } from '../../vscode/outputChannel' import { WorkspaceExperiments } from '../../experiments/workspace' import { QuickPickItemWithValue } from '../../vscode/quickPick' import { MIN_CLI_VERSION } from '../../cli/constants' -import { dvcDemoPath } from '../util' -import { fireWatcher } from '../../fileSystem/watcher' -import { exists } from '../../fileSystem' -import { getVenvBinPath } from '../../python' suite('Extension Test Suite', () => { const dvcPathOption = 'dvc.dvcPath' @@ -374,37 +369,6 @@ suite('Extension Test Suite', () => { { duration: 0 } ) }).timeout(WEBVIEW_TEST_TIMEOUT) - - it('should call setup if the cli is inaccessible and a virtual environment is updated with DVC', async () => { - const updateEvent = new Promise(resolve => - workspace.onDidChangeConfiguration(e => { - if (e.affectsConfiguration(dvcPathOption)) { - resolve(undefined) - } - }) - ) - - workspace - .getConfiguration() - .update(dvcPathOption, join('not', 'a', 'valid', 'dvc', 'path'), false) - - await updateEvent - - const mockSetup = stub(Setup, 'setup') - const setupEvent = new Promise(resolve => - mockSetup.callsFake(() => { - resolve(undefined) - return Promise.resolve(undefined) - }) - ) - - const dvcPath = getVenvBinPath(dvcDemoPath, '.env', 'dvc') - exists(dvcPath) ? fireWatcher(dvcPath) : ensureFileSync(dvcPath) - - await setupEvent - - expect(mockSetup).to.be.calledOnce - }).timeout(WEBVIEW_TEST_TIMEOUT) }) describe('dvc.stopRunningExperiment', () => {