mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
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:
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user