mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 09:38:26 -05:00
Test fixes based on recent changes (#5570)
* Test fixes based on recent changes and allowing toolbar to stay at top * removing scroll changes to be in seperate PR
This commit is contained in:
@@ -72,7 +72,13 @@ if (context.RunTest) {
|
||||
|
||||
test('Stand alone database context menu test', async function () {
|
||||
let server = await getStandaloneServer();
|
||||
let expectedActions = ['Manage', 'New Query', 'Backup', 'Restore', 'Refresh', 'Data-tier Application wizard', 'Schema Compare', 'Import wizard', 'Generate Scripts...', 'Properties'];
|
||||
let expectedActions: string[] = [];
|
||||
if (process.platform === 'win32') {
|
||||
expectedActions = ['Manage', 'New Query', 'Backup', 'Restore', 'Refresh', 'Data-tier Application wizard', 'Schema Compare', 'Import wizard', 'Generate Scripts...', 'Properties'];
|
||||
}
|
||||
else {
|
||||
expectedActions = ['Manage', 'New Query', 'Backup', 'Restore', 'Refresh', 'Data-tier Application wizard', 'Schema Compare', 'Import wizard'];
|
||||
}
|
||||
await VerifyDBContextMenu(server, 3000, expectedActions);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
"@types/node": "^8.0.24",
|
||||
"mocha": "^5.2.0",
|
||||
"should": "^13.2.1",
|
||||
"typemoq": "^2.1.0"
|
||||
"typemoq": "^2.1.0",
|
||||
"vscode": "1.1.26"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,6 @@ export class SchemaCompareResult {
|
||||
|
||||
await view.initializeModel(this.flexModel);
|
||||
});
|
||||
this.editor.openEditor();
|
||||
}
|
||||
|
||||
public start(): void {
|
||||
@@ -172,7 +171,7 @@ export class SchemaCompareResult {
|
||||
return this.comparisonResult;
|
||||
}
|
||||
|
||||
private async execute(): Promise<void> {
|
||||
public async execute(): Promise<void> {
|
||||
if (this.schemaCompareOptionDialog && this.schemaCompareOptionDialog.deploymentOptions) {
|
||||
// take updates if any
|
||||
this.deploymentOptions = this.schemaCompareOptionDialog.deploymentOptions;
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
'use strict';
|
||||
|
||||
import * as should from 'should';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
import 'mocha';
|
||||
import { SchemaCompareDialog } from './../dialogs/schemaCompareDialog';
|
||||
@@ -51,13 +49,13 @@ const mockTargetEndpoint: azdata.SchemaCompareEndpointInfo = {
|
||||
};
|
||||
|
||||
describe('SchemaCompareDialog.openDialog', function(): void {
|
||||
it('Should be correct when created.', function(): void {
|
||||
it('Should be correct when created.', async function(): Promise<void> {
|
||||
let dialog = new SchemaCompareDialog();
|
||||
dialog.openDialog(mockConnectionProfile);
|
||||
await dialog.openDialog(mockConnectionProfile);
|
||||
|
||||
should(dialog.dialog.title).equal('Schema Compare');
|
||||
should(dialog.dialog.okButton.label).equal('Compare');
|
||||
should(dialog.dialog.okButton.enabled).equal(true);
|
||||
should(dialog.dialog.okButton.label).equal('Ok');
|
||||
should(dialog.dialog.okButton.enabled).equal(false); // Should be false when open
|
||||
});
|
||||
});
|
||||
|
||||
@@ -71,7 +69,10 @@ describe('SchemaCompareResult.start', function(): void {
|
||||
await promise;
|
||||
await result.start();
|
||||
|
||||
should(result.getComparisionResult().success).equal(true);
|
||||
should(result.getComparisionResult().operationId).equal(sc.testOperationId);
|
||||
should(result.getComparisionResult() === undefined);
|
||||
await result.execute();
|
||||
|
||||
should(result.getComparisionResult() !== undefined);
|
||||
should(result.getComparisionResult().operationId !== undefined);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -14,6 +14,7 @@ call .\scripts\code.bat --extensionDevelopmentPath=%~dp0\..\extensions\admin-too
|
||||
call .\scripts\code.bat --extensionDevelopmentPath=%~dp0\..\extensions\agent --extensionTestsPath=%~dp0\..\extensions\agent\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
call .\scripts\code.bat --extensionDevelopmentPath=%~dp0\..\extensions\cms --extensionTestsPath=%~dp0\..\extensions\cms\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
call .\scripts\code.bat --extensionDevelopmentPath=%~dp0\..\extensions\dacpac --extensionTestsPath=%~dp0\..\extensions\dacpac\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
call .\scripts\code.bat --extensionDevelopmentPath=%~dp0\..\extensions\schema-compare --extensionTestsPath=%~dp0\..\extensions\schema-compare\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
call .\scripts\code.bat --extensionDevelopmentPath=%~dp0\..\extensions\notebook --extensionTestsPath=%~dp0\..\extensions\notebook\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
call .\scripts\code.bat --extensionDevelopmentPath=%~dp0\..\extensions\resource-deployment --extensionTestsPath=%~dp0\..\extensions\resource-deployment\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ echo $VSCODEEXTDIR
|
||||
./scripts/code.sh --extensionDevelopmentPath=$ROOT/extensions/agent --extensionTestsPath=$ROOT/extensions/agent/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
./scripts/code.sh --extensionDevelopmentPath=$ROOT/extensions/cms --extensionTestsPath=$ROOT/extensions/cms/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
./scripts/code.sh --extensionDevelopmentPath=$ROOT/extensions/dacpac --extensionTestsPath=$ROOT/extensions/dacpac/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
./scripts/code.sh --extensionDevelopmentPath=$ROOT/extensions/schema-compare --extensionTestsPath=$ROOT/extensions/schema-compare/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
./scripts/code.sh --extensionDevelopmentPath=$ROOT/extensions/notebook --extensionTestsPath=$ROOT/extensions/notebook/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
./scripts/code.sh --extensionDevelopmentPath=$ROOT/extensions/resource-deployment --extensionTestsPath=$ROOT/extensions/resource-deployment/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user