@axe-core/watcher 2.0.0-next.f699cb79 → 2.0.0-next.fd1cc39e

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/git.js CHANGED
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isDirty = exports.getCommitInfo = exports.getRemoteURL = exports.parseDefaultFromShowRemoteOutput = exports.getDefaultBranchName = exports.getBranchName = exports.isRepository = void 0;
4
- var child_process_1 = require("child_process");
4
+ const child_process_1 = require("child_process");
5
5
  /** Check if the given `dir` is contained by a Git repository. */
6
- var isRepository = function (dir) {
7
- if (dir === void 0) { dir = process.cwd(); }
6
+ const isRepository = (dir = process.cwd()) => {
8
7
  try {
9
8
  (0, child_process_1.execSync)('git rev-parse --is-inside-work-tree', {
10
9
  cwd: dir,
@@ -19,8 +18,7 @@ var isRepository = function (dir) {
19
18
  };
20
19
  exports.isRepository = isRepository;
21
20
  /** Get the current branch name. */
22
- var getBranchName = function (dir) {
23
- if (dir === void 0) { dir = process.cwd(); }
21
+ const getBranchName = (dir = process.cwd()) => {
24
22
  try {
25
23
  return (0, child_process_1.execSync)('git rev-parse --abbrev-ref HEAD', {
26
24
  cwd: dir,
@@ -36,10 +34,9 @@ var getBranchName = function (dir) {
36
34
  };
37
35
  exports.getBranchName = getBranchName;
38
36
  /** Get the default branch name. */
39
- var getDefaultBranchName = function (dir) {
40
- if (dir === void 0) { dir = process.cwd(); }
37
+ const getDefaultBranchName = (dir = process.cwd()) => {
41
38
  try {
42
- var stdout = (0, child_process_1.execSync)('git remote show origin', {
39
+ const stdout = (0, child_process_1.execSync)('git remote show origin', {
43
40
  cwd: dir,
44
41
  stdio: ['ignore', 'pipe', 'ignore']
45
42
  }).toString();
@@ -54,14 +51,13 @@ exports.getDefaultBranchName = getDefaultBranchName;
54
51
  * Parse the default branch name from the output of `git remote show origin`.
55
52
  * @private Exported only for testing.
56
53
  */
57
- var parseDefaultFromShowRemoteOutput = function (output) {
58
- var match = /HEAD branch:\s(.*)/.exec(output);
54
+ const parseDefaultFromShowRemoteOutput = (output) => {
55
+ const match = /HEAD branch:\s(.*)/.exec(output);
59
56
  return match ? match[1].trim() : null;
60
57
  };
61
58
  exports.parseDefaultFromShowRemoteOutput = parseDefaultFromShowRemoteOutput;
62
59
  /** Get the repository's remote URL. */
63
- var getRemoteURL = function (dir) {
64
- if (dir === void 0) { dir = process.cwd(); }
60
+ const getRemoteURL = (dir = process.cwd()) => {
65
61
  try {
66
62
  return (0, child_process_1.execSync)('git config --get remote.origin.url', {
67
63
  cwd: dir,
@@ -76,28 +72,26 @@ var getRemoteURL = function (dir) {
76
72
  };
77
73
  exports.getRemoteURL = getRemoteURL;
78
74
  /** Get info on the most recent commit. */
79
- var getCommitInfo = function (dir) {
80
- if (dir === void 0) { dir = process.cwd(); }
75
+ const getCommitInfo = (dir = process.cwd()) => {
81
76
  try {
82
77
  // %s=subject (message), %H=hash, %an=author name, %ae=author email, %n=newline
83
78
  // See https://git-scm.com/docs/git-show#_pretty_formats
84
- var stdout = (0, child_process_1.execSync)('git show --no-patch --format="%s%n%H%n%an%n%ae"', {
79
+ const stdout = (0, child_process_1.execSync)('git show --no-patch --format="%s%n%H%n%an%n%ae"', {
85
80
  cwd: dir,
86
81
  stdio: ['ignore', 'pipe', 'ignore']
87
82
  });
88
- var _a = stdout.toString().trim().split('\n'), message = _a[0], hash = _a[1], author = _a[2], email = _a[3];
89
- return { message: message, hash: hash, author: author, email: email };
83
+ const [message, hash, author, email] = stdout.toString().trim().split('\n');
84
+ return { message, hash, author, email };
90
85
  }
91
- catch (_b) {
86
+ catch (_a) {
92
87
  return null;
93
88
  }
94
89
  };
95
90
  exports.getCommitInfo = getCommitInfo;
96
91
  /** Check if the repository contains unstaged changes. */
97
- var isDirty = function (dir) {
98
- if (dir === void 0) { dir = process.cwd(); }
92
+ const isDirty = (dir = process.cwd()) => {
99
93
  try {
100
- var stdout = (0, child_process_1.execSync)('git status --short', {
94
+ const stdout = (0, child_process_1.execSync)('git status --short', {
101
95
  cwd: dir,
102
96
  stdio: ['ignore', 'pipe', 'ignore']
103
97
  });
package/dist/git.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"git.js","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,iEAAiE;AAC1D,IAAM,YAAY,GAAG,UAAC,GAAmB;IAAnB,oBAAA,EAAA,MAAM,OAAO,CAAC,GAAG,EAAE;IAC9C,IAAI;QACF,IAAA,wBAAQ,EAAC,qCAAqC,EAAE;YAC9C,GAAG,EAAE,GAAG;YACR,kDAAkD;YAClD,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;KACZ;IAAC,WAAM;QACN,OAAO,KAAK,CAAA;KACb;AACH,CAAC,CAAA;AAXY,QAAA,YAAY,gBAWxB;AAED,mCAAmC;AAC5B,IAAM,aAAa,GAAG,UAAC,GAAmB;IAAnB,oBAAA,EAAA,MAAM,OAAO,CAAC,GAAG,EAAE;IAC/C,IAAI;QACF,OAAO,IAAA,wBAAQ,EAAC,iCAAiC,EAAE;YACjD,GAAG,EAAE,GAAG;YACR,4EAA4E;YAC5E,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;SACpC,CAAC;aACC,QAAQ,EAAE;aACV,IAAI,EAAE,CAAA;KACV;IAAC,WAAM;QACN,OAAO,IAAI,CAAA;KACZ;AACH,CAAC,CAAA;AAZY,QAAA,aAAa,iBAYzB;AAED,mCAAmC;AAC5B,IAAM,oBAAoB,GAAG,UAAC,GAAmB;IAAnB,oBAAA,EAAA,MAAM,OAAO,CAAC,GAAG,EAAE;IACtD,IAAI;QACF,IAAM,MAAM,GAAG,IAAA,wBAAQ,EAAC,wBAAwB,EAAE;YAChD,GAAG,EAAE,GAAG;YACR,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAA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reserved */
2
- export { puppeteerConfig, PuppeteerController } from './puppeteer';
2
+ export { puppeteerConfig, PuppeteerController, wrapPuppeteer } from './puppeteer';
3
3
  export { wdioConfig, wdioTestRunner, WdioController, wrapWdio } from './wdio';
4
4
  export { webdriverConfig, WebdriverController } from './webdriver';
5
5
  export { playwrightConfig, PlaywrightController, wrapPlaywright } from './playwright';
package/dist/index.js CHANGED
@@ -4,10 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.cypressConfig = exports.playwrightTest = exports.wrapPlaywright = exports.PlaywrightController = exports.playwrightConfig = exports.WebdriverController = exports.webdriverConfig = exports.wrapWdio = exports.WdioController = exports.wdioTestRunner = exports.wdioConfig = exports.PuppeteerController = exports.puppeteerConfig = void 0;
7
+ exports.cypressConfig = exports.playwrightTest = exports.wrapPlaywright = exports.PlaywrightController = exports.playwrightConfig = exports.WebdriverController = exports.webdriverConfig = exports.wrapWdio = exports.WdioController = exports.wdioTestRunner = exports.wdioConfig = exports.wrapPuppeteer = exports.PuppeteerController = exports.puppeteerConfig = void 0;
8
8
  var puppeteer_1 = require("./puppeteer");
9
9
  Object.defineProperty(exports, "puppeteerConfig", { enumerable: true, get: function () { return puppeteer_1.puppeteerConfig; } });
10
10
  Object.defineProperty(exports, "PuppeteerController", { enumerable: true, get: function () { return puppeteer_1.PuppeteerController; } });
11
+ Object.defineProperty(exports, "wrapPuppeteer", { enumerable: true, get: function () { return puppeteer_1.wrapPuppeteer; } });
11
12
  var wdio_1 = require("./wdio");
12
13
  Object.defineProperty(exports, "wdioConfig", { enumerable: true, get: function () { return wdio_1.wdioConfig; } });
13
14
  Object.defineProperty(exports, "wdioTestRunner", { enumerable: true, get: function () { return wdio_1.wdioTestRunner; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;;;;AAEpD,yCAAkE;AAAzD,4GAAA,eAAe,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAC7C,+BAA6E;AAApE,kGAAA,UAAU,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAC7D,yCAAkE;AAAzD,4GAAA,eAAe,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAC7C,2CAIqB;AAHnB,8GAAA,gBAAgB,OAAA;AAChB,kHAAA,oBAAoB,OAAA;AACpB,4GAAA,cAAc,OAAA;AAEhB,mDAA4D;AAAnD,iIAAA,OAAO,OAAkB;AAClC,qCAAyC;AAAhC,wGAAA,aAAa,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;;;;AAEpD,yCAIoB;AAHlB,4GAAA,eAAe,OAAA;AACf,gHAAA,mBAAmB,OAAA;AACnB,0GAAA,aAAa,OAAA;AAEf,+BAA6E;AAApE,kGAAA,UAAU,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAC7D,yCAAkE;AAAzD,4GAAA,eAAe,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAC7C,2CAIqB;AAHnB,8GAAA,gBAAgB,OAAA;AAChB,kHAAA,oBAAoB,OAAA;AACpB,4GAAA,cAAc,OAAA;AAEhB,mDAA4D;AAAnD,iIAAA,OAAO,OAAkB;AAClC,qCAAyC;AAAhC,wGAAA,aAAa,OAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { LaunchOptions, Page } from 'playwright-core';
2
- import { Configuration } from './util';
2
+ import { type Configuration } from './util';
3
3
  import Controller from './Controller';
4
4
  import { wrapBrowserContext } from './playwrightWrapping';
5
5
  /** Options for configuring Playwright and @axe-core/watcher. */
@@ -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,20 +24,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
77
24
  };
78
25
  Object.defineProperty(exports, "__esModule", { value: true });
79
26
  exports.wrapPlaywright = exports.PlaywrightController = exports.playwrightConfig = void 0;
80
- var util_1 = require("./util");
81
- var Controller_1 = __importDefault(require("./Controller"));
82
- var playwrightWrapping_1 = require("./playwrightWrapping");
27
+ const util_1 = require("./util");
28
+ const Controller_1 = __importDefault(require("./Controller"));
29
+ const playwrightWrapping_1 = require("./playwrightWrapping");
83
30
  Object.defineProperty(exports, "wrapPlaywright", { enumerable: true, get: function () { return playwrightWrapping_1.wrapBrowserContext; } });
84
- var uuid_1 = require("uuid");
31
+ const uuid_1 = require("uuid");
85
32
  /**
86
33
  * Creates a Playwright config that uses axe extension
87
34
  *
88
35
  * @param opts Playwright config to extend
89
36
  */
90
37
  function playwrightConfig(opts) {
91
- var axe = opts.axe, config = __rest(opts, ["axe"]);
92
- var _a = config.args, args = _a === void 0 ? [] : _a;
93
- (0, util_1.writeVariables)(__assign(__assign({}, axe), {
38
+ const { axe } = opts, config = __rest(opts, ["axe"]);
39
+ let { args = [] } = config;
40
+ (0, util_1.writeVariables)(Object.assign(Object.assign({}, axe), {
94
41
  /** Ensure the session ID persists between tabs.
95
42
  * We cannot allow the extension to generate an ID,
96
43
  * as each tab would get its own */
@@ -99,33 +46,19 @@ function playwrightConfig(opts) {
99
46
  throw new util_1.HeadlessNotSupportedError();
100
47
  }
101
48
  args = args.concat(util_1.extensionArgs);
102
- return __assign(__assign({}, config), { headless: false, args: args });
49
+ return Object.assign(Object.assign({}, config), { headless: false, args });
103
50
  }
104
51
  exports.playwrightConfig = playwrightConfig;
105
- var PlaywrightController = /** @class */ (function (_super) {
106
- __extends(PlaywrightController, _super);
107
- function PlaywrightController(driver) {
108
- var _this = _super.call(this) || this;
109
- _this.driver = driver;
110
- return _this;
52
+ class PlaywrightController extends Controller_1.default {
53
+ constructor(driver) {
54
+ super();
55
+ this.driver = driver;
111
56
  }
112
- PlaywrightController.prototype.executeScript = function (fn) {
113
- var args = [];
114
- for (var _i = 1; _i < arguments.length; _i++) {
115
- args[_i - 1] = arguments[_i];
116
- }
117
- return __awaiter(this, void 0, void 0, function () {
118
- return __generator(this, function (_a) {
119
- switch (_a.label) {
120
- case 0: return [4 /*yield*/, this.driver.evaluate(fn, args)];
121
- case 1:
122
- _a.sent();
123
- return [2 /*return*/];
124
- }
125
- });
57
+ executeScript(fn, ...args) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ yield this.driver.evaluate(fn, args);
126
60
  });
127
- };
128
- return PlaywrightController;
129
- }(Controller_1.default));
61
+ }
62
+ }
130
63
  exports.PlaywrightController = PlaywrightController;
131
64
  //# sourceMappingURL=playwright.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"playw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"","sources":["../src/playwright.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iCAKe;AACf,8DAAqC;AACrC,6DAAyD;AAqD1B,+FArDtB,uCAAkB,OAqDkB;AApD7C,+BAAiC;AAKjC;;;;GAIG;AAEH,SAAgB,gBAAgB,CAAC,IAAa;IAC5C,MAAM,EAAE,GAAG,KAAgB,IAAI,EAAf,MAAM,UAAK,IAAI,EAAzB,OAAkB,CAAO,CAAA;IAC/B,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,MAAM,CAAA;IAE1B,IAAA,qBAAc,kCACT,GAAG;QACN;;2CAEmC;QACnC,SAAS,EAAE,GAAG,CAAC,SAAS,IAAI,IAAA,SAAI,GAAE,IAClC,CAAA;IAEF,IAAI,MAAM,CAAC,QAAQ,EAAE;QACnB,MAAM,IAAI,gCAAyB,EAAE,CAAA;KACtC;IAED,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAa,CAAC,CAAA;IAEjC,uCACK,MAAM,KACT,QAAQ,EAAE,KAAK,EACf,IAAI,IACL;AACH,CAAC;AAvBD,4CAuBC;AAED,MAAa,oBAAqB,SAAQ,oBAAU;IAGlD,YAAY,MAAY;QACtB,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEe,aAAa,CAC3B,EAAkC,EAClC,GAAG,IAAe;;YAElB,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;QACtC,CAAC;KAAA;CACF;AAdD,oDAcC"}
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -19,33 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
19
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
20
9
  });
21
10
  };
22
- var __generator = (this && this.__generator) || function (thisArg, body) {
23
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
- function verb(n) { return function (v) { return step([n, v]); }; }
26
- function step(op) {
27
- if (f) throw new TypeError("Generator is already executing.");
28
- while (_) try {
29
- 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;
30
- if (y = 0, t) op = [op[0] & 2, t.value];
31
- switch (op[0]) {
32
- case 0: case 1: t = op; break;
33
- case 4: _.label++; return { value: op[1], done: false };
34
- case 5: _.label++; y = op[1]; op = [0]; continue;
35
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
- default:
37
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
- if (t[2]) _.ops.pop();
42
- _.trys.pop(); continue;
43
- }
44
- op = body.call(thisArg, _);
45
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
- }
48
- };
49
11
  var __rest = (this && this.__rest) || function (s, e) {
50
12
  var t = {};
51
13
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -57,19 +19,10 @@ var __rest = (this && this.__rest) || function (s, e) {
57
19
  }
58
20
  return t;
59
21
  };
60
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
61
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
62
- if (ar || !(i in from)) {
63
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
64
- ar[i] = from[i];
65
- }
66
- }
67
- return to.concat(ar || Array.prototype.slice.call(from));
68
- };
69
22
  Object.defineProperty(exports, "__esModule", { value: true });
70
- var uuid_1 = require("uuid");
71
- var playwright_1 = require("./playwright");
72
- var util_1 = require("./util");
23
+ const uuid_1 = require("uuid");
24
+ const playwright_1 = require("./playwright");
25
+ const util_1 = require("./util");
73
26
  /**
74
27
  * Configure `@playwright/test` for usage with axe Watcher and return wrapped `test` and `expect` functions.
75
28
  *
@@ -77,77 +30,46 @@ var util_1 = require("./util");
77
30
  * @see https://playwright.dev/docs/api/class-test#test-call
78
31
  * @see https://playwright.dev/docs/api/class-test#test-expect
79
32
  */
80
- var playwrightTest = function (options) {
81
- var _a;
82
- var controller = null;
83
- var axe = options.axe, config = __rest(options
33
+ const playwrightTest = (options) => {
34
+ let controller = null;
35
+ const { axe } = options, config = __rest(options
84
36
  // We must lazily require the `@playwright/test` package, as
85
37
  // users of other platforms won't have it installed.
86
38
  , ["axe"]);
87
39
  // We must lazily require the `@playwright/test` package, as
88
40
  // users of other platforms won't have it installed.
89
- var base;
90
- var chromium;
41
+ let base;
42
+ let chromium;
91
43
  try {
92
44
  ;
93
- (_a = require('@playwright/test'), base = _a.test, chromium = _a.chromium);
45
+ ({ test: base, chromium } = require('@playwright/test'));
94
46
  }
95
47
  catch (error) {
96
48
  throw new Error('Unable to load @playwright/test: ' + error.message);
97
49
  }
98
- (0, util_1.writeVariables)(__assign(__assign({}, axe), { sessionId: axe.sessionId || (0, uuid_1.v4)() }));
99
- var test = base.extend({
50
+ (0, util_1.writeVariables)(Object.assign(Object.assign({}, axe), { sessionId: axe.sessionId || (0, uuid_1.v4)() }));
51
+ const test = base.extend({
100
52
  // Playwright requires destructing the context object. Removing it yields:
101
53
  //
102
54
  // Error: First argument must use the object destructuring pattern:
103
55
  //
104
56
  // eslint-disable-next-line no-empty-pattern
105
- context: function (_a, use) { return __awaiter(void 0, void 0, void 0, function () {
106
- var context;
107
- return __generator(this, function (_b) {
108
- switch (_b.label) {
109
- case 0: return [4 /*yield*/, chromium.launchPersistentContext('', __assign(__assign({}, config), { args: __spreadArray(__spreadArray([], (config.args || []), true), util_1.extensionArgs, true) }))];
110
- case 1:
111
- context = _b.sent();
112
- return [4 /*yield*/, use(context)];
113
- case 2:
114
- _b.sent();
115
- return [4 /*yield*/, context.close()];
116
- case 3:
117
- _b.sent();
118
- return [2 /*return*/];
119
- }
120
- });
121
- }); },
122
- page: function (_a, use) {
123
- var page = _a.page, context = _a.context;
124
- return __awaiter(void 0, void 0, void 0, function () {
125
- return __generator(this, function (_b) {
126
- switch (_b.label) {
127
- case 0:
128
- controller = new playwright_1.PlaywrightController(page);
129
- (0, playwright_1.wrapPlaywright)(context, controller);
130
- return [4 /*yield*/, use(page)];
131
- case 1:
132
- _b.sent();
133
- return [2 /*return*/];
134
- }
135
- });
136
- });
137
- }
57
+ context: ({}, use) => __awaiter(void 0, void 0, void 0, function* () {
58
+ const context = yield chromium.launchPersistentContext('', Object.assign(Object.assign({}, config), { args: [...(config.args || []), ...util_1.extensionArgs] }));
59
+ yield use(context);
60
+ yield context.close();
61
+ }),
62
+ page: ({ page, context }, use) => __awaiter(void 0, void 0, void 0, function* () {
63
+ controller = new playwright_1.PlaywrightController(page);
64
+ (0, playwright_1.wrapPlaywright)(context, controller);
65
+ yield use(page);
66
+ })
138
67
  });
139
- test.afterEach(function () { return __awaiter(void 0, void 0, void 0, function () {
140
- return __generator(this, function (_a) {
141
- switch (_a.label) {
142
- case 0: return [4 /*yield*/, (controller === null || controller === void 0 ? void 0 : controller.flush())];
143
- case 1:
144
- _a.sent();
145
- return [2 /*return*/];
146
- }
147
- });
148
- }); });
149
- var expect = test.expect;
150
- return { test: test, expect: expect };
68
+ test.afterEach(() => __awaiter(void 0, void 0, void 0, function* () {
69
+ yield (controller === null || controller === void 0 ? void 0 : controller.flush());
70
+ }));
71
+ const expect = test.expect;
72
+ return { test, expect };
151
73
  };
152
74
  exports.default = playwrightTest;
153
75
  //# sourceMappingURL=playwrightTest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"playwrightTest.js","sourceRoot":"","sources":["../src/playwrightTest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,6BAAiC;AACjC,2CAIqB;AACrB,+BAAsD;AAYtD;;;;;;GAMG;AAEH,IAAM,cAAc,GAAG,UAAC,OAAgB;;IACtC,IAAI,UAAU,GAAgC,IAAI,CAAA;IAC1C,IAAA,GAAG,GAAgB,OAAO,IAAvB,EAAK,MAAM,UAAK,OAAO;IAElC,4DAA4D;IAC5D,oDAAoD;MAH9C,OAAkB,CAAF,CAAY;IAElC,4DAA4D;IAC5D,oDAAoD;IACpD,IAAI,IAAU,CAAA;IACd,IAAI,QAAsC,CAAA;IAC1C,IAAI;QACF,CAAC;QAAA,CAAC,KAA2B,OAAO,CAAC,kBAAkB,CAAC,EAA9C,IAAI,UAAA,EAAE,QAAQ,cAAA,CAAiC,CAAA;KAC1D;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,IAAI,KAAK,CACb,mCAAmC,GAAI,KAAe,CAAC,OAAO,CAC/D,CAAA;KACF;IAED,IAAA,qBAAc,wBAAM,GAAG,KAAE,SAAS,EAAE,GAAG,CAAC,SAAS,IAAI,IAAA,SAAI,GAAE,IAAG,CAAA;IAE9D,IAAM,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EAAC,OAAO,EAAE,UAAU,CAAC,CAAA;YACnC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAA;QACjB,CAAC,CAAA;KACF,CAAC,CAAA;IAEF,IAAI,CAAC,SAAS,CAAC,GAAS,EAAE;QACxB,MAAM,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,EAAE,CAAA,CAAA;IAC3B,CAAC,CAAA,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;IAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;AACzB,CAAC,CAAA;AAED,kBAAe,cAAc,CAAA"}
@@ -1,11 +1,6 @@
1
1
  import type { Browser, BrowserContext, ElementHandle, Frame, FrameLocator, JSHandle, Keyboard, Locator, Mouse, Page, Touchscreen } from 'playwright-core';
2
2
  import type { PlaywrightController } from './playwright';
3
- declare const kWrapped: unique symbol;
4
- declare type PossiblyWrapped<T> = T & {
5
- [kWrapped]?: boolean;
6
- };
7
- export declare const isWrapped: <T>(o: PossiblyWrapped<T>) => boolean;
8
- export declare const markAsWrapped: (o: unknown) => void;
3
+ import { type PossiblyWrapped } from './util';
9
4
  export declare const wrapBrowserContext: (browserContext: PossiblyWrapped<BrowserContext>, controller: PlaywrightController) => BrowserContext;
10
5
  export declare const wrapBrowser: (browser: PossiblyWrapped<Browser>, controller: PlaywrightController) => Browser;
11
6
  export declare const wrapPage: (page: PossiblyWrapped<Page>, controller: PlaywrightController) => Page;
@@ -17,4 +12,3 @@ export declare const wrapJSHandle: (jsHandle: PossiblyWrapped<JSHandle>, control
17
12
  export declare const wrapKeyboard: (keyboard: PossiblyWrapped<Keyboard>, controller: PlaywrightController) => Keyboard;
18
13
  export declare const wrapMouse: (mouse: PossiblyWrapped<Mouse>, controller: PlaywrightController) => Mouse;
19
14
  export declare const wrapTouchscreen: (touchscreen: PossiblyWrapped<Touchscreen>, controller: PlaywrightController) => Touchscreen;
20
- export {};