mirror of
https://github.com/Microsoft/vscode
synced 2024-08-26 20:39:37 +00:00
parent
599f5d2c67
commit
3c4fdb58a1
|
@ -10,14 +10,14 @@ import { afterSuite, beforeSuite } from '../../utils';
|
|||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Editor', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite();
|
||||
afterSuite(opts);
|
||||
|
||||
it('shows correct quick outline', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.quickaccess.openFile('www');
|
||||
|
||||
await app.workbench.quickaccess.openQuickOutline();
|
||||
await app.workbench.quickinput.waitForQuickInputElements(names => names.length >= 6);
|
||||
await app.workbench.quickinput.waitForQuickInputElements(names => names.length >= 6000);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import { afterSuite, beforeSuite } from '../../utils';
|
|||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Extensions', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite();
|
||||
afterSuite(opts);
|
||||
|
||||
it(`install and enable vscode-smoketest-check extension`, async function () {
|
||||
const app = this.app as Application;
|
||||
|
|
|
@ -10,7 +10,7 @@ import { afterSuite, beforeSuite } from '../../utils';
|
|||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Language Features', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite();
|
||||
afterSuite(opts);
|
||||
|
||||
it('verifies quick outline', async function () {
|
||||
const app = this.app as Application;
|
||||
|
|
|
@ -43,7 +43,7 @@ export function setup(opts: minimist.ParsedArgs) {
|
|||
return { ...opts, workspacePath };
|
||||
});
|
||||
|
||||
afterSuite();
|
||||
afterSuite(opts);
|
||||
|
||||
it('shows results from all folders', async function () {
|
||||
const app = this.app as Application;
|
||||
|
|
|
@ -24,7 +24,7 @@ export function setup(opts: minimist.ParsedArgs) {
|
|||
cp.execSync('git reset --hard HEAD --quiet', { cwd: app.workspacePathOrFolder });
|
||||
});
|
||||
|
||||
afterSuite();
|
||||
afterSuite(opts);
|
||||
|
||||
it.skip('inserts/edits code cell', async function () {
|
||||
const app = this.app as Application;
|
||||
|
|
|
@ -10,7 +10,7 @@ import { afterSuite, beforeSuite } from '../../utils';
|
|||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Preferences', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite();
|
||||
afterSuite(opts);
|
||||
|
||||
it('turns off editor line numbers and verifies the live change', async function () {
|
||||
const app = this.app as Application;
|
||||
|
|
|
@ -19,7 +19,7 @@ export function setup(opts: minimist.ParsedArgs) {
|
|||
cp.execSync('git reset --hard HEAD --quiet', { cwd: app.workspacePathOrFolder });
|
||||
});
|
||||
|
||||
afterSuite();
|
||||
afterSuite(opts);
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/124146
|
||||
it.skip /* https://github.com/microsoft/vscode/issues/124335 */('has a tooltp with a keybinding', async function () {
|
||||
|
@ -75,7 +75,7 @@ export function setup(opts: minimist.ParsedArgs) {
|
|||
|
||||
describe('Quick Access', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite();
|
||||
afterSuite(opts);
|
||||
|
||||
it('quick access search produces correct result', async function () {
|
||||
const app = this.app as Application;
|
||||
|
|
|
@ -10,7 +10,7 @@ import { afterSuite, beforeSuite } from '../../utils';
|
|||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Statusbar', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite();
|
||||
afterSuite(opts);
|
||||
|
||||
it('verifies presence of all default status bar elements', async function () {
|
||||
const app = this.app as Application;
|
||||
|
|
|
@ -11,7 +11,7 @@ export function setup(opts: minimist.ParsedArgs) {
|
|||
|
||||
describe('Dataloss', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite();
|
||||
afterSuite(opts);
|
||||
|
||||
it(`verifies that 'hot exit' works for dirty files`, async function () {
|
||||
const app = this.app as Application;
|
||||
|
|
|
@ -10,7 +10,7 @@ import { afterSuite, beforeSuite } from '../../utils';
|
|||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Localization', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite();
|
||||
afterSuite(opts);
|
||||
|
||||
it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () {
|
||||
const app = this.app as Application;
|
||||
|
|
|
@ -13,15 +13,7 @@ import * as mkdirp from 'mkdirp';
|
|||
import { ncp } from 'ncp';
|
||||
import * as vscodetest from 'vscode-test';
|
||||
import fetch from 'node-fetch';
|
||||
import {
|
||||
Application,
|
||||
Quality,
|
||||
ApplicationOptions,
|
||||
MultiLogger,
|
||||
Logger,
|
||||
ConsoleLogger,
|
||||
FileLogger,
|
||||
} from '../../automation';
|
||||
import { Quality, ApplicationOptions, MultiLogger, Logger, ConsoleLogger, FileLogger } from '../../automation';
|
||||
|
||||
import { setup as setupDataMigrationTests } from './areas/workbench/data-migration.test';
|
||||
import { setup as setupDataLossTests } from './areas/workbench/data-loss.test';
|
||||
|
@ -335,28 +327,6 @@ after(async function () {
|
|||
await new Promise((c, e) => rimraf(testDataPath, { maxBusyTries: 10 }, err => err ? e(err) : c(undefined)));
|
||||
});
|
||||
|
||||
describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
|
||||
if (screenshotsPath) {
|
||||
afterEach(async function () {
|
||||
if (this.currentTest!.state !== 'failed') {
|
||||
return;
|
||||
}
|
||||
const app = this.app as Application;
|
||||
const name = this.currentTest!.fullTitle().replace(/[^a-z0-9\-]/ig, '_');
|
||||
|
||||
await app.captureScreenshot(name);
|
||||
});
|
||||
}
|
||||
|
||||
if (opts.log) {
|
||||
beforeEach(async function () {
|
||||
const app = this.app as Application;
|
||||
const title = this.currentTest!.fullTitle();
|
||||
|
||||
app.logger.log('*** Test start:', title);
|
||||
});
|
||||
}
|
||||
|
||||
if (!opts.web && opts['build'] && !opts['remote']) {
|
||||
describe(`Stable vs Insiders Smoke Tests: This test MUST run before releasing`, () => {
|
||||
setupDataMigrationTests(opts, testDataPath);
|
||||
|
@ -376,4 +346,3 @@ describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
|
|||
if (!opts.web) { setupDataLocalizationTests(opts); }
|
||||
if (!opts.web) { setupLaunchTests(); }
|
||||
});
|
||||
});
|
||||
|
|
|
@ -34,12 +34,23 @@ export function beforeSuite(opts: minimist.ParsedArgs, optionsTransform?: (opts:
|
|||
const app = new Application({ ...options, userDataDir });
|
||||
await app!.start(opts.web ? false : undefined);
|
||||
this.app = app;
|
||||
|
||||
if (opts.log) {
|
||||
const title = this.currentTest!.fullTitle();
|
||||
app.logger.log('*** Test start:', title);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function afterSuite() {
|
||||
export function afterSuite(opts: minimist.ParsedArgs) {
|
||||
after(async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
if (this.currentTest?.state === 'failed' && opts.screenshots) {
|
||||
const name = this.currentTest!.fullTitle().replace(/[^a-z0-9\-]/ig, '_');
|
||||
await app.captureScreenshot(name);
|
||||
}
|
||||
|
||||
if (app) {
|
||||
await app.stop();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue