fix: use random test port
update references to `@appium/base-driver`
MODIFY
package.json
package.json
"start": "node ./packages/appium",
"test": "lerna exec gulp once",
"test:appium": "lerna exec --scope=appium gulp once",
+ "test:base-driver": "lerna exec --scope=@appium/base-driver gulp once",
"test:doctor": "lerna exec --scope=@appium/doctor gulp once",
"test:e2e:appium": "lerna exec --scope=appium gulp e2e-test",
+ "test:e2e:base-driver": "lerna exec --scope=@appium/base-driver gulp e2e-test",
"test:e2e:doctor": "lerna exec --scope=@appium/doctor gulp e2e-test",
"test:e2e:fake-driver": "lerna exec --scope=@appium/fake-driver gulp e2e-test",
"test:e2e:gulp-plugins": "lerna exec --scope=@appium/gulp-plugins gulp e2e-test",
"eslint-find-rules": "^3.6.1",
"fancy-log": "^1.3.2",
"finalhandler": "^1.1.1",
+ "get-port": "^5.1.1",
"gulp": "^4.0.0",
"handlebars": "^4.2.0",
"lerna": "^4.0.0",

MODIFY
packages/appium/package.json
packages/appium/package.json
"dependencies": {
"@appium/base-plugin": "^1.0.0",
"@babel/runtime": "^7.6.0",
- "appium-base-driver": "^8.0.0-beta.6",
+ "@appium/base-driver": "^8.0.0-beta.6",
"@appium/support": "2.x",
"argparse": "^2.0.1",
"async-lock": "^1.0.0",

MODIFY
packages/appium/test/helpers.js
packages/appium/test/helpers.js
import path from 'path';
import {insertAppiumPrefixes} from '../lib/utils';
import findUp from 'find-up';
+import getPort from 'get-port';
-const TEST_HOST = 'localhost';
-const TEST_PORT = 4723;
+const TEST_HOST = '0.0.0.0';
+const TEST_PORT = getPort.sync();
// monorepo root. this cannot be hardcoded because:
// 1. we may be in 'build/test' or 'test', depending on our config

MODIFY
packages/fake-driver/lib/commands/alert.js
packages/fake-driver/lib/commands/alert.js
-import { errors } from 'appium-base-driver';
+import { errors } from '@appium/base-driver';
let commands = {}, helpers = {}, extensions = {};

MODIFY
packages/fake-driver/lib/commands/contexts.js
packages/fake-driver/lib/commands/contexts.js
import _ from 'lodash';
-import { errors } from 'appium-base-driver';
+import { errors } from '@appium/base-driver';
let commands = {}, helpers = {}, extensions = {};

MODIFY
packages/fake-driver/lib/commands/element.js
packages/fake-driver/lib/commands/element.js
import _ from 'lodash';
-import { errors } from 'appium-base-driver';
+import { errors } from '@appium/base-driver';
let commands = {}, helpers = {}, extensions = {};

MODIFY
packages/fake-driver/lib/commands/find.js
packages/fake-driver/lib/commands/find.js
import _ from 'lodash';
-import { errors } from 'appium-base-driver';
+import { errors } from '@appium/base-driver';
import { FakeElement } from '../fake-element';
let commands = {}, helpers = {}, extensions = {};

MODIFY
packages/fake-driver/lib/commands/general.js
packages/fake-driver/lib/commands/general.js
import _ from 'lodash';
-import { errors } from 'appium-base-driver';
+import { errors } from '@appium/base-driver';
let commands = {}, helpers = {}, extensions = {};

MODIFY
packages/fake-driver/lib/driver.js
packages/fake-driver/lib/driver.js
import B from 'bluebird';
import _ from 'lodash';
-import { BaseDriver, errors } from 'appium-base-driver';
+import { BaseDriver, errors } from '@appium/base-driver';
import { FakeApp } from './fake-app';
import commands from './commands';

MODIFY
packages/fake-driver/lib/server.js
packages/fake-driver/lib/server.js
import log from './logger';
-import { server as baseServer, routeConfiguringFunction } from 'appium-base-driver';
+import { server as baseServer, routeConfiguringFunction } from '@appium/base-driver';
import { FakeDriver } from './driver';

MODIFY
packages/fake-driver/package.json
packages/fake-driver/package.json
"screen.png"
],
"dependencies": {
+ "@appium/base-driver": "^8.0.0-beta.6",
"@appium/support": "^2.11.1",
"@babel/runtime": "^7.0.0",
- "appium-base-driver": "^7.0.0",
"asyncbox": "^2.3.2",
"bluebird": "^3.5.1",
"lodash": "^4.17.4",

MODIFY
packages/fake-driver/test/driver-e2e-specs.js
packages/fake-driver/test/driver-e2e-specs.js
@@ -4,7 +4,7 @@ import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import wd from 'wd';
import axios from 'axios';
-import { baseDriverE2ETests } from 'appium-base-driver/build/test/basedriver';
+import { baseDriverE2ETests } from '@appium/base-driver/build/test/basedriver';
import { FakeDriver, startServer } from '..';
import { DEFAULT_CAPS, TEST_HOST, TEST_PORT } from './helpers';
import contextTests from './context-tests';

MODIFY
packages/fake-driver/test/driver-specs.js
packages/fake-driver/test/driver-specs.js
@@ -5,7 +5,7 @@ import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import { FakeDriver } from '..';
import { DEFAULT_CAPS } from './helpers';
-import { baseDriverUnitTests } from 'appium-base-driver/build/test/basedriver';
+import { baseDriverUnitTests } from '@appium/base-driver/build/test/basedriver';
chai.use(chaiAsPromised);

fix: use random test port

- update references to `@appium/base-driver`