mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 17:22:25 -05:00
Add workspace information in Import UI (#13648)
* Add workspace information in Import UI * Addressed comments * Reduced space between Workspace heading and the label
This commit is contained in:
@@ -7,6 +7,7 @@ import * as should from 'should';
|
||||
import * as azdata from 'azdata';
|
||||
import * as mssql from '../../../../mssql';
|
||||
import * as sinon from 'sinon';
|
||||
import * as path from 'path';
|
||||
import { CreateProjectFromDatabaseDialog } from '../../dialogs/createProjectFromDatabaseDialog';
|
||||
import { mockConnectionProfile } from '../testContext';
|
||||
import { ImportDataModel } from '../../models/api/import';
|
||||
@@ -82,6 +83,15 @@ describe('Create Project From Database Dialog', () => {
|
||||
should.equal(dialog.projectNameTextBox!.value, 'DatabaseProjectMy Database');
|
||||
});
|
||||
|
||||
it('Should update default workspace name correctly when location and project name are provided', async function (): Promise<void> {
|
||||
sinon.stub(azdata.connection, 'listDatabases').resolves(['My Database']);
|
||||
const dialog = new CreateProjectFromDatabaseDialog(mockConnectionProfile);
|
||||
await dialog.openDialog();
|
||||
dialog.updateWorkspaceInputbox('testLocation', 'testProjectName');
|
||||
|
||||
should.equal(dialog.workspaceInputBox!.value, path.join('testLocation', 'testProjectName.code-workspace'));
|
||||
});
|
||||
|
||||
it('Should include all info in import data model and connect to appropriate call back properties', async function (): Promise<void> {
|
||||
const dialog = new CreateProjectFromDatabaseDialog(mockConnectionProfile);
|
||||
sinon.stub(azdata.connection, 'listDatabases').resolves(['My Database']);
|
||||
|
||||
Reference in New Issue
Block a user