Re-enable previously commented out configure python wizard tests (#11945)

* Re-enable configure python wizard tests

* Remove extra comment
This commit is contained in:
Chris LaFreniere
2020-08-25 11:26:37 -07:00
committed by GitHub
parent 7b54abbc96
commit 82132583af
3 changed files with 28 additions and 28 deletions

View File

@@ -122,7 +122,7 @@ export class ConfigurePythonWizard {
this._wizard.generateScriptButton.hidden = true; this._wizard.generateScriptButton.hidden = true;
this._wizard.pages = [page0, page1]; this._wizard.pages = [page0, page1];
this._wizard.open(); await this._wizard.open();
} }
public async close(): Promise<void> { public async close(): Promise<void> {

View File

@@ -40,38 +40,36 @@ describe('Configure Python Wizard', function () {
viewContext = createViewContext(); viewContext = createViewContext();
}); });
// These wizard tests are disabled due to errors with disposable objects it('Start wizard test', async () => {
// let wizard = new ConfigurePythonWizard(testInstallation);
// it('Start wizard test', async () => { await wizard.start();
// let wizard = new ConfigurePythonWizard(testInstallation); await wizard.close();
// await wizard.start(); await should(wizard.setupComplete).be.resolved();
// await wizard.close(); });
// await should(wizard.setupComplete).be.resolved();
// });
// it('Reject setup on cancel test', async () => { it('Reject setup on cancel test', async () => {
// let wizard = new ConfigurePythonWizard(testInstallation); let wizard = new ConfigurePythonWizard(testInstallation);
// await wizard.start(undefined, true); await wizard.start(undefined, true);
// await wizard.close(); await wizard.close();
// await should(wizard.setupComplete).be.rejected(); await should(wizard.setupComplete).be.rejected();
// }); });
// it('Error message test', async () => { it('Error message test', async () => {
// let wizard = new ConfigurePythonWizard(testInstallation); let wizard = new ConfigurePythonWizard(testInstallation);
// await wizard.start(); await wizard.start();
// should(wizard.wizard.message).be.undefined(); should(wizard.wizard.message).be.undefined();
// let testMsg = 'Test message'; let testMsg = 'Test message';
// wizard.showErrorMessage(testMsg); wizard.showErrorMessage(testMsg);
// should(wizard.wizard.message.text).be.equal(testMsg); should(wizard.wizard.message.text).be.equal(testMsg);
// should(wizard.wizard.message.level).be.equal(azdata.window.MessageLevel.Error); should(wizard.wizard.message.level).be.equal(azdata.window.MessageLevel.Error);
// wizard.clearStatusMessage(); wizard.clearStatusMessage();
// should(wizard.wizard.message).be.undefined(); should(wizard.wizard.message).be.undefined();
// await wizard.close(); await wizard.close();
// }); });
it('Configure Path Page test', async () => { it('Configure Path Page test', async () => {
let testPythonLocation = '/not/a/real/path'; let testPythonLocation = '/not/a/real/path';

View File

@@ -44,8 +44,10 @@ export abstract class ViewBase extends AngularDisposable implements IModelView {
this.rootDescriptor = descriptor; this.rootDescriptor = descriptor;
this.modelStore.registerValidationCallback(validationCallback); this.modelStore.registerValidationCallback(validationCallback);
// Kick off the build by detecting changes to the model // Kick off the build by detecting changes to the model
if (!(this.changeRef['destroyed'])) {
this.changeRef.detectChanges(); this.changeRef.detectChanges();
} }
}
private defineComponent(component: IComponentShape): IComponentDescriptor { private defineComponent(component: IComponentShape): IComponentDescriptor {
let existingDescriptor = this.modelStore.getComponentDescriptor(component.id); let existingDescriptor = this.modelStore.getComponentDescriptor(component.id);