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

chore: remove autoLaunch #703

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
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
5 changes: 1 addition & 4 deletions lib/desired-caps.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ let commonCapConstraints = {
recreateChromeDriverSessions: {
isBoolean: false
},
autoLaunch: {
isBoolean: true
},
nativeWebScreenshot: {
isBoolean: true
},
Expand Down Expand Up @@ -284,7 +281,7 @@ let uiautomatorCapConstraints = {
let desiredCapConstraints = {};

Object.assign(desiredCapConstraints, commonCapConstraints,
uiautomatorCapConstraints);
uiautomatorCapConstraints);

export default desiredCapConstraints;
export { commonCapConstraints };
6 changes: 0 additions & 6 deletions lib/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ class AndroidDriver extends BaseDriver {
disableAndroidWatchers: false,
tmpDir: await tempDir.staticDir(),
fullReset: false,
autoLaunch: true,
adbPort: DEFAULT_ADB_PORT,
bootstrapPort: DEVICE_PORT,
androidInstallTimeout: 90000,
Expand Down Expand Up @@ -284,11 +283,6 @@ class AndroidDriver extends BaseDriver {
if (this.isChromeSession) {
// start a chromedriver session and proxy to it
await this.startChromeSession();
} else {
if (this.opts.autoLaunch) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since autoLaunch defaults to true, we don't want to remove this block. We only want to remove behavior that would occur if this.opts.autoLaunch is not true.

// start app
await this.startAUT();
}
}

if (util.hasValue(this.opts.orientation)) {
Expand Down
4 changes: 1 addition & 3 deletions test/functional/commands/file-movement-e2e-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import path from 'path';
chai.should();
chai.use(chaiAsPromised);

let caps = _.defaults({
autoLaunch: false
}, DEFAULT_CAPS);
let caps = _.defaults(DEFAULT_CAPS);

describe('file movement', function () {
let driver;
Expand Down
1 change: 0 additions & 1 deletion test/functional/driver-e2e-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ describe('createSession', function () {
let caps = Object.assign({}, defaultCaps);
caps.appPackage = 'io.appium.android.apis';
caps.appActivity = '.view.SplitTouchView';
caps.autoLaunch = false;
await driver.createSession(caps);
let {appPackage, appActivity} = await getPackageAndActivity(driver);
expect(appPackage).to.not.equal(caps.appPackage);
Expand Down
10 changes: 0 additions & 10 deletions test/unit/driver-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,16 +409,6 @@ describe('driver', function () {
await driver.startAndroidSession();
helpers.unlock.calledOnce.should.be.true;
});
it('should start AUT if auto launching', async function () {
driver.opts.autoLaunch = true;
await driver.startAndroidSession();
driver.startAUT.calledOnce.should.be.true;
});
it('should not start AUT if not auto launching', async function () {
driver.opts.autoLaunch = false;
await driver.startAndroidSession();
driver.startAUT.calledOnce.should.be.false;
});
it('should set the context if autoWebview is requested', async function () {
driver.opts.autoWebview = true;
await driver.startAndroidSession();
Expand Down