mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-24 22:00:30 -04:00
* Initial port of release/0.24 source code * Fix additional headers * Fix a typo in launch.json
40 lines
1.7 KiB
TypeScript
40 lines
1.7 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { SpectronApplication } from '../../spectron/application';
|
|
|
|
describe('Dataloss', () => {
|
|
before(function () {
|
|
this.app.suiteName = 'Dataloss';
|
|
});
|
|
|
|
it(`verifies that 'hot exit' works for dirty files`, async function () {
|
|
const app = this.app as SpectronApplication;
|
|
await app.workbench.newUntitledFile();
|
|
|
|
const untitled = 'Untitled-1';
|
|
const textToTypeInUntitled = 'Hello, Unitled Code';
|
|
await app.workbench.editor.waitForTypeInEditor(untitled, textToTypeInUntitled);
|
|
await app.screenCapturer.capture('Untitled file before reload');
|
|
|
|
const readmeMd = 'readme.md';
|
|
const textToType = 'Hello, Code';
|
|
await app.workbench.explorer.openFile(readmeMd);
|
|
await app.workbench.editor.waitForTypeInEditor(readmeMd, textToType);
|
|
await app.screenCapturer.capture(`${readmeMd} before reload`);
|
|
|
|
await app.reload();
|
|
await app.screenCapturer.capture('After reload');
|
|
|
|
await app.workbench.waitForActiveTab(readmeMd, true);
|
|
await app.screenCapturer.capture(`${readmeMd} after reload`);
|
|
await app.workbench.editor.waitForEditorContents(readmeMd, c => c.indexOf(textToType) > -1);
|
|
|
|
await app.workbench.waitForTab(untitled, true);
|
|
await app.workbench.selectTab(untitled, true);
|
|
await app.screenCapturer.capture('Untitled file after reload');
|
|
await app.workbench.editor.waitForEditorContents(untitled, c => c.indexOf(textToTypeInUntitled) > -1);
|
|
});
|
|
}); |