smoke - simplify line number test (#141054)

This commit is contained in:
Benjamin Pasero 2022-02-01 10:08:15 +01:00
parent 769e8618c1
commit 12c5c57e46
No known key found for this signature in database
GPG Key ID: E6380CC4C8219E65

View File

@ -3,7 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { join } from 'path';
import { Application, ActivityBarPosition, Logger } from '../../../../automation';
import { installAllHandlers } from '../../utils';
@ -15,16 +14,17 @@ export function setup(logger: Logger) {
it('turns off editor line numbers and verifies the live change', async function () {
const app = this.app as Application;
await app.workbench.quickaccess.openFile(join(app.workspacePathOrFolder, 'app.js'));
await app.workbench.settingsEditor.openUserSettingsFile();
await app.code.waitForElements('.line-numbers', false, elements => !!elements.length);
await app.workbench.settingsEditor.addUserSetting('editor.lineNumbers', '"off"');
await app.workbench.settingsEditor.openUserSettingsFile();
await app.code.waitForElements('.line-numbers', false, result => !result || result.length === 0);
});
it('changes "workbench.action.toggleSidebarPosition" command key binding and verifies it', async function () {
const app = this.app as Application;
await app.workbench.activitybar.waitForActivityBar(ActivityBarPosition.LEFT);
await app.workbench.keybindingsEditor.updateKeybinding('workbench.action.toggleSidebarPosition', 'View: Toggle Side Bar Position', 'ctrl+u', 'Control+U');