@axe-core/watcher 1.8.2 → 2.0.0-next.0f47d4bc
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/dist/Controller.js +71 -131
- package/dist/Controller.js.map +1 -1
- package/dist/cypress.d.ts +1 -5
- package/dist/cypress.js +9 -95
- package/dist/cypress.js.map +1 -1
- package/dist/cypressCommands.d.ts +6 -0
- package/dist/cypressCommands.js +112 -43
- package/dist/cypressCommands.js.map +1 -1
- package/dist/git.d.ts +2 -0
- package/dist/git.js +31 -22
- package/dist/git.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/playwright.d.ts +7 -3
- package/dist/playwright.js +17 -82
- package/dist/playwright.js.map +1 -1
- package/dist/playwrightTest.d.ts +16 -0
- package/dist/playwrightTest.js +74 -0
- package/dist/playwrightTest.js.map +1 -0
- package/dist/playwrightWrapping.d.ts +14 -0
- package/dist/playwrightWrapping.js +548 -0
- package/dist/playwrightWrapping.js.map +1 -0
- package/dist/puppeteer.d.ts +2 -2
- package/dist/puppeteer.js +17 -92
- package/dist/puppeteer.js.map +1 -1
- package/dist/puppeteerWrapping.d.ts +14 -0
- package/dist/puppeteerWrapping.js +426 -0
- package/dist/puppeteerWrapping.js.map +1 -0
- package/dist/util.d.ts +11 -0
- package/dist/util.js +62 -45
- package/dist/util.js.map +1 -1
- package/dist/validateApiKey.js +6 -7
- package/dist/validateApiKey.js.map +1 -1
- package/dist/wdio.d.ts +1 -1
- package/dist/wdio.js +44 -138
- package/dist/wdio.js.map +1 -1
- package/dist/webdriver.d.ts +2 -2
- package/dist/webdriver.js +24 -85
- package/dist/webdriver.js.map +1 -1
- package/dist/webdriverWrapping.d.ts +7 -0
- package/dist/webdriverWrapping.js +131 -0
- package/dist/webdriverWrapping.js.map +1 -0
- package/extension/background.js +1 -1
- package/extension/content.js +1 -1
- package/extension/manifest.json +2 -3
- package/package.json +6 -7
package/dist/util.js
CHANGED
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
3
|
if (k2 === undefined) k2 = k;
|
|
19
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -37,49 +22,55 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
37
22
|
__setModuleDefault(result, mod);
|
|
38
23
|
return result;
|
|
39
24
|
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
40
34
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
35
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
36
|
};
|
|
43
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
-
exports.writeManifest = exports.writeVariables = exports.HeadlessNotSupportedError = exports.extensionArgs = exports.PATH_TO_EXTENSION_VARIABLES = exports.PATH_TO_SESSION_FILE = exports.DEFAULT_SERVER_URL = exports.PATH_TO_EXTENSION = void 0;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
exports.wrappedCallWithSideEffects = exports.markAsWrapped = exports.isWrapped = exports.writeManifest = exports.writeVariables = exports.HeadlessNotSupportedError = exports.extensionArgs = exports.PATH_TO_EXTENSION_VARIABLES = exports.PATH_TO_SESSION_FILE = exports.DEFAULT_SERVER_URL = exports.PATH_TO_EXTENSION = void 0;
|
|
39
|
+
const uuid_1 = require("uuid");
|
|
40
|
+
const fs_1 = __importDefault(require("fs"));
|
|
41
|
+
const path_1 = __importDefault(require("path"));
|
|
42
|
+
const os_1 = __importDefault(require("os"));
|
|
43
|
+
const git = __importStar(require("./git"));
|
|
44
|
+
const validateApiKey_1 = __importDefault(require("./validateApiKey"));
|
|
50
45
|
exports.PATH_TO_EXTENSION = path_1.default.join(__dirname, '..', 'extension');
|
|
51
46
|
exports.DEFAULT_SERVER_URL = 'https://axe.deque.com/';
|
|
52
47
|
exports.PATH_TO_SESSION_FILE = path_1.default.join(os_1.default.tmpdir(), 'axe-watcher-session.json');
|
|
53
48
|
exports.PATH_TO_EXTENSION_VARIABLES = path_1.default.join(exports.PATH_TO_EXTENSION, 'variables.json');
|
|
54
49
|
exports.extensionArgs = [
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
`--disable-extensions-except=${exports.PATH_TO_EXTENSION}`,
|
|
51
|
+
`--load-extension=${exports.PATH_TO_EXTENSION}`
|
|
57
52
|
];
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
_this.name = 'HeadlessNotSupportedError';
|
|
63
|
-
return _this;
|
|
53
|
+
class HeadlessNotSupportedError extends Error {
|
|
54
|
+
constructor() {
|
|
55
|
+
super('Cannot use extension while headless.');
|
|
56
|
+
this.name = 'HeadlessNotSupportedError';
|
|
64
57
|
}
|
|
65
|
-
|
|
66
|
-
}(Error));
|
|
58
|
+
}
|
|
67
59
|
exports.HeadlessNotSupportedError = HeadlessNotSupportedError;
|
|
68
60
|
/** Write the user's settings to the disk, so the extension can load them. */
|
|
69
|
-
function writeVariables(
|
|
70
|
-
var apiKey = _a.apiKey, serverURL = _a.serverURL, sessionId = _a.sessionId, autoAnalyze = _a.autoAnalyze, cypress = _a.cypress, takeScreenshots = _a.takeScreenshots, _b = _a.validateApiKey, shouldValidateApiKey = _b === void 0 ? true : _b;
|
|
61
|
+
function writeVariables({ apiKey, serverURL, sessionId, autoAnalyze, cypress, takeScreenshots, validateApiKey: shouldValidateApiKey = true }) {
|
|
71
62
|
if (!serverURL) {
|
|
72
63
|
serverURL = exports.DEFAULT_SERVER_URL;
|
|
73
64
|
}
|
|
74
|
-
|
|
65
|
+
let urlString;
|
|
75
66
|
try {
|
|
76
67
|
urlString = new URL(serverURL).toString();
|
|
77
68
|
}
|
|
78
69
|
catch (err) {
|
|
79
|
-
throw new Error(
|
|
70
|
+
throw new Error(`Error when converting serverURL to URL. Ensure it is formatted properly: ${err}`);
|
|
80
71
|
}
|
|
81
72
|
if (shouldValidateApiKey) {
|
|
82
|
-
(0, validateApiKey_1.default)({ apiKey
|
|
73
|
+
(0, validateApiKey_1.default)({ apiKey, serverURL: urlString });
|
|
83
74
|
}
|
|
84
75
|
if (typeof autoAnalyze === 'undefined') {
|
|
85
76
|
autoAnalyze = true;
|
|
@@ -88,17 +79,18 @@ function writeVariables(_a) {
|
|
|
88
79
|
// This enables multi-process/multi-browser test suites to all use the same session ID.
|
|
89
80
|
if (!sessionId && fs_1.default.existsSync(exports.PATH_TO_SESSION_FILE)) {
|
|
90
81
|
try {
|
|
91
|
-
|
|
82
|
+
const data = JSON.parse(fs_1.default.readFileSync(exports.PATH_TO_SESSION_FILE, 'utf8'));
|
|
92
83
|
sessionId = data.id;
|
|
93
84
|
}
|
|
94
85
|
catch (error) {
|
|
95
|
-
throw new Error(
|
|
86
|
+
throw new Error(`Unable to read session configuration: ${error}`);
|
|
96
87
|
}
|
|
97
88
|
}
|
|
98
|
-
|
|
89
|
+
const variables = {
|
|
99
90
|
api_key: apiKey,
|
|
100
91
|
server_url: urlString,
|
|
101
|
-
|
|
92
|
+
/* Ensure only one session ID is created per test run if `sessionId` is not provided */
|
|
93
|
+
session_id: sessionId || (0, uuid_1.v4)(),
|
|
102
94
|
take_screenshots: !!takeScreenshots,
|
|
103
95
|
auto_analyze: !!autoAnalyze,
|
|
104
96
|
cypress: !!cypress
|
|
@@ -106,8 +98,9 @@ function writeVariables(_a) {
|
|
|
106
98
|
// If the repository is a git repository, add git info to the variables.
|
|
107
99
|
if (git.isRepository()) {
|
|
108
100
|
variables.git_branch = git.getBranchName();
|
|
101
|
+
variables.git_tag = git.getTag();
|
|
109
102
|
variables.git_default_branch = git.getDefaultBranchName();
|
|
110
|
-
|
|
103
|
+
const info = git.getCommitInfo();
|
|
111
104
|
variables.git_commit_sha = info === null || info === void 0 ? void 0 : info.hash;
|
|
112
105
|
variables.git_commit_author = info === null || info === void 0 ? void 0 : info.author;
|
|
113
106
|
variables.git_commit_email = info === null || info === void 0 ? void 0 : info.email;
|
|
@@ -119,13 +112,37 @@ function writeVariables(_a) {
|
|
|
119
112
|
}
|
|
120
113
|
exports.writeVariables = writeVariables;
|
|
121
114
|
/** Update the extension manifest file. */
|
|
122
|
-
function writeManifest(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
var manifest = JSON.parse(fs_1.default.readFileSync(manifestPath, 'utf-8'));
|
|
115
|
+
function writeManifest({ all_frames, exclude_globs }) {
|
|
116
|
+
const manifestPath = path_1.default.join(exports.PATH_TO_EXTENSION, 'manifest.json');
|
|
117
|
+
const manifest = JSON.parse(fs_1.default.readFileSync(manifestPath, 'utf-8'));
|
|
126
118
|
manifest.content_scripts[0].all_frames = all_frames;
|
|
127
119
|
manifest.content_scripts[0].exclude_globs = exclude_globs;
|
|
128
120
|
fs_1.default.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));
|
|
129
121
|
}
|
|
130
122
|
exports.writeManifest = writeManifest;
|
|
123
|
+
const kWrapped = Symbol('axe watcher wrapped');
|
|
124
|
+
/** Is the given object wrapped? */
|
|
125
|
+
const isWrapped = (o) => {
|
|
126
|
+
if (!o) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
return o[kWrapped] === true;
|
|
130
|
+
};
|
|
131
|
+
exports.isWrapped = isWrapped;
|
|
132
|
+
/** Mark the given object as wrapped. */
|
|
133
|
+
const markAsWrapped = (o) => {
|
|
134
|
+
Object.defineProperty(o, kWrapped, {
|
|
135
|
+
configurable: false,
|
|
136
|
+
enumerable: false,
|
|
137
|
+
value: true
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
exports.markAsWrapped = markAsWrapped;
|
|
141
|
+
const wrappedCallWithSideEffects = (target, prop, controller) => (...args) => __awaiter(void 0, void 0, void 0, function* () {
|
|
142
|
+
// @ts-expect-error TypeScript is angry.
|
|
143
|
+
const result = yield target[prop](...args);
|
|
144
|
+
yield controller.analyze();
|
|
145
|
+
return result;
|
|
146
|
+
});
|
|
147
|
+
exports.wrappedCallWithSideEffects = wrappedCallWithSideEffects;
|
|
131
148
|
//# sourceMappingURL=util.js.map
|
package/dist/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,EAAE,QAAQ,EAAE;QACjC,YAAY,EAAE,KAAK;QACnB,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,IAAI;KACZ,CAAC,CAAA;AACJ,CAAC,CAAA;AANY,QAAA,aAAa,iBAMzB;AAEM,MAAM,0BAA0B,GACrC,CAAC,MAAe,EAAE,IAAY,EAAE,UAAsB,EAAE,EAAE,CAC1D,CAAO,GAAG,IAAe,EAAoB,EAAE;IAC7C,wCAAwC;IACxC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;IAC1C,MAAM,UAAU,CAAC,OAAO,EAAE,CAAA;IAC1B,OAAO,MAAM,CAAA;AACf,CAAC,CAAA,CAAA;AAPU,QAAA,0BAA0B,8BAOpC"}
|
package/dist/validateApiKey.js
CHANGED
|
@@ -3,21 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const sync_request_1 = __importDefault(require("sync-request"));
|
|
7
|
+
const assert_1 = __importDefault(require("assert"));
|
|
8
8
|
/** Validate the given `apiKey`. This method is blocking and should not be called unnecessarily. */
|
|
9
|
-
|
|
10
|
-
var apiKey = _a.apiKey, serverURL = _a.serverURL;
|
|
9
|
+
const validateApiKey = ({ apiKey, serverURL }) => {
|
|
11
10
|
(0, assert_1.default)(apiKey, 'API key is required');
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const url = new URL(`/api/api-keys/${apiKey}/validate/axe-devtools-watcher`, serverURL);
|
|
12
|
+
const res = (0, sync_request_1.default)('GET', url.toString(), {
|
|
14
13
|
maxRedirects: 2,
|
|
15
14
|
followRedirects: true,
|
|
16
15
|
maxRetries: 2,
|
|
17
16
|
retry: true,
|
|
18
17
|
retryDelay: 100
|
|
19
18
|
});
|
|
20
|
-
|
|
19
|
+
const body = JSON.parse(res.getBody('utf8'));
|
|
21
20
|
if (body.error) {
|
|
22
21
|
throw new Error(body.error);
|
|
23
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateApiKey.js","sourceRoot":"","sources":["../src/validateApiKey.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"validateApiKey.js","sourceRoot":"","sources":["../src/validateApiKey.ts"],"names":[],"mappings":";;;;;AAAA,gEAAkC;AAClC,oDAA2B;AAO3B,mGAAmG;AACnG,MAAM,cAAc,GAAG,CAAC,EAAE,MAAM,EAAE,SAAS,EAAU,EAAQ,EAAE;IAC7D,IAAA,gBAAM,EAAC,MAAM,EAAE,qBAAqB,CAAC,CAAA;IACrC,MAAM,GAAG,GAAG,IAAI,GAAG,CACjB,iBAAiB,MAAM,gCAAgC,EACvD,SAAS,CACV,CAAA;IACD,MAAM,GAAG,GAAG,IAAA,sBAAO,EAAC,KAAK,EAAE,GAAG,CAAC,QAAQ,EAAE,EAAE;QACzC,YAAY,EAAE,CAAC;QACf,eAAe,EAAE,IAAI;QACrB,UAAU,EAAE,CAAC;QACb,KAAK,EAAE,IAAI;QACX,UAAU,EAAE,GAAG;KAChB,CAAC,CAAA;IACF,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5C,IAAI,IAAI,CAAC,KAAK,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;KAC5B;AACH,CAAC,CAAA;AAED,kBAAe,cAAc,CAAA"}
|
package/dist/wdio.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Options } from '@wdio/types';
|
|
2
2
|
import type { Browser, BrowserCommandsType, ElementCommandsType, RemoteOptions } from 'webdriverio';
|
|
3
|
-
import { Configuration } from './util';
|
|
3
|
+
import { type Configuration } from './util';
|
|
4
4
|
import Controller from './Controller';
|
|
5
5
|
declare type Options = RemoteOptions & Configuration;
|
|
6
6
|
/**
|
package/dist/wdio.js
CHANGED
|
@@ -1,30 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -34,33 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
9
|
});
|
|
36
10
|
};
|
|
37
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
38
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
39
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
40
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
41
|
-
function step(op) {
|
|
42
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
43
|
-
while (_) try {
|
|
44
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
45
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
46
|
-
switch (op[0]) {
|
|
47
|
-
case 0: case 1: t = op; break;
|
|
48
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
49
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
50
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
51
|
-
default:
|
|
52
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
53
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
54
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
55
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
56
|
-
if (t[2]) _.ops.pop();
|
|
57
|
-
_.trys.pop(); continue;
|
|
58
|
-
}
|
|
59
|
-
op = body.call(thisArg, _);
|
|
60
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
61
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
11
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
65
12
|
var t = {};
|
|
66
13
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -77,11 +24,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
77
24
|
};
|
|
78
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
79
26
|
exports.wrapWdio = exports.WRAPPED_ELEMENT_METHODS = exports.WRAPPED_BROWSER_METHODS = exports.WdioController = exports.wdioTestRunner = exports.wdioConfig = void 0;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
var noop = function () {
|
|
27
|
+
const fs_1 = __importDefault(require("fs"));
|
|
28
|
+
const util_1 = require("./util");
|
|
29
|
+
const Controller_1 = __importDefault(require("./Controller"));
|
|
30
|
+
const noop = () => {
|
|
85
31
|
// Nothing.
|
|
86
32
|
};
|
|
87
33
|
/**
|
|
@@ -91,19 +37,16 @@ var noop = function () {
|
|
|
91
37
|
*/
|
|
92
38
|
function wdioConfig(_a) {
|
|
93
39
|
var _b;
|
|
94
|
-
var axe = _a
|
|
95
|
-
(0, util_1.writeVariables)(
|
|
96
|
-
// Ensure the session ID persists between browsers, as
|
|
97
|
-
// WDIO creates a new instance for each test.
|
|
98
|
-
sessionId: axe.sessionId || (0, uuid_1.v4)() }));
|
|
40
|
+
var { axe } = _a, options = __rest(_a, ["axe"]);
|
|
41
|
+
(0, util_1.writeVariables)(axe);
|
|
99
42
|
// Disable eslint. Wdio doesn't export this property even though they support it.
|
|
100
43
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
101
|
-
|
|
102
|
-
|
|
44
|
+
const chromeOpts = ((_b = options.capabilities) === null || _b === void 0 ? void 0 : _b['goog:chromeOptions']) || {};
|
|
45
|
+
const args = chromeOpts.args || [];
|
|
103
46
|
if (args.includes('--headless')) {
|
|
104
47
|
throw new util_1.HeadlessNotSupportedError();
|
|
105
48
|
}
|
|
106
|
-
return
|
|
49
|
+
return Object.assign(Object.assign({}, options), { capabilities: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.capabilities), { browserName: 'chrome', 'goog:chromeOptions': {
|
|
107
50
|
args: util_1.extensionArgs.concat(args)
|
|
108
51
|
} }) });
|
|
109
52
|
}
|
|
@@ -111,7 +54,7 @@ exports.wdioConfig = wdioConfig;
|
|
|
111
54
|
// Configuration.axe is not a namespace, therefore have to use ['axe'] instead of .axe
|
|
112
55
|
function wdioTestRunner(axe, config) {
|
|
113
56
|
(0, util_1.writeVariables)(axe);
|
|
114
|
-
|
|
57
|
+
const capabilities = config.capabilities || [
|
|
115
58
|
{
|
|
116
59
|
'goog:chromeOptions': {
|
|
117
60
|
args: []
|
|
@@ -119,35 +62,26 @@ function wdioTestRunner(axe, config) {
|
|
|
119
62
|
}
|
|
120
63
|
];
|
|
121
64
|
// has to be any because type is not exported
|
|
122
|
-
|
|
65
|
+
const firstCapability = capabilities[0];
|
|
123
66
|
firstCapability['goog:chromeOptions'] =
|
|
124
67
|
firstCapability['goog:chromeOptions'] || {};
|
|
125
|
-
|
|
68
|
+
const chromeOpts = firstCapability['goog:chromeOptions'];
|
|
126
69
|
chromeOpts.args = chromeOpts.args || [];
|
|
127
|
-
|
|
70
|
+
const args = chromeOpts.args;
|
|
128
71
|
if (args.includes('--headless')) {
|
|
129
72
|
throw new util_1.HeadlessNotSupportedError();
|
|
130
73
|
}
|
|
131
74
|
chromeOpts.args = util_1.extensionArgs.concat(args);
|
|
132
|
-
|
|
133
|
-
return
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
var params = [];
|
|
137
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
138
|
-
params[_i] = arguments[_i];
|
|
139
|
-
}
|
|
140
|
-
var sessionId = axe.sessionId || (0, uuid_1.v4)();
|
|
75
|
+
const { onPrepare = noop, onComplete = noop } = config;
|
|
76
|
+
return Object.assign(Object.assign({}, config), { capabilities,
|
|
77
|
+
onPrepare(...params) {
|
|
78
|
+
const sessionId = axe.sessionId;
|
|
141
79
|
fs_1.default.writeFileSync(util_1.PATH_TO_SESSION_FILE, JSON.stringify({ id: sessionId }));
|
|
142
80
|
// @ts-expect-error TS is angry about calling this ¯\_(ツ)_/¯
|
|
143
|
-
return onPrepare
|
|
144
|
-
},
|
|
81
|
+
return onPrepare(...params);
|
|
82
|
+
},
|
|
145
83
|
// Remove the file, preventing other sessions from reusing its ID.
|
|
146
|
-
onComplete
|
|
147
|
-
var params = [];
|
|
148
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
149
|
-
params[_i] = arguments[_i];
|
|
150
|
-
}
|
|
84
|
+
onComplete(...params) {
|
|
151
85
|
try {
|
|
152
86
|
fs_1.default.unlinkSync(util_1.PATH_TO_SESSION_FILE);
|
|
153
87
|
}
|
|
@@ -155,38 +89,27 @@ function wdioTestRunner(axe, config) {
|
|
|
155
89
|
// Oh well.
|
|
156
90
|
}
|
|
157
91
|
// @ts-expect-error TS is angry about calling this ¯\_(ツ)_/¯
|
|
158
|
-
return onComplete
|
|
92
|
+
return onComplete(...params);
|
|
159
93
|
} });
|
|
160
94
|
}
|
|
161
95
|
exports.wdioTestRunner = wdioTestRunner;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
_this.driver = driver;
|
|
167
|
-
return _this;
|
|
96
|
+
class WdioController extends Controller_1.default {
|
|
97
|
+
constructor(driver) {
|
|
98
|
+
super();
|
|
99
|
+
this.driver = driver;
|
|
168
100
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
case 0:
|
|
179
|
-
script = "\n const callback = arguments[arguments.length - 1];\n Promise.resolve(...arguments)\n .then(".concat(fn, ")\n .then(callback);\n ");
|
|
180
|
-
return [4 /*yield*/, this.driver.executeAsync(script, args)];
|
|
181
|
-
case 1:
|
|
182
|
-
_a.sent();
|
|
183
|
-
return [2 /*return*/];
|
|
184
|
-
}
|
|
185
|
-
});
|
|
101
|
+
executeScript(fn, ...args) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const script = `
|
|
104
|
+
const callback = arguments[arguments.length - 1];
|
|
105
|
+
Promise.resolve(...arguments)
|
|
106
|
+
.then(${fn})
|
|
107
|
+
.then(callback);
|
|
108
|
+
`;
|
|
109
|
+
yield this.driver.executeAsync(script, args);
|
|
186
110
|
});
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
}(Controller_1.default));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
190
113
|
exports.WdioController = WdioController;
|
|
191
114
|
/** Webdriver `browser` methods. */
|
|
192
115
|
exports.WRAPPED_BROWSER_METHODS = [
|
|
@@ -217,33 +140,16 @@ exports.WRAPPED_ELEMENT_METHODS = [
|
|
|
217
140
|
'waitUntil'
|
|
218
141
|
];
|
|
219
142
|
/** Wrap the given WDIO `browser` object, ensuring axe-core analysis is run after each command. */
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
var res;
|
|
228
|
-
return __generator(this, function (_a) {
|
|
229
|
-
switch (_a.label) {
|
|
230
|
-
case 0: return [4 /*yield*/, fn.apply(void 0, args)];
|
|
231
|
-
case 1:
|
|
232
|
-
res = _a.sent();
|
|
233
|
-
return [4 /*yield*/, controller.analyze({ __UserRequestedAnalyze: false })];
|
|
234
|
-
case 2:
|
|
235
|
-
_a.sent();
|
|
236
|
-
return [2 /*return*/, res];
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
});
|
|
240
|
-
};
|
|
241
|
-
for (var _i = 0, WRAPPED_BROWSER_METHODS_1 = exports.WRAPPED_BROWSER_METHODS; _i < WRAPPED_BROWSER_METHODS_1.length; _i++) {
|
|
242
|
-
var method = WRAPPED_BROWSER_METHODS_1[_i];
|
|
143
|
+
const wrapWdio = (browser, controller) => {
|
|
144
|
+
const wrapper = (fn, ...args) => __awaiter(void 0, void 0, void 0, function* () {
|
|
145
|
+
const res = yield fn(...args);
|
|
146
|
+
yield controller.analyze({ __UserRequestedAnalyze: false });
|
|
147
|
+
return res;
|
|
148
|
+
});
|
|
149
|
+
for (const method of exports.WRAPPED_BROWSER_METHODS) {
|
|
243
150
|
browser.overwriteCommand(method, wrapper);
|
|
244
151
|
}
|
|
245
|
-
for (
|
|
246
|
-
var method = WRAPPED_ELEMENT_METHODS_1[_a];
|
|
152
|
+
for (const method of exports.WRAPPED_ELEMENT_METHODS) {
|
|
247
153
|
browser.overwriteCommand(method, wrapper, true);
|
|
248
154
|
}
|
|
249
155
|
return browser;
|
package/dist/wdio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wdio.js","sourceRoot":"","sources":["../src/wdio.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wdio.js","sourceRoot":"","sources":["../src/wdio.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,4CAAmB;AACnB,iCAMe;AACf,8DAAqC;AAErC,MAAM,IAAI,GAAG,GAAS,EAAE;IACtB,WAAW;AACb,CAAC,CAAA;AAID;;;;GAIG;AAEH,SAAgB,UAAU,CAAC,EAA4B;;QAA5B,EAAE,GAAG,OAAuB,EAAlB,OAAO,cAAjB,OAAmB,CAAF;IAC1C,IAAA,qBAAc,EAAC,GAAG,CAAC,CAAA;IAEnB,iFAAiF;IACjF,uDAAuD;IACvD,MAAM,UAAU,GAAG,CAAA,MAAC,OAAO,CAAC,YAAoB,0CAAG,oBAAoB,CAAC,KAAI,EAAE,CAAA;IAC9E,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,IAAI,EAAE,CAAA;IAElC,IAAI,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE;QAC/B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E;QACpB,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;QAC7B,MAAM,UAAU,CAAC,OAAO,CAAC,EAAE,sBAAsB,EAAE,KAAK,EAAE,CAAC,CAAA;QAC3D,OAAO,GAAG,CAAA;IACZ,CAAC,CAAA,CAAA;IAED,KAAK,MAAM,MAAM,IAAI,+BAAuB,EAAE;QAC5C,OAAO,CAAC,gBAAgB,CAAC,MAAa,EAAE,OAAO,CAAC,CAAA;KACjD;IAED,KAAK,MAAM,MAAM,IAAI,+BAAuB,EAAE;QAC5C,OAAO,CAAC,gBAAgB,CAAC,MAAa,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;KACvD;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAtBY,QAAA,QAAQ,YAsBpB"}
|
package/dist/webdriver.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { WebDriver } from 'selenium-webdriver';
|
|
2
2
|
import type { Options } from 'selenium-webdriver/chrome';
|
|
3
|
-
import { Configuration } from './util';
|
|
3
|
+
import { type Configuration } from './util';
|
|
4
4
|
import Controller from './Controller';
|
|
5
|
+
export { wrapDriver as wrapWebdriver } from './webdriverWrapping';
|
|
5
6
|
interface WebDriverArgs extends Configuration {
|
|
6
7
|
options?: Options;
|
|
7
8
|
}
|
|
@@ -16,4 +17,3 @@ export declare class WebdriverController extends Controller {
|
|
|
16
17
|
constructor(driver: WebDriver);
|
|
17
18
|
protected executeScript(fn: string | (() => Promise<void>), ...args: unknown[]): Promise<void>;
|
|
18
19
|
}
|
|
19
|
-
export {};
|