Pass extensions-dir as VS Code arg, instead of Chrome Driver one.

This commit is contained in:
Michel Kaporin 2017-06-07 17:11:35 +02:00
parent 1f1e1ec7c9
commit fcf8b2942d

View file

@ -24,8 +24,13 @@ export function testDataMigration() {
return await common.removeDirectory(EXTENSIONS_DIR);
});
function setupSpectron(context: Mocha.ITestCallbackContext, appPath: string, workspace?: string[]): void {
app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), workspace, [`--user-data-dir=${USER_DIR}`, `--extensions-dir=${EXTENSIONS_DIR}`]);
function setupSpectron(context: Mocha.ITestCallbackContext, appPath: string, args?: string[]): void {
if (!args) {
args = [];
}
args.push(`--extensions-dir=${EXTENSIONS_DIR}`);
app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), args, [`--user-data-dir=${USER_DIR}`]);
common = new CommonActions(app);
}