appium-safari-driver 3.1.3 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.azure-pipelines.yml +31 -8
- package/.github/workflows/publish.js.yml +15 -8
- package/README.md +21 -24
- package/build/index.js +1 -29
- package/build/lib/commands/find.js +2 -2
- package/build/lib/commands/record-screen.js +2 -2
- package/build/lib/driver.js +3 -3
- package/build/lib/logger.js +2 -2
- package/build/lib/safari.js +5 -5
- package/build/lib/utils.js +1 -1
- package/build/test/functional/desktop-driver-e2e-specs.js +3 -14
- package/build/test/functional/mobile-driver-e2e-specs.js +2 -12
- package/build/test/unit/driver-specs.js +1 -1
- package/build/test/unit/utils-specs.js +1 -1
- package/build/test/utils.js +3 -3
- package/index.js +1 -20
- package/lib/commands/find.js +1 -1
- package/lib/commands/record-screen.js +1 -1
- package/lib/driver.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/safari.js +2 -2
- package/npm-shrinkwrap.json +6010 -724
- package/package.json +4 -3
- package/test/functional/desktop-driver-e2e-specs.js +1 -11
- package/test/functional/mobile-driver-e2e-specs.js +1 -10
- package/test/utils.js +2 -2
- package/build/lib/server.js +0 -36
- package/lib/server.js +0 -15
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"appium",
|
|
6
6
|
"safari"
|
|
7
7
|
],
|
|
8
|
-
"version": "3.
|
|
8
|
+
"version": "3.2.2",
|
|
9
9
|
"author": "appium",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"repository": {
|
|
@@ -33,8 +33,6 @@
|
|
|
33
33
|
"lib": "lib"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@appium/base-driver": "^8.3.0",
|
|
37
|
-
"@appium/support": "^2.46.0",
|
|
38
36
|
"@babel/runtime": "^7.0.0",
|
|
39
37
|
"asyncbox": "^2.0.2",
|
|
40
38
|
"bluebird": "^3.5.1",
|
|
@@ -62,6 +60,9 @@
|
|
|
62
60
|
"precommit-msg",
|
|
63
61
|
"precommit-test"
|
|
64
62
|
],
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"appium": "^2.0.0-beta.40"
|
|
65
|
+
},
|
|
65
66
|
"devDependencies": {
|
|
66
67
|
"@appium/gulp-plugins": "^7.0.0",
|
|
67
68
|
"@appium/eslint-config-appium": "^6.0.0",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { remote } from 'webdriverio';
|
|
2
|
-
import { startServer } from '../..';
|
|
3
2
|
import chaiAsPromised from 'chai-as-promised';
|
|
4
3
|
import chai from 'chai';
|
|
5
4
|
import { HOST, PORT, MOCHA_TIMEOUT } from '../utils';
|
|
@@ -11,22 +10,13 @@ chai.use(chaiAsPromised);
|
|
|
11
10
|
const CAPS = {
|
|
12
11
|
browserName: 'AppiumSafari',
|
|
13
12
|
platformName: 'mac',
|
|
13
|
+
'appium:automationName': 'safari',
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
describe('Desktop SafariDriver', function () {
|
|
17
17
|
this.timeout(MOCHA_TIMEOUT);
|
|
18
18
|
|
|
19
|
-
let server;
|
|
20
19
|
let driver;
|
|
21
|
-
before(async function () {
|
|
22
|
-
server = await startServer(PORT, HOST);
|
|
23
|
-
});
|
|
24
|
-
after(async function () {
|
|
25
|
-
if (server) {
|
|
26
|
-
await server.close();
|
|
27
|
-
server = null;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
20
|
beforeEach(async function () {
|
|
31
21
|
driver = await remote({
|
|
32
22
|
hostname: HOST,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { remote } from 'webdriverio';
|
|
2
|
-
import { startServer } from '../..';
|
|
3
2
|
import chaiAsPromised from 'chai-as-promised';
|
|
4
3
|
import chai from 'chai';
|
|
5
4
|
import Simctl from 'node-simctl';
|
|
@@ -13,6 +12,7 @@ const DEVICE_NAME = process.env.DEVICE_NAME || 'iPhone 11 Pro Max';
|
|
|
13
12
|
const CAPS = {
|
|
14
13
|
browserName: 'AppiumSafari',
|
|
15
14
|
platformName: 'ios',
|
|
15
|
+
'appium:automationName': 'safari',
|
|
16
16
|
'safari:useSimulator': true,
|
|
17
17
|
'safari:platformVersion': PLATFORM_VERSION,
|
|
18
18
|
'safari:deviceName': DEVICE_NAME,
|
|
@@ -21,7 +21,6 @@ const CAPS = {
|
|
|
21
21
|
describe('Mobile SafariDriver', function () {
|
|
22
22
|
this.timeout(MOCHA_TIMEOUT);
|
|
23
23
|
|
|
24
|
-
let server;
|
|
25
24
|
let driver;
|
|
26
25
|
before(async function () {
|
|
27
26
|
if (process.env.CI) {
|
|
@@ -43,14 +42,6 @@ describe('Mobile SafariDriver', function () {
|
|
|
43
42
|
await simctl.bootDevice();
|
|
44
43
|
await simctl.startBootMonitor();
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
server = await startServer(PORT, HOST);
|
|
48
|
-
});
|
|
49
|
-
after(async function () {
|
|
50
|
-
if (server) {
|
|
51
|
-
await server.close();
|
|
52
|
-
server = null;
|
|
53
|
-
}
|
|
54
45
|
});
|
|
55
46
|
beforeEach(async function () {
|
|
56
47
|
driver = await remote({
|
package/test/utils.js
CHANGED
package/build/lib/server.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.startServer = startServer;
|
|
9
|
-
|
|
10
|
-
require("source-map-support/register");
|
|
11
|
-
|
|
12
|
-
var _logger = _interopRequireDefault(require("./logger"));
|
|
13
|
-
|
|
14
|
-
var _baseDriver = require("@appium/base-driver");
|
|
15
|
-
|
|
16
|
-
var _driver = _interopRequireDefault(require("./driver"));
|
|
17
|
-
|
|
18
|
-
async function startServer(port, address) {
|
|
19
|
-
let d = new _driver.default({
|
|
20
|
-
port,
|
|
21
|
-
address
|
|
22
|
-
});
|
|
23
|
-
let routeConfiguringFunction = (0, _baseDriver.routeConfiguringFunction)(d);
|
|
24
|
-
let server = await (0, _baseDriver.server)({
|
|
25
|
-
routeConfiguringFunction,
|
|
26
|
-
port,
|
|
27
|
-
hostname: address
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
_logger.default.info(`SafariDriver server listening on http://${address}:${port}`);
|
|
31
|
-
|
|
32
|
-
return server;
|
|
33
|
-
}require('source-map-support').install();
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGliL3NlcnZlci5qcyIsIm5hbWVzIjpbInN0YXJ0U2VydmVyIiwicG9ydCIsImFkZHJlc3MiLCJkIiwiU2FmYXJpRHJpdmVyIiwicm91dGVDb25maWd1cmluZ0Z1bmN0aW9uIiwic2VydmVyIiwiaG9zdG5hbWUiLCJsb2ciLCJpbmZvIl0sInNvdXJjZVJvb3QiOiIuLi8uLiIsInNvdXJjZXMiOlsibGliL3NlcnZlci5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgbG9nIGZyb20gJy4vbG9nZ2VyJztcbmltcG9ydCB7XG4gIHNlcnZlciBhcyBiYXNlU2VydmVyLCByb3V0ZUNvbmZpZ3VyaW5nRnVuY3Rpb24gYXMgbWFrZVJvdXRlclxufSBmcm9tICdAYXBwaXVtL2Jhc2UtZHJpdmVyJztcbmltcG9ydCBTYWZhcmlEcml2ZXIgZnJvbSAnLi9kcml2ZXInO1xuXG5hc3luYyBmdW5jdGlvbiBzdGFydFNlcnZlciAocG9ydCwgYWRkcmVzcykge1xuICBsZXQgZCA9IG5ldyBTYWZhcmlEcml2ZXIoe3BvcnQsIGFkZHJlc3N9KTtcbiAgbGV0IHJvdXRlQ29uZmlndXJpbmdGdW5jdGlvbiA9IG1ha2VSb3V0ZXIoZCk7XG4gIGxldCBzZXJ2ZXIgPSBhd2FpdCBiYXNlU2VydmVyKHtyb3V0ZUNvbmZpZ3VyaW5nRnVuY3Rpb24sIHBvcnQsIGhvc3RuYW1lOiBhZGRyZXNzfSk7XG4gIGxvZy5pbmZvKGBTYWZhcmlEcml2ZXIgc2VydmVyIGxpc3RlbmluZyBvbiBodHRwOi8vJHthZGRyZXNzfToke3BvcnR9YCk7XG4gIHJldHVybiBzZXJ2ZXI7XG59XG5cbmV4cG9ydCB7IHN0YXJ0U2VydmVyIH07XG4iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUE7O0FBQ0E7O0FBR0E7O0FBRUEsZUFBZUEsV0FBZixDQUE0QkMsSUFBNUIsRUFBa0NDLE9BQWxDLEVBQTJDO0VBQ3pDLElBQUlDLENBQUMsR0FBRyxJQUFJQyxlQUFKLENBQWlCO0lBQUNILElBQUQ7SUFBT0M7RUFBUCxDQUFqQixDQUFSO0VBQ0EsSUFBSUcsd0JBQXdCLEdBQUcsMENBQVdGLENBQVgsQ0FBL0I7RUFDQSxJQUFJRyxNQUFNLEdBQUcsTUFBTSx3QkFBVztJQUFDRCx3QkFBRDtJQUEyQkosSUFBM0I7SUFBaUNNLFFBQVEsRUFBRUw7RUFBM0MsQ0FBWCxDQUFuQjs7RUFDQU0sZ0JBQUlDLElBQUosQ0FBVSwyQ0FBMENQLE9BQVEsSUFBR0QsSUFBSyxFQUFwRTs7RUFDQSxPQUFPSyxNQUFQO0FBQ0QifQ==
|
package/lib/server.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import log from './logger';
|
|
2
|
-
import {
|
|
3
|
-
server as baseServer, routeConfiguringFunction as makeRouter
|
|
4
|
-
} from '@appium/base-driver';
|
|
5
|
-
import SafariDriver from './driver';
|
|
6
|
-
|
|
7
|
-
async function startServer (port, address) {
|
|
8
|
-
let d = new SafariDriver({port, address});
|
|
9
|
-
let routeConfiguringFunction = makeRouter(d);
|
|
10
|
-
let server = await baseServer({routeConfiguringFunction, port, hostname: address});
|
|
11
|
-
log.info(`SafariDriver server listening on http://${address}:${port}`);
|
|
12
|
-
return server;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { startServer };
|