Merge VS Code 1.23.1 (#1520)

This commit is contained in:
Matt Irvine
2018-06-05 11:24:51 -07:00
committed by GitHub
parent e3baf5c443
commit 0c58f09e59
3651 changed files with 74249 additions and 48599 deletions

View File

@@ -3,55 +3,44 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { SpectronApplication } from '../../spectron/application';
import { Application } from '../../application';
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;
const app = this.app as Application;
await app.workbench.quickopen.openFile('style.css');
await app.workbench.editor.openOutline();
await app.workbench.quickopen.openQuickOutline();
await app.workbench.quickopen.waitForQuickOpenElements(names => names.length === 2);
});
it('verifies warnings for the empty rule', async function () {
const app = this.app as SpectronApplication;
const app = this.app as Application;
await app.workbench.quickopen.openFile('style.css');
await app.workbench.editor.waitForTypeInEditor('style.css', '.foo{}');
let warning = await app.client.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.WARNING));
await app.screenCapturer.capture('CSS Warning in editor');
assert.ok(warning, `Warning squiggle is not shown in 'style.css'.`);
await app.code.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.WARNING));
await app.workbench.problems.showProblemsView();
warning = await app.client.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.WARNING));
await app.screenCapturer.capture('CSS Warning in problems view');
assert.ok(warning, 'Warning does not appear in Problems view.');
await app.code.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.WARNING));
await app.workbench.problems.hideProblemsView();
});
it('verifies that warning becomes an error once setting changed', async function () {
const app = this.app as SpectronApplication;
// settings might take a while to update?
this.timeout(40000);
const app = this.app as Application;
await app.workbench.settingsEditor.addUserSetting('css.lint.emptyRules', '"error"');
await app.workbench.quickopen.openFile('style.css');
await app.workbench.editor.waitForTypeInEditor('style.css', '.foo{}');
let error = await app.client.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.ERROR));
await app.screenCapturer.capture('CSS Error in editor');
assert.ok(error, `Warning squiggle is not shown in 'style.css'.`);
await app.code.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.ERROR));
const problems = new Problems(app);
const problems = new Problems(app.code, app.workbench);
await problems.showProblemsView();
error = await app.client.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.ERROR));
await app.screenCapturer.capture('CSS Error in probles view');
assert.ok(error, 'Warning does not appear in Problems view.');
await app.code.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.ERROR));
await problems.hideProblemsView();
});
});