mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-21 20:30:29 -04:00
Merge VS Code 1.21 source code (#1067)
* Initial VS Code 1.21 file copy with patches * A few more merges * Post npm install * Fix batch of build breaks * Fix more build breaks * Fix more build errors * Fix more build breaks * Runtime fixes 1 * Get connection dialog working with some todos * Fix a few packaging issues * Copy several node_modules to package build to fix loader issues * Fix breaks from master * A few more fixes * Make tests pass * First pass of license header updates * Second pass of license header updates * Fix restore dialog issues * Remove add additional themes menu items * fix select box issues where the list doesn't show up * formatting * Fix editor dispose issue * Copy over node modules to correct location on all platforms
This commit is contained in:
@@ -7,50 +7,52 @@ import * as assert from 'assert';
|
||||
import { SpectronApplication } from '../../spectron/application';
|
||||
import { ProblemSeverity, Problems } from '../problems/problems';
|
||||
|
||||
describe('CSS', () => {
|
||||
before(function () {
|
||||
this.app.suiteName = 'CSS';
|
||||
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');
|
||||
|
||||
await app.workbench.editor.openOutline();
|
||||
await app.workbench.quickopen.waitForQuickOpenElements(names => names.length === 2);
|
||||
});
|
||||
|
||||
it('verifies warnings for the empty rule', async function () {
|
||||
const app = this.app as SpectronApplication;
|
||||
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.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.workbench.problems.hideProblemsView();
|
||||
});
|
||||
|
||||
it('verifies that warning becomes an error once setting changed', async function () {
|
||||
const app = this.app as SpectronApplication;
|
||||
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'.`);
|
||||
|
||||
const problems = new Problems(app);
|
||||
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 problems.hideProblemsView();
|
||||
});
|
||||
});
|
||||
|
||||
it('verifies quick outline', async function () {
|
||||
const app = this.app as SpectronApplication;
|
||||
await app.workbench.quickopen.openFile('style.css');
|
||||
|
||||
await app.workbench.editor.openOutline();
|
||||
await app.workbench.quickopen.waitForQuickOpenElements(names => names.length === 2);
|
||||
});
|
||||
|
||||
it('verifies warnings for the empty rule', async function () {
|
||||
const app = this.app as SpectronApplication;
|
||||
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.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.workbench.problems.hideProblemsView();
|
||||
});
|
||||
|
||||
it('verifies that warning becomes an error once setting changed', async function () {
|
||||
const app = this.app as SpectronApplication;
|
||||
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'.`);
|
||||
|
||||
const problems = new Problems(app);
|
||||
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 problems.hideProblemsView();
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user