提交 72bd5854 编写于 作者: J Joao Moreno

cleanup

上级 04cb8618
......@@ -71,12 +71,6 @@ export class SpectronApplication {
return this.options.workspaceFilePath;
}
private _suiteName: string = 'Init';
set suiteName(suiteName: string) {
this._suiteName = suiteName;
}
async start(waitForWelcome: boolean = true): Promise<any> {
await this._start();
......
......@@ -8,10 +8,6 @@ import { ProblemSeverity, Problems } from '../problems/problems';
export function setup() {
describe('CSS', () => {
before(function () {
this.app.suiteName = 'CSS';
});
it('verifies quick outline', async function () {
const app = this.app as SpectronApplication;
await app.workbench.quickopen.openFile('style.css');
......
......@@ -12,11 +12,6 @@ import { SpectronApplication } from '../../application';
export function setup() {
describe('Debug', () => {
before(async function () {
const app = this.app as SpectronApplication;
app.suiteName = 'Debug';
});
it('configure launch json', async function () {
const app = this.app as SpectronApplication;
......
......@@ -7,10 +7,6 @@ import { SpectronApplication } from '../../application';
export function setup() {
describe('Editor', () => {
before(function () {
this.app.suiteName = 'Editor';
});
it('shows correct quick outline', async function () {
const app = this.app as SpectronApplication;
await app.workbench.quickopen.openFile('www');
......
......@@ -7,10 +7,6 @@ import { SpectronApplication } from '../../application';
export function setup() {
describe('Explorer', () => {
before(function () {
this.app.suiteName = 'Explorer';
});
it('quick open search produces correct result', async function () {
const app = this.app as SpectronApplication;
const expectedNames = [
......
......@@ -8,10 +8,6 @@ import { SpectronApplication, Quality } from '../../application';
export function setup() {
describe('Extensions', () => {
before(function () {
this.app.suiteName = 'Extensions';
});
it(`install and activate vscode-smoketest-check extension`, async function () {
const app = this.app as SpectronApplication;
......
......@@ -11,11 +11,6 @@ const SYNC_STATUSBAR = 'div[id="workbench.parts.statusbar"] .statusbar-entry a[t
export function setup() {
describe('Git', () => {
before(async function () {
const app = this.app as SpectronApplication;
app.suiteName = 'Git';
});
it('reflects working tree changes', async function () {
const app = this.app as SpectronApplication;
......
......@@ -10,8 +10,6 @@ export function setup() {
describe('Multiroot', () => {
before(async function () {
this.app.suiteName = 'Multiroot';
const app = this.app as SpectronApplication;
// restart with preventing additional windows from restoring
......
......@@ -10,10 +10,6 @@ import { ActivityBarPosition } from '../activitybar/activityBar';
export function setup() {
describe('Preferences', () => {
before(function () {
this.app.suiteName = 'Preferences';
});
it('turns off editor line numbers and verifies the live change', async function () {
const app = this.app as SpectronApplication;
......
......@@ -7,10 +7,6 @@ import { SpectronApplication } from '../../application';
export function setup() {
describe('Search', () => {
before(function () {
this.app.suiteName = 'Search';
});
it('searches for body & checks for correct result number', async function () {
const app = this.app as SpectronApplication;
await app.workbench.search.openSearchViewlet();
......
......@@ -8,10 +8,6 @@ import { StatusBarElement } from './statusbar';
export function setup() {
describe('Statusbar', () => {
before(function () {
this.app.suiteName = 'Statusbar';
});
it('verifies presence of all default status bar elements', async function () {
const app = this.app as SpectronApplication;
......
......@@ -7,10 +7,6 @@ import { SpectronApplication } from '../../application';
export function setup() {
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.editors.newUntitledFile();
......
......@@ -28,7 +28,6 @@ export function setup(userDataDir: string, createApp: ICreateAppFn) {
}
await stableApp.start();
stableApp.suiteName = 'Data Migration';
const textToType = 'Very dirty file';
......@@ -46,7 +45,6 @@ export function setup(userDataDir: string, createApp: ICreateAppFn) {
}
await app.start(false);
app.suiteName = 'Data Migration';
assert.ok(await app.workbench.editors.waitForActiveTab('Untitled-1', true), `Untitled-1 tab is not present after migration.`);
......@@ -64,7 +62,6 @@ export function setup(userDataDir: string, createApp: ICreateAppFn) {
}
await stableApp.start();
stableApp.suiteName = 'Data Migration';
const fileName = 'app.js';
const textPart = 'This is going to be an unsaved file';
......@@ -84,7 +81,6 @@ export function setup(userDataDir: string, createApp: ICreateAppFn) {
}
await app.start(false);
app.suiteName = 'Data Migration';
assert.ok(await app.workbench.editors.waitForActiveTab(fileName), `dirty file tab is not present after migration.`);
await app.workbench.editor.waitForEditorContents(fileName, c => c.indexOf(textPart) > -1);
......@@ -101,7 +97,6 @@ export function setup(userDataDir: string, createApp: ICreateAppFn) {
}
await stableApp.start();
stableApp.suiteName = 'Data Migration';
const fileName1 = 'app.js', fileName2 = 'jsconfig.json', fileName3 = 'readme.md';
......@@ -119,7 +114,6 @@ export function setup(userDataDir: string, createApp: ICreateAppFn) {
}
await app.start(false);
app.suiteName = 'Data Migration';
assert.ok(await app.workbench.editors.waitForTab(fileName1), `${fileName1} tab was not restored after migration.`);
assert.ok(await app.workbench.editors.waitForTab(fileName2), `${fileName2} tab was not restored after migration.`);
......
......@@ -11,7 +11,6 @@ export function setup() {
describe('Localization', () => {
before(async function () {
const app = this.app as SpectronApplication;
this.app.suiteName = 'Localization';
if (app.quality === Quality.Dev) {
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册