Sql DB project dashboard (#14899)

* First set of changes for workspace dashboard implementing the toolbar

* Workspace dashboard container implementation (#14813)

* First set of changes for workspace dashboard implementing the toolbar (#14160)

* First set of changes for workspace dashboard implementing the toolbar

* Addressed comments

* Addressed one remaining comment

* Removed an extra comma in interfaces file

* Addressed comments

* Addressed comments

* Refactored a bit of code

* Remove unnecessary await

* Addressed comments

* First set of changes for workspace dashboard container

* Update targetPlatform icon+add Time column to deploy table

* Addressed comments

* Removed redundant class definition

* Addressed comments

* Addressed comments

* Change enum to union type in dataworkspace typings

* Fix tests

* Addressed comments
This commit is contained in:
Sakshi Sharma
2021-03-30 17:37:53 -07:00
committed by GitHub
parent 4df77c73bf
commit b774f09b6c
25 changed files with 855 additions and 25 deletions

View File

@@ -409,7 +409,9 @@ describe('ProjectsController', function (): void {
projController.setup(x => x.getDaxFxService()).returns(() => Promise.resolve(testContext.dacFxService.object));
await projController.object.publishProjectCallback(new Project(''), { connectionUri: '', databaseName: '' });
const proj = await testUtils.createTestProject(baselines.openProjectFileBaseline);
await projController.object.publishProjectCallback(proj, { connectionUri: '', databaseName: '' });
should(builtDacpacPath).not.equal('', 'built dacpac path should be set');
should(publishedDacpacPath).not.equal('', 'published dacpac path should be set');

View File

@@ -7,7 +7,7 @@ import * as should from 'should';
import * as path from 'path';
import * as os from 'os';
import { createDummyFileStructure } from './testUtils';
import { exists, trimUri, removeSqlCmdVariableFormatting, formatSqlCmdVariable, isValidSqlCmdVariableName } from '../common/utils';
import { exists, trimUri, removeSqlCmdVariableFormatting, formatSqlCmdVariable, isValidSqlCmdVariableName, timeConversion } from '../common/utils';
import { Uri } from 'vscode';
describe('Tests to verify utils functions', function (): void {
@@ -78,5 +78,15 @@ describe('Tests to verify utils functions', function (): void {
should(isValidSqlCmdVariableName('test\'')).equal(false);
should(isValidSqlCmdVariableName('test-1')).equal(false);
});
it('Should convert from milliseconds to hr min sec correctly', () => {
should(timeConversion((60 * 60 * 1000) + (59 * 60 * 1000) + (59 * 1000))).equal('1 hr, 59 min, 59 sec');
should(timeConversion((60 * 60 * 1000) + (59 * 60 * 1000) )).equal('1 hr, 59 min');
should(timeConversion((60 * 60 * 1000) )).equal('1 hr');
should(timeConversion((60 * 60 * 1000) + (59 * 1000))).equal('1 hr, 59 sec');
should(timeConversion( (59 * 60 * 1000) + (59 * 1000))).equal('59 min, 59 sec');
should(timeConversion( (59 * 1000))).equal('59 sec');
should(timeConversion( (59))).equal('59 msec');
});
});