Skip to content

Commit 3fe4ed9

Browse files
committed
extract driver
1 parent 5be3af2 commit 3fe4ed9

35 files changed

Lines changed: 174 additions & 168 deletions
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
import { Application, SpectronClient as WebClient } from 'spectron';
77
import { test as testPort } from 'portastic';
88
import { API } from './client';
9-
import { ScreenCapturer } from '../helpers/screenshot';
10-
import { Workbench } from '../areas/workbench/workbench';
9+
import { ScreenCapturer } from './helpers/screenshot';
10+
import { Workbench } from './areas/workbench/workbench';
1111
import * as fs from 'fs';
1212
import * as cp from 'child_process';
1313
import * as path from 'path';
1414
import * as mkdirp from 'mkdirp';
15-
import { sanitize } from '../helpers/utilities';
15+
import { sanitize } from './helpers/utilities';
16+
import { SpectronDriver } from './driver';
1617

1718
// Just hope random helps us here, cross your fingers!
1819
export async function findFreePort(): Promise<number> {
@@ -271,7 +272,9 @@ export class SpectronApplication {
271272
}
272273

273274
this._screenCapturer = new ScreenCapturer(this.spectron, this._suiteName, screenshotsDirPath);
274-
this._api = new API(this.spectron.client, this.screenCapturer, this.options.waitTime, this.options.verbose);
275+
276+
const driver = new SpectronDriver(this.spectron.client, this.options.verbose);
277+
this._api = new API(driver, this.screenCapturer, this.options.waitTime);
275278
this._workbench = new Workbench(this._api, this.keybindings, this.userDataPath);
276279
}
277280

test/smoke/src/areas/activitybar/activityBar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { API } from '../../spectron/client';
6+
import { API } from '../../client';
77

88
export enum ActivityBarPosition {
99
LEFT = 0,

test/smoke/src/areas/css/css.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { SpectronApplication } from '../../spectron/application';
6+
import { SpectronApplication } from '../../application';
77
import { ProblemSeverity, Problems } from '../problems/problems';
88

99
export function setup() {

test/smoke/src/areas/debug/debug.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as http from 'http';
88
import * as path from 'path';
99
import * as fs from 'fs';
1010
import * as stripJsonComments from 'strip-json-comments';
11-
import { SpectronApplication } from '../../spectron/application';
11+
import { SpectronApplication } from '../../application';
1212

1313
export function setup() {
1414
describe('Debug', () => {

test/smoke/src/areas/debug/debug.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { Viewlet } from '../workbench/viewlet';
77
import { Commands } from '../workbench/workbench';
8-
import { API } from '../../spectron/client';
8+
import { API } from '../../client';
99
import { Editors } from '../editor/editors';
1010
import { Editor } from '../editor/editor';
1111

test/smoke/src/areas/editor/editor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { SpectronApplication } from '../../spectron/application';
6+
import { SpectronApplication } from '../../application';
77

88
export function setup() {
99
describe('Editor', () => {

test/smoke/src/areas/editor/editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { References } from './peek';
77
import { Commands } from '../workbench/workbench';
8-
import { API } from '../../spectron/client';
8+
import { API } from '../../client';
99

1010
const RENAME_BOX = '.monaco-editor .monaco-editor.rename-box';
1111
const RENAME_INPUT = `${RENAME_BOX} .rename-input`;

test/smoke/src/areas/editor/editors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { API } from '../../spectron/client';
6+
import { API } from '../../client';
77
import { Commands } from '../workbench/workbench';
88

99
export class Editors {

test/smoke/src/areas/editor/peek.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { API } from '../../spectron/client';
6+
import { API } from '../../client';
77

88
export class References {
99

test/smoke/src/areas/explorer/explorer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { SpectronApplication } from '../../spectron/application';
6+
import { SpectronApplication } from '../../application';
77

88
export function setup() {
99
describe('Explorer', () => {

0 commit comments

Comments
 (0)