Merge from vscode 1ec43773e37997841c5af42b33ddb180e9735bf2

This commit is contained in:
ADS Merger
2020-03-29 01:29:32 +00:00
parent 586ec50916
commit a64304602e
316 changed files with 6524 additions and 11687 deletions

View File

@@ -9,14 +9,14 @@ export function setup() {
describe('Editor', () => {
it('shows correct quick outline', async function () {
const app = this.app as Application;
await app.workbench.quickopen.openFile('www');
await app.workbench.quickaccess.openFile('www');
await app.workbench.quickopen.openQuickOutline();
await app.workbench.quickaccess.openQuickOutline();
await app.workbench.quickinput.waitForQuickInputElements(names => names.length >= 6);
});
// it('folds/unfolds the code correctly', async function () {
// await app.workbench.quickopen.openFile('www');
// await app.workbench.quickaccess.openFile('www');
// // Fold
// await app.workbench.editor.foldAtLine(3);

View File

@@ -24,7 +24,7 @@ export function setup() {
if (app.remote) {
await app.reload();
}
await app.workbench.quickopen.runCommand('Smoke Test Check');
await app.workbench.quickaccess.runCommand('Smoke Test Check');
await app.workbench.statusbar.waitForStatusbarText('smoke test', 'VS Code Smoke Test Check');
});
});

View File

@@ -9,15 +9,15 @@ export function setup() {
describe('Language Features', () => {
it('verifies quick outline', async function () {
const app = this.app as Application;
await app.workbench.quickopen.openFile('style.css');
await app.workbench.quickaccess.openFile('style.css');
await app.workbench.quickopen.openQuickOutline();
await app.workbench.quickaccess.openQuickOutline();
await app.workbench.quickinput.waitForQuickInputElements(names => names.length === 2);
});
it('verifies problems view', async function () {
const app = this.app as Application;
await app.workbench.quickopen.openFile('style.css');
await app.workbench.quickaccess.openFile('style.css');
await app.workbench.editor.waitForTypeInEditor('style.css', '.foo{}');
await app.code.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.WARNING));
@@ -30,7 +30,7 @@ export function setup() {
it('verifies settings', async function () {
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.quickaccess.openFile('style.css');
await app.code.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.ERROR));

View File

@@ -45,7 +45,7 @@ export function setup() {
it('shows results from all folders', async function () {
const app = this.app as Application;
await app.workbench.quickopen.openQuickOpen('*.*');
await app.workbench.quickaccess.openQuickAccess('*.*');
await app.workbench.quickinput.waitForQuickInputElements(names => names.length === 6);
await app.workbench.quickinput.closeQuickInput();

View File

@@ -10,7 +10,7 @@ export function setup() {
it('turns off editor line numbers and verifies the live change', async function () {
const app = this.app as Application;
await app.workbench.quickopen.openFile('app.js');
await app.workbench.quickaccess.openFile('app.js');
await app.code.waitForElements('.line-numbers', false, elements => !!elements.length);
await app.workbench.settingsEditor.addUserSetting('editor.lineNumbers', '"off"');
@@ -31,6 +31,9 @@ export function setup() {
after(async function () {
const app = this.app as Application;
await app.workbench.settingsEditor.clearUserSettings();
// Wait for settings to be applied, which will happen after the settings file is empty
await app.workbench.activitybar.waitForActivityBar(ActivityBarPosition.LEFT);
});
});
}

View File

@@ -57,8 +57,8 @@ export function setup() {
});
});
describe('Quick Open', () => {
it('quick open search produces correct result', async function () {
describe('Quick Access', () => {
it('quick access search produces correct result', async function () {
const app = this.app as Application;
const expectedNames = [
'.eslintrc.json',
@@ -70,12 +70,12 @@ export function setup() {
'jsconfig.json'
];
await app.workbench.quickopen.openQuickOpen('.js');
await app.workbench.quickaccess.openQuickAccess('.js');
await app.workbench.quickinput.waitForQuickInputElements(names => expectedNames.every(n => names.some(m => n === m)));
await app.code.dispatchKeybinding('escape');
});
it('quick open respects fuzzy matching', async function () {
it('quick access respects fuzzy matching', async function () {
const app = this.app as Application;
const expectedNames = [
'tasks.json',
@@ -83,7 +83,7 @@ export function setup() {
'package.json'
];
await app.workbench.quickopen.openQuickOpen('a.s');
await app.workbench.quickaccess.openQuickAccess('a.s');
await app.workbench.quickinput.waitForQuickInputElements(names => expectedNames.every(n => names.some(m => n === m)));
await app.code.dispatchKeybinding('escape');
});

View File

@@ -17,7 +17,7 @@ export function setup(isWeb) {
await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.SYNC_STATUS);
await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.PROBLEMS_STATUS);
await app.workbench.quickopen.openFile('app.js');
await app.workbench.quickaccess.openFile('app.js');
if (!isWeb) {
// Encoding picker currently hidden in web (only UTF-8 supported)
await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.ENCODING_STATUS);
@@ -28,14 +28,14 @@ export function setup(isWeb) {
await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.SELECTION_STATUS);
});
it(`verifies that 'quick open' opens when clicking on status bar elements`, async function () {
it(`verifies that 'quick input' opens when clicking on status bar elements`, async function () {
const app = this.app as Application;
await app.workbench.statusbar.clickOn(StatusBarElement.BRANCH_STATUS);
await app.workbench.quickinput.waitForQuickInputOpened();
await app.workbench.quickinput.closeQuickInput();
await app.workbench.quickopen.openFile('app.js');
await app.workbench.quickaccess.openFile('app.js');
await app.workbench.statusbar.clickOn(StatusBarElement.INDENTATION_STATUS);
await app.workbench.quickinput.waitForQuickInputOpened();
await app.workbench.quickinput.closeQuickInput();
@@ -74,7 +74,7 @@ export function setup(isWeb) {
it(`checks if 'Go to Line' works if called from the status bar`, async function () {
const app = this.app as Application;
await app.workbench.quickopen.openFile('app.js');
await app.workbench.quickaccess.openFile('app.js');
await app.workbench.statusbar.clickOn(StatusBarElement.SELECTION_STATUS);
await app.workbench.quickinput.waitForQuickInputOpened();
@@ -86,7 +86,7 @@ export function setup(isWeb) {
it(`verifies if changing EOL is reflected in the status bar`, async function () {
const app = this.app as Application;
await app.workbench.quickopen.openFile('app.js');
await app.workbench.quickaccess.openFile('app.js');
await app.workbench.statusbar.clickOn(StatusBarElement.EOL_STATUS);
await app.workbench.quickinput.waitForQuickInputOpened();

View File

@@ -17,7 +17,7 @@ export function setup() {
const readmeMd = 'readme.md';
const textToType = 'Hello, Code';
await app.workbench.quickopen.openFile(readmeMd);
await app.workbench.quickaccess.openFile(readmeMd);
await app.workbench.editor.waitForTypeInEditor(readmeMd, textToType);
await app.reload();

View File

@@ -24,11 +24,11 @@ export function setup(stableCodePath: string, testDataPath: string) {
await stableApp!.start();
// Open 3 editors and pin 2 of them
await stableApp.workbench.quickopen.openFile('www');
await stableApp.workbench.quickopen.runCommand('View: Keep Editor');
await stableApp.workbench.quickaccess.openFile('www');
await stableApp.workbench.quickaccess.runCommand('View: Keep Editor');
await stableApp.workbench.quickopen.openFile('app.js');
await stableApp.workbench.quickopen.runCommand('View: Keep Editor');
await stableApp.workbench.quickaccess.openFile('app.js');
await stableApp.workbench.quickaccess.runCommand('View: Keep Editor');
await stableApp.workbench.editors.newUntitledFile();
@@ -70,7 +70,7 @@ export function setup(stableCodePath: string, testDataPath: string) {
const readmeMd = 'readme.md';
const textToType = 'Hello, Code';
await stableApp.workbench.quickopen.openFile(readmeMd);
await stableApp.workbench.quickaccess.openFile(readmeMd);
await stableApp.workbench.editor.waitForTypeInEditor(readmeMd, textToType);
await stableApp.stop();

View File

@@ -36,8 +36,9 @@ export function setup() {
await app.workbench.scm.openSCMViewlet();
await app.workbench.scm.waitForTitle(title => /quellcodeverwaltung/i.test(title));
await app.workbench.debug.openDebugViewlet();
await app.workbench.debug.waitForTitle(title => /starten/i.test(title));
// See https://github.com/microsoft/vscode/issues/93462
// await app.workbench.debug.openDebugViewlet();
// await app.workbench.debug.waitForTitle(title => /starten/i.test(title));
await app.workbench.extensions.openExtensionsViewlet();
await app.workbench.extensions.waitForTitle(title => /extensions/i.test(title));

View File

@@ -284,11 +284,11 @@ describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
const setupTestCommand = 'Test: Setup Integration Test';
const waitForExtensionsCommand = 'Test: Wait For Extensions To Load';
await app.workbench.statusbar.waitForStatusbarText(testExtLoadedText, testExtLoadedText);
await app.workbench.quickopen.runCommand(setupTestCommand);
await app.workbench.quickaccess.runCommand(setupTestCommand);
await app.workbench.statusbar.waitForStatusbarText(testSetupCompletedText, testSetupCompletedText);
await app!.reload();
await app.workbench.statusbar.waitForStatusbarText(testExtLoadedText, testExtLoadedText);
await app.workbench.quickopen.runCommand(waitForExtensionsCommand);
await app.workbench.quickaccess.runCommand(waitForExtensionsCommand);
await app.workbench.statusbar.waitForStatusbarText(allExtensionsLoadedText, allExtensionsLoadedText);
//{{END}}
});

View File

@@ -16,7 +16,7 @@ export function setup() {
await fs.writeFile(testFilePath, '');
try {
const app = this.app as Application;
await app.workbench.quickopen.openFile(testFilePath);
await app.workbench.quickaccess.openFile(testFilePath);
const fileBaseName = path.basename(testFilePath);
await app.workbench.editor.waitForTypeInEditor(fileBaseName, 'SELECT * FROM sys.tables');
}