提交 d8540e33 编写于 作者: S Sandeep Somavarapu

expose spectron client in application

上级 8eb731e3
......@@ -31,7 +31,7 @@ export class SCM {
async waitForChange(func: (change: Change) => boolean): Promise<Change> {
return await this.spectron.client.waitFor(async () => {
const changes = await this.spectron.client.spectron.client.selectorExecute(SCM_RESOURCE,
const changes = await this.spectron.webclient.selectorExecute(SCM_RESOURCE,
div => (Array.isArray(div) ? div : [div]).map(div => {
const name = div.querySelector('.label-name') as HTMLElement;
const icon = div.querySelector('.decoration-icon') as HTMLElement;
......
......@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Application } from 'spectron';
import { Application, SpectronClient as WebClient } from 'spectron';
import { SpectronClient } from './client';
import { NullScreenshot, IScreenshot, Screenshot } from '../helpers/screenshot';
import { Workbench } from '../areas/workbench/workbench';
......@@ -23,6 +23,7 @@ export const EXTENSIONS_DIR = path.join(__dirname, 'test_data/temp_extensions_di
export class SpectronApplication {
public readonly client: SpectronClient;
public readonly webclient: WebClient;
public readonly workbench: Workbench;
private spectron: Application;
......@@ -74,6 +75,7 @@ export class SpectronApplication {
this.testRetry += 1; // avoid multiplication by 0 for wait times
this.screenshot = args.indexOf('--no-screenshot') === -1 ? new NullScreenshot() : new Screenshot(this, testName, testRetry);
this.client = new SpectronClient(this.spectron, this.screenshot);
this.webclient = this.spectron.client;
this.retrieveKeybindings();
this.workbench = new Workbench(this);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册