Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes broken AndroidDriver explicit exportGlobals flow #545

Merged
merged 1 commit into from
Jan 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions detox/src/devices/AndroidDriver.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const {spawn} = require('child_process');
const path = require('path');
const fs = require('fs');
const _ = require('lodash');
const log = require('npmlog');
Expand All @@ -15,16 +14,19 @@ const EspressoDetox = 'com.wix.detox.espresso.EspressoDetox';
class AndroidDriver extends DeviceDriverBase {
constructor(client) {
super(client);
const expect = require('../android/expect');
expect.exportGlobals();
this.expect = require('../android/expect');
this.invocationManager = new InvocationManager(client);
expect.setInvocationManager(this.invocationManager);
this.expect.setInvocationManager(this.invocationManager);

this.adb = new ADB();
this.aapt = new AAPT();
this.apkPath = new APKPath();
}

exportGlobals() {
this.expect.exportGlobals();
}

async getBundleIdFromBinary(apkPath) {
return await this.aapt.getPackageName(apkPath);
}
Expand Down