mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 09:18:59 +00:00
smoke - remove doubleClick usage
This commit is contained in:
parent
fdc4b7101d
commit
fa739870a2
|
@ -238,11 +238,6 @@ export class Code {
|
|||
await poll(() => this.driver.click(windowId, selector, xoffset, yoffset), () => true, this.logger, `click '${selector}'`, retryCount);
|
||||
}
|
||||
|
||||
async waitAndDoubleClick(selector: string): Promise<void> {
|
||||
const windowId = await this.getActiveWindowId();
|
||||
await poll(() => this.driver.doubleClick(windowId, selector), () => true, this.logger, `double click '${selector}'`);
|
||||
}
|
||||
|
||||
async waitForSetValue(selector: string, value: string): Promise<void> {
|
||||
const windowId = await this.getActiveWindowId();
|
||||
await poll(() => this.driver.setValue(windowId, selector, value), () => true, this.logger, `set value '${selector}'`);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Viewlet } from './viewlet';
|
||||
import { Editors } from './editors';
|
||||
import { Code } from './code';
|
||||
|
||||
export class Explorer extends Viewlet {
|
||||
|
@ -12,7 +11,7 @@ export class Explorer extends Viewlet {
|
|||
private static readonly EXPLORER_VIEWLET = 'div[id="workbench.view.explorer"]';
|
||||
private static readonly OPEN_EDITORS_VIEW = `${Explorer.EXPLORER_VIEWLET} .split-view-view:nth-child(1) .title`;
|
||||
|
||||
constructor(code: Code, private editors: Editors) {
|
||||
constructor(code: Code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
|
@ -28,11 +27,6 @@ export class Explorer extends Viewlet {
|
|||
await this.code.waitForTextContent(Explorer.OPEN_EDITORS_VIEW, undefined, fn);
|
||||
}
|
||||
|
||||
async openFile(fileName: string): Promise<any> {
|
||||
await this.code.waitAndDoubleClick(`div[class="monaco-icon-label file-icon ${fileName}-name-file-icon ${this.getExtensionSelector(fileName)} explorer-item"]`);
|
||||
await this.editors.waitForEditorFocus(fileName);
|
||||
}
|
||||
|
||||
getExtensionSelector(fileName: string): string {
|
||||
const extension = fileName.split('.')[1];
|
||||
if (extension === 'js') {
|
||||
|
|
|
@ -137,10 +137,7 @@ class PlaywrightDriver implements IDriver {
|
|||
}
|
||||
|
||||
async doubleClick(windowId: number, selector: string) {
|
||||
await this.click(windowId, selector, 0, 0);
|
||||
await this.timeout(60);
|
||||
await this.click(windowId, selector, 0, 0);
|
||||
await this.timeout(100);
|
||||
throw new Error('Unsupported');
|
||||
}
|
||||
|
||||
async setValue(windowId: number, selector: string, text: string) {
|
||||
|
|
|
@ -50,7 +50,7 @@ export class Workbench {
|
|||
this.editors = new Editors(code);
|
||||
this.quickinput = new QuickInput(code);
|
||||
this.quickaccess = new QuickAccess(code, this.editors, this.quickinput);
|
||||
this.explorer = new Explorer(code, this.editors);
|
||||
this.explorer = new Explorer(code);
|
||||
this.activitybar = new ActivityBar(code);
|
||||
this.search = new Search(code);
|
||||
this.extensions = new Extensions(code);
|
||||
|
|
Loading…
Reference in a new issue