@bigbinary/neeto-commons-frontend 2.0.31 → 2.0.32
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/cypress-commands.d.ts +1 -0
- package/cypress-utils.cjs.js +1035 -52
- package/cypress-utils.d.ts +27 -42
- package/cypress-utils.js +1035 -52
- package/initializers.cjs.js +39 -5
- package/initializers.js +40 -6
- package/package.json +1 -1
package/cypress-utils.js
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { dataCy as dataCy$1 } from 'Support/utils/common';
|
|
2
|
+
import '@bigbinary/neetoui';
|
|
3
|
+
import 'i18next';
|
|
4
|
+
import { curryN, isNil } from 'ramda';
|
|
2
5
|
import dayjs from 'dayjs';
|
|
3
6
|
|
|
4
|
-
function _typeof(obj) {
|
|
7
|
+
function _typeof$1(obj) {
|
|
5
8
|
"@babel/helpers - typeof";
|
|
6
9
|
|
|
7
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
10
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
8
11
|
return typeof obj;
|
|
9
12
|
} : function (obj) {
|
|
10
13
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
11
|
-
}, _typeof(obj);
|
|
14
|
+
}, _typeof$1(obj);
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
function _toPrimitive(input, hint) {
|
|
15
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
18
|
+
if (_typeof$1(input) !== "object" || input === null) return input;
|
|
16
19
|
var prim = input[Symbol.toPrimitive];
|
|
17
20
|
if (prim !== undefined) {
|
|
18
21
|
var res = prim.call(input, hint || "default");
|
|
19
|
-
if (_typeof(res) !== "object") return res;
|
|
22
|
+
if (_typeof$1(res) !== "object") return res;
|
|
20
23
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
21
24
|
}
|
|
22
25
|
return (hint === "string" ? String : Number)(input);
|
|
@@ -24,7 +27,7 @@ function _toPrimitive(input, hint) {
|
|
|
24
27
|
|
|
25
28
|
function _toPropertyKey(arg) {
|
|
26
29
|
var key = _toPrimitive(arg, "string");
|
|
27
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
30
|
+
return _typeof$1(key) === "symbol" ? key : String(key);
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
function _defineProperty(obj, key, value) {
|
|
@@ -107,11 +110,11 @@ var initializeCredentials = function initializeCredentials(stagingData) {
|
|
|
107
110
|
cy.task("getGlobalState").then(function (state) {
|
|
108
111
|
var newState = {
|
|
109
112
|
businessName: state.businessName || stagingData.businessName,
|
|
110
|
-
currentUserName: state.
|
|
113
|
+
currentUserName: state.currentUserName || stagingData.currentUserName,
|
|
111
114
|
email: state.email || stagingData.email,
|
|
112
115
|
firstName: state.firstName || stagingData.firstName,
|
|
113
116
|
lastName: state.lastName || stagingData.lastName,
|
|
114
|
-
subdomainName: state.
|
|
117
|
+
subdomainName: state.subdomainName || stagingData.subdomainName,
|
|
115
118
|
skipSetup: state.skipSetup
|
|
116
119
|
};
|
|
117
120
|
if (isStagingEnv) {
|
|
@@ -126,9 +129,9 @@ var allPath = function allPath() {
|
|
|
126
129
|
return "".concat(Cypress.config("baseUrl")).concat(getUrl("**"));
|
|
127
130
|
};
|
|
128
131
|
var requestApis = {
|
|
129
|
-
countries: "
|
|
130
|
-
signUp: "
|
|
131
|
-
subdomainAvailablity: "
|
|
132
|
+
countries: getUrl("countries"),
|
|
133
|
+
signUp: getUrl("signups/**"),
|
|
134
|
+
subdomainAvailablity: getUrl("subdomain_availability/**"),
|
|
132
135
|
teamMembers: {
|
|
133
136
|
all: "/team_members*/**",
|
|
134
137
|
bulkUpdate: "/team_members/teams/bulk_update",
|
|
@@ -204,16 +207,18 @@ Cypress.Commands.add("verifyToastMessage", function (message) {
|
|
|
204
207
|
cy.get(commonSelectors.toastMessage).should("not.exist");
|
|
205
208
|
});
|
|
206
209
|
Cypress.Commands.add("continueOnAlert", function (args) {
|
|
207
|
-
var props = _typeof(args) === "object" ? args : {
|
|
210
|
+
var props = _typeof$1(args) === "object" ? args : {
|
|
208
211
|
alias: args
|
|
209
212
|
};
|
|
210
213
|
var alias = props.alias,
|
|
211
214
|
title = props.title,
|
|
215
|
+
description = props.description,
|
|
212
216
|
_props$requestCount = props.requestCount,
|
|
213
217
|
requestCount = _props$requestCount === void 0 ? 1 : _props$requestCount,
|
|
214
218
|
toastMessage = props.toastMessage;
|
|
215
219
|
var hasMoreThanOneRequest = requestCount > 1;
|
|
216
220
|
title && cy.get(commonSelectors.alertTitle).should("have.text", title);
|
|
221
|
+
description && cy.get(commonSelectors.alertModalMessage).should("have.text", description);
|
|
217
222
|
cy.interceptApi(alias, requestCount);
|
|
218
223
|
cy.get(commonSelectors.alertModalSubmitButton).click();
|
|
219
224
|
cy.wait("@".concat(alias));
|
|
@@ -297,6 +302,997 @@ var loginSelectors = {
|
|
|
297
302
|
twitterAuthenticationButton: dataCy("twitter-authentication-button")
|
|
298
303
|
};
|
|
299
304
|
|
|
305
|
+
function _arrayWithHoles(arr) {
|
|
306
|
+
if (Array.isArray(arr)) return arr;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
function _iterableToArrayLimit(arr, i) {
|
|
310
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
311
|
+
if (null != _i) {
|
|
312
|
+
var _s,
|
|
313
|
+
_e,
|
|
314
|
+
_x,
|
|
315
|
+
_r,
|
|
316
|
+
_arr = [],
|
|
317
|
+
_n = !0,
|
|
318
|
+
_d = !1;
|
|
319
|
+
try {
|
|
320
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
321
|
+
if (Object(_i) !== _i) return;
|
|
322
|
+
_n = !1;
|
|
323
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
324
|
+
} catch (err) {
|
|
325
|
+
_d = !0, _e = err;
|
|
326
|
+
} finally {
|
|
327
|
+
try {
|
|
328
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
329
|
+
} finally {
|
|
330
|
+
if (_d) throw _e;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return _arr;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
function _nonIterableRest() {
|
|
338
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function _slicedToArray(arr, i) {
|
|
342
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
var regeneratorRuntime$1 = {exports: {}};
|
|
346
|
+
|
|
347
|
+
var _typeof = {exports: {}};
|
|
348
|
+
|
|
349
|
+
(function (module) {
|
|
350
|
+
function _typeof(obj) {
|
|
351
|
+
"@babel/helpers - typeof";
|
|
352
|
+
|
|
353
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
354
|
+
return typeof obj;
|
|
355
|
+
} : function (obj) {
|
|
356
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
357
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
358
|
+
}
|
|
359
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
360
|
+
} (_typeof));
|
|
361
|
+
|
|
362
|
+
(function (module) {
|
|
363
|
+
var _typeof$1 = _typeof.exports["default"];
|
|
364
|
+
function _regeneratorRuntime() {
|
|
365
|
+
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
366
|
+
return exports;
|
|
367
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
368
|
+
var exports = {},
|
|
369
|
+
Op = Object.prototype,
|
|
370
|
+
hasOwn = Op.hasOwnProperty,
|
|
371
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
372
|
+
obj[key] = desc.value;
|
|
373
|
+
},
|
|
374
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
375
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
376
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
377
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
378
|
+
function define(obj, key, value) {
|
|
379
|
+
return Object.defineProperty(obj, key, {
|
|
380
|
+
value: value,
|
|
381
|
+
enumerable: !0,
|
|
382
|
+
configurable: !0,
|
|
383
|
+
writable: !0
|
|
384
|
+
}), obj[key];
|
|
385
|
+
}
|
|
386
|
+
try {
|
|
387
|
+
define({}, "");
|
|
388
|
+
} catch (err) {
|
|
389
|
+
define = function define(obj, key, value) {
|
|
390
|
+
return obj[key] = value;
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
394
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
395
|
+
generator = Object.create(protoGenerator.prototype),
|
|
396
|
+
context = new Context(tryLocsList || []);
|
|
397
|
+
return defineProperty(generator, "_invoke", {
|
|
398
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
399
|
+
}), generator;
|
|
400
|
+
}
|
|
401
|
+
function tryCatch(fn, obj, arg) {
|
|
402
|
+
try {
|
|
403
|
+
return {
|
|
404
|
+
type: "normal",
|
|
405
|
+
arg: fn.call(obj, arg)
|
|
406
|
+
};
|
|
407
|
+
} catch (err) {
|
|
408
|
+
return {
|
|
409
|
+
type: "throw",
|
|
410
|
+
arg: err
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
exports.wrap = wrap;
|
|
415
|
+
var ContinueSentinel = {};
|
|
416
|
+
function Generator() {}
|
|
417
|
+
function GeneratorFunction() {}
|
|
418
|
+
function GeneratorFunctionPrototype() {}
|
|
419
|
+
var IteratorPrototype = {};
|
|
420
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
421
|
+
return this;
|
|
422
|
+
});
|
|
423
|
+
var getProto = Object.getPrototypeOf,
|
|
424
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
425
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
426
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
427
|
+
function defineIteratorMethods(prototype) {
|
|
428
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
429
|
+
define(prototype, method, function (arg) {
|
|
430
|
+
return this._invoke(method, arg);
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
435
|
+
function invoke(method, arg, resolve, reject) {
|
|
436
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
437
|
+
if ("throw" !== record.type) {
|
|
438
|
+
var result = record.arg,
|
|
439
|
+
value = result.value;
|
|
440
|
+
return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
441
|
+
invoke("next", value, resolve, reject);
|
|
442
|
+
}, function (err) {
|
|
443
|
+
invoke("throw", err, resolve, reject);
|
|
444
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
445
|
+
result.value = unwrapped, resolve(result);
|
|
446
|
+
}, function (error) {
|
|
447
|
+
return invoke("throw", error, resolve, reject);
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
reject(record.arg);
|
|
451
|
+
}
|
|
452
|
+
var previousPromise;
|
|
453
|
+
defineProperty(this, "_invoke", {
|
|
454
|
+
value: function value(method, arg) {
|
|
455
|
+
function callInvokeWithMethodAndArg() {
|
|
456
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
457
|
+
invoke(method, arg, resolve, reject);
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
465
|
+
var state = "suspendedStart";
|
|
466
|
+
return function (method, arg) {
|
|
467
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
468
|
+
if ("completed" === state) {
|
|
469
|
+
if ("throw" === method) throw arg;
|
|
470
|
+
return doneResult();
|
|
471
|
+
}
|
|
472
|
+
for (context.method = method, context.arg = arg;;) {
|
|
473
|
+
var delegate = context.delegate;
|
|
474
|
+
if (delegate) {
|
|
475
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
476
|
+
if (delegateResult) {
|
|
477
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
478
|
+
return delegateResult;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
482
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
483
|
+
context.dispatchException(context.arg);
|
|
484
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
485
|
+
state = "executing";
|
|
486
|
+
var record = tryCatch(innerFn, self, context);
|
|
487
|
+
if ("normal" === record.type) {
|
|
488
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
489
|
+
return {
|
|
490
|
+
value: record.arg,
|
|
491
|
+
done: context.done
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
499
|
+
var methodName = context.method,
|
|
500
|
+
method = delegate.iterator[methodName];
|
|
501
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
502
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
503
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
504
|
+
var info = record.arg;
|
|
505
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
506
|
+
}
|
|
507
|
+
function pushTryEntry(locs) {
|
|
508
|
+
var entry = {
|
|
509
|
+
tryLoc: locs[0]
|
|
510
|
+
};
|
|
511
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
512
|
+
}
|
|
513
|
+
function resetTryEntry(entry) {
|
|
514
|
+
var record = entry.completion || {};
|
|
515
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
516
|
+
}
|
|
517
|
+
function Context(tryLocsList) {
|
|
518
|
+
this.tryEntries = [{
|
|
519
|
+
tryLoc: "root"
|
|
520
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
521
|
+
}
|
|
522
|
+
function values(iterable) {
|
|
523
|
+
if (iterable) {
|
|
524
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
525
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
526
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
527
|
+
if (!isNaN(iterable.length)) {
|
|
528
|
+
var i = -1,
|
|
529
|
+
next = function next() {
|
|
530
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
531
|
+
return next.value = undefined, next.done = !0, next;
|
|
532
|
+
};
|
|
533
|
+
return next.next = next;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
return {
|
|
537
|
+
next: doneResult
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
function doneResult() {
|
|
541
|
+
return {
|
|
542
|
+
value: undefined,
|
|
543
|
+
done: !0
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
547
|
+
value: GeneratorFunctionPrototype,
|
|
548
|
+
configurable: !0
|
|
549
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
550
|
+
value: GeneratorFunction,
|
|
551
|
+
configurable: !0
|
|
552
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
553
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
554
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
555
|
+
}, exports.mark = function (genFun) {
|
|
556
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
557
|
+
}, exports.awrap = function (arg) {
|
|
558
|
+
return {
|
|
559
|
+
__await: arg
|
|
560
|
+
};
|
|
561
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
562
|
+
return this;
|
|
563
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
564
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
565
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
566
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
567
|
+
return result.done ? result.value : iter.next();
|
|
568
|
+
});
|
|
569
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
570
|
+
return this;
|
|
571
|
+
}), define(Gp, "toString", function () {
|
|
572
|
+
return "[object Generator]";
|
|
573
|
+
}), exports.keys = function (val) {
|
|
574
|
+
var object = Object(val),
|
|
575
|
+
keys = [];
|
|
576
|
+
for (var key in object) keys.push(key);
|
|
577
|
+
return keys.reverse(), function next() {
|
|
578
|
+
for (; keys.length;) {
|
|
579
|
+
var key = keys.pop();
|
|
580
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
581
|
+
}
|
|
582
|
+
return next.done = !0, next;
|
|
583
|
+
};
|
|
584
|
+
}, exports.values = values, Context.prototype = {
|
|
585
|
+
constructor: Context,
|
|
586
|
+
reset: function reset(skipTempReset) {
|
|
587
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
588
|
+
},
|
|
589
|
+
stop: function stop() {
|
|
590
|
+
this.done = !0;
|
|
591
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
592
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
593
|
+
return this.rval;
|
|
594
|
+
},
|
|
595
|
+
dispatchException: function dispatchException(exception) {
|
|
596
|
+
if (this.done) throw exception;
|
|
597
|
+
var context = this;
|
|
598
|
+
function handle(loc, caught) {
|
|
599
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
600
|
+
}
|
|
601
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
602
|
+
var entry = this.tryEntries[i],
|
|
603
|
+
record = entry.completion;
|
|
604
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
605
|
+
if (entry.tryLoc <= this.prev) {
|
|
606
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
607
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
608
|
+
if (hasCatch && hasFinally) {
|
|
609
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
610
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
611
|
+
} else if (hasCatch) {
|
|
612
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
613
|
+
} else {
|
|
614
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
615
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
abrupt: function abrupt(type, arg) {
|
|
621
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
622
|
+
var entry = this.tryEntries[i];
|
|
623
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
624
|
+
var finallyEntry = entry;
|
|
625
|
+
break;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
629
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
630
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
631
|
+
},
|
|
632
|
+
complete: function complete(record, afterLoc) {
|
|
633
|
+
if ("throw" === record.type) throw record.arg;
|
|
634
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
635
|
+
},
|
|
636
|
+
finish: function finish(finallyLoc) {
|
|
637
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
638
|
+
var entry = this.tryEntries[i];
|
|
639
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
"catch": function _catch(tryLoc) {
|
|
643
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
644
|
+
var entry = this.tryEntries[i];
|
|
645
|
+
if (entry.tryLoc === tryLoc) {
|
|
646
|
+
var record = entry.completion;
|
|
647
|
+
if ("throw" === record.type) {
|
|
648
|
+
var thrown = record.arg;
|
|
649
|
+
resetTryEntry(entry);
|
|
650
|
+
}
|
|
651
|
+
return thrown;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
throw new Error("illegal catch attempt");
|
|
655
|
+
},
|
|
656
|
+
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
657
|
+
return this.delegate = {
|
|
658
|
+
iterator: values(iterable),
|
|
659
|
+
resultName: resultName,
|
|
660
|
+
nextLoc: nextLoc
|
|
661
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
662
|
+
}
|
|
663
|
+
}, exports;
|
|
664
|
+
}
|
|
665
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
666
|
+
} (regeneratorRuntime$1));
|
|
667
|
+
|
|
668
|
+
// TODO(Babel 8): Remove this file.
|
|
669
|
+
|
|
670
|
+
var runtime = regeneratorRuntime$1.exports();
|
|
671
|
+
|
|
672
|
+
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
673
|
+
try {
|
|
674
|
+
regeneratorRuntime = runtime;
|
|
675
|
+
} catch (accidentalStrictMode) {
|
|
676
|
+
if (typeof globalThis === "object") {
|
|
677
|
+
globalThis.regeneratorRuntime = runtime;
|
|
678
|
+
} else {
|
|
679
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* @template {Function} T
|
|
685
|
+
* @param {T} func
|
|
686
|
+
* @returns {T}
|
|
687
|
+
*/
|
|
688
|
+
var nullSafe = function nullSafe(func) {
|
|
689
|
+
return (
|
|
690
|
+
// @ts-ignore
|
|
691
|
+
curryN(func.length, function () {
|
|
692
|
+
var _ref;
|
|
693
|
+
var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
|
|
694
|
+
return isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
|
|
695
|
+
})
|
|
696
|
+
);
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
var slugify = function slugify(string) {
|
|
700
|
+
return string.toString().toLowerCase().replace(/\s+/g, "-") // Replace spaces with -
|
|
701
|
+
.replace(/&/g, "-and-") // Replace & with 'and'
|
|
702
|
+
.replace(/[^\w-]+/g, "") // Remove all non-word characters
|
|
703
|
+
.replace(/--+/g, "-") // Replace multiple - with single -
|
|
704
|
+
.replace(/^-+/, "") // Trim - from start of text
|
|
705
|
+
.replace(/-+$/, "");
|
|
706
|
+
}; // Trim - from end of text
|
|
707
|
+
|
|
708
|
+
var humanize = function humanize(string) {
|
|
709
|
+
string = string.replace(/[_-]+/g, " ").replace(/\s{2,}/g, " ").replace(/([a-z\d])([A-Z])/g, "$1" + " " + "$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g, "$1" + " " + "$2").toLowerCase().trim();
|
|
710
|
+
string = string.charAt(0).toUpperCase() + string.slice(1);
|
|
711
|
+
return string;
|
|
712
|
+
};
|
|
713
|
+
var snakeToCamelCase = function snakeToCamelCase(string) {
|
|
714
|
+
return string.replace(/(_\w)/g, function (letter) {
|
|
715
|
+
return letter[1].toUpperCase();
|
|
716
|
+
});
|
|
717
|
+
};
|
|
718
|
+
var camelToSnakeCase = function camelToSnakeCase(string) {
|
|
719
|
+
return string.replace(/[A-Z]/g, function (letter) {
|
|
720
|
+
return "_".concat(letter.toLowerCase());
|
|
721
|
+
});
|
|
722
|
+
};
|
|
723
|
+
var capitalize = function capitalize(string) {
|
|
724
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
725
|
+
};
|
|
726
|
+
nullSafe(slugify);
|
|
727
|
+
nullSafe(humanize);
|
|
728
|
+
nullSafe(snakeToCamelCase);
|
|
729
|
+
nullSafe(camelToSnakeCase);
|
|
730
|
+
nullSafe(capitalize);
|
|
731
|
+
|
|
732
|
+
var filterNonNull = function filterNonNull(object) {
|
|
733
|
+
return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
|
|
734
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
735
|
+
v = _ref6[1];
|
|
736
|
+
return !isNil(v);
|
|
737
|
+
}).map(function (_ref7) {
|
|
738
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
|
739
|
+
k = _ref8[0],
|
|
740
|
+
v = _ref8[1];
|
|
741
|
+
return [k, _typeof$1(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
|
|
742
|
+
}));
|
|
743
|
+
};
|
|
744
|
+
nullSafe(filterNonNull);
|
|
745
|
+
|
|
746
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
747
|
+
var shams = function hasSymbols() {
|
|
748
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
749
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
750
|
+
|
|
751
|
+
var obj = {};
|
|
752
|
+
var sym = Symbol('test');
|
|
753
|
+
var symObj = Object(sym);
|
|
754
|
+
if (typeof sym === 'string') { return false; }
|
|
755
|
+
|
|
756
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
757
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
758
|
+
|
|
759
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
760
|
+
// if (sym instanceof Symbol) { return false; }
|
|
761
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
762
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
763
|
+
|
|
764
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
765
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
766
|
+
|
|
767
|
+
var symVal = 42;
|
|
768
|
+
obj[sym] = symVal;
|
|
769
|
+
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
770
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
771
|
+
|
|
772
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
773
|
+
|
|
774
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
775
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
776
|
+
|
|
777
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
778
|
+
|
|
779
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
780
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
781
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
return true;
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
788
|
+
var hasSymbolSham = shams;
|
|
789
|
+
|
|
790
|
+
var hasSymbols$1 = function hasNativeSymbols() {
|
|
791
|
+
if (typeof origSymbol !== 'function') { return false; }
|
|
792
|
+
if (typeof Symbol !== 'function') { return false; }
|
|
793
|
+
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
794
|
+
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
795
|
+
|
|
796
|
+
return hasSymbolSham();
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
/* eslint no-invalid-this: 1 */
|
|
800
|
+
|
|
801
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
802
|
+
var slice = Array.prototype.slice;
|
|
803
|
+
var toStr = Object.prototype.toString;
|
|
804
|
+
var funcType = '[object Function]';
|
|
805
|
+
|
|
806
|
+
var implementation$1 = function bind(that) {
|
|
807
|
+
var target = this;
|
|
808
|
+
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
|
|
809
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
810
|
+
}
|
|
811
|
+
var args = slice.call(arguments, 1);
|
|
812
|
+
|
|
813
|
+
var bound;
|
|
814
|
+
var binder = function () {
|
|
815
|
+
if (this instanceof bound) {
|
|
816
|
+
var result = target.apply(
|
|
817
|
+
this,
|
|
818
|
+
args.concat(slice.call(arguments))
|
|
819
|
+
);
|
|
820
|
+
if (Object(result) === result) {
|
|
821
|
+
return result;
|
|
822
|
+
}
|
|
823
|
+
return this;
|
|
824
|
+
} else {
|
|
825
|
+
return target.apply(
|
|
826
|
+
that,
|
|
827
|
+
args.concat(slice.call(arguments))
|
|
828
|
+
);
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
|
|
832
|
+
var boundLength = Math.max(0, target.length - args.length);
|
|
833
|
+
var boundArgs = [];
|
|
834
|
+
for (var i = 0; i < boundLength; i++) {
|
|
835
|
+
boundArgs.push('$' + i);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
839
|
+
|
|
840
|
+
if (target.prototype) {
|
|
841
|
+
var Empty = function Empty() {};
|
|
842
|
+
Empty.prototype = target.prototype;
|
|
843
|
+
bound.prototype = new Empty();
|
|
844
|
+
Empty.prototype = null;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
return bound;
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
var implementation = implementation$1;
|
|
851
|
+
|
|
852
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
853
|
+
|
|
854
|
+
var bind$1 = functionBind;
|
|
855
|
+
|
|
856
|
+
var src = bind$1.call(Function.call, Object.prototype.hasOwnProperty);
|
|
857
|
+
|
|
858
|
+
var undefined$1;
|
|
859
|
+
|
|
860
|
+
var $SyntaxError = SyntaxError;
|
|
861
|
+
var $Function = Function;
|
|
862
|
+
var $TypeError = TypeError;
|
|
863
|
+
|
|
864
|
+
// eslint-disable-next-line consistent-return
|
|
865
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
|
866
|
+
try {
|
|
867
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
868
|
+
} catch (e) {}
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
872
|
+
if ($gOPD) {
|
|
873
|
+
try {
|
|
874
|
+
$gOPD({}, '');
|
|
875
|
+
} catch (e) {
|
|
876
|
+
$gOPD = null; // this is IE 8, which has a broken gOPD
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
var throwTypeError = function () {
|
|
881
|
+
throw new $TypeError();
|
|
882
|
+
};
|
|
883
|
+
var ThrowTypeError = $gOPD
|
|
884
|
+
? (function () {
|
|
885
|
+
try {
|
|
886
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
887
|
+
arguments.callee; // IE 8 does not throw here
|
|
888
|
+
return throwTypeError;
|
|
889
|
+
} catch (calleeThrows) {
|
|
890
|
+
try {
|
|
891
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
892
|
+
return $gOPD(arguments, 'callee').get;
|
|
893
|
+
} catch (gOPDthrows) {
|
|
894
|
+
return throwTypeError;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}())
|
|
898
|
+
: throwTypeError;
|
|
899
|
+
|
|
900
|
+
var hasSymbols = hasSymbols$1();
|
|
901
|
+
|
|
902
|
+
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
|
903
|
+
|
|
904
|
+
var needsEval = {};
|
|
905
|
+
|
|
906
|
+
var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
|
|
907
|
+
|
|
908
|
+
var INTRINSICS = {
|
|
909
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
910
|
+
'%Array%': Array,
|
|
911
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
912
|
+
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
913
|
+
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
914
|
+
'%AsyncFunction%': needsEval,
|
|
915
|
+
'%AsyncGenerator%': needsEval,
|
|
916
|
+
'%AsyncGeneratorFunction%': needsEval,
|
|
917
|
+
'%AsyncIteratorPrototype%': needsEval,
|
|
918
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
|
|
919
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
|
|
920
|
+
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
|
|
921
|
+
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
|
|
922
|
+
'%Boolean%': Boolean,
|
|
923
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
|
|
924
|
+
'%Date%': Date,
|
|
925
|
+
'%decodeURI%': decodeURI,
|
|
926
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
927
|
+
'%encodeURI%': encodeURI,
|
|
928
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
929
|
+
'%Error%': Error,
|
|
930
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
|
931
|
+
'%EvalError%': EvalError,
|
|
932
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
933
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
934
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
|
|
935
|
+
'%Function%': $Function,
|
|
936
|
+
'%GeneratorFunction%': needsEval,
|
|
937
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
938
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
939
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
940
|
+
'%isFinite%': isFinite,
|
|
941
|
+
'%isNaN%': isNaN,
|
|
942
|
+
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
943
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
944
|
+
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
945
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
|
|
946
|
+
'%Math%': Math,
|
|
947
|
+
'%Number%': Number,
|
|
948
|
+
'%Object%': Object,
|
|
949
|
+
'%parseFloat%': parseFloat,
|
|
950
|
+
'%parseInt%': parseInt,
|
|
951
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
952
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
953
|
+
'%RangeError%': RangeError,
|
|
954
|
+
'%ReferenceError%': ReferenceError,
|
|
955
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
956
|
+
'%RegExp%': RegExp,
|
|
957
|
+
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
958
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
|
|
959
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
960
|
+
'%String%': String,
|
|
961
|
+
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined$1,
|
|
962
|
+
'%Symbol%': hasSymbols ? Symbol : undefined$1,
|
|
963
|
+
'%SyntaxError%': $SyntaxError,
|
|
964
|
+
'%ThrowTypeError%': ThrowTypeError,
|
|
965
|
+
'%TypedArray%': TypedArray,
|
|
966
|
+
'%TypeError%': $TypeError,
|
|
967
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
968
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
969
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
970
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
|
|
971
|
+
'%URIError%': URIError,
|
|
972
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
973
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
974
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
|
|
975
|
+
};
|
|
976
|
+
|
|
977
|
+
try {
|
|
978
|
+
null.error; // eslint-disable-line no-unused-expressions
|
|
979
|
+
} catch (e) {
|
|
980
|
+
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
|
|
981
|
+
var errorProto = getProto(getProto(e));
|
|
982
|
+
INTRINSICS['%Error.prototype%'] = errorProto;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
var doEval = function doEval(name) {
|
|
986
|
+
var value;
|
|
987
|
+
if (name === '%AsyncFunction%') {
|
|
988
|
+
value = getEvalledConstructor('async function () {}');
|
|
989
|
+
} else if (name === '%GeneratorFunction%') {
|
|
990
|
+
value = getEvalledConstructor('function* () {}');
|
|
991
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
992
|
+
value = getEvalledConstructor('async function* () {}');
|
|
993
|
+
} else if (name === '%AsyncGenerator%') {
|
|
994
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
995
|
+
if (fn) {
|
|
996
|
+
value = fn.prototype;
|
|
997
|
+
}
|
|
998
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
999
|
+
var gen = doEval('%AsyncGenerator%');
|
|
1000
|
+
if (gen) {
|
|
1001
|
+
value = getProto(gen.prototype);
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
INTRINSICS[name] = value;
|
|
1006
|
+
|
|
1007
|
+
return value;
|
|
1008
|
+
};
|
|
1009
|
+
|
|
1010
|
+
var LEGACY_ALIASES = {
|
|
1011
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
1012
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
1013
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
1014
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
1015
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
1016
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
1017
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
1018
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
1019
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
1020
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
1021
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
1022
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
1023
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
1024
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
1025
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
1026
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
1027
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
1028
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
1029
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
1030
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
1031
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
1032
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
1033
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
1034
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
1035
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
1036
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
1037
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
1038
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
1039
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
1040
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
1041
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
1042
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
1043
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
1044
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
1045
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
1046
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
1047
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
1048
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
1049
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
1050
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
1051
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
1052
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
1053
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
1054
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
1055
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
1056
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
1057
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
1058
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
1059
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
1060
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
1061
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
1062
|
+
};
|
|
1063
|
+
|
|
1064
|
+
var bind = functionBind;
|
|
1065
|
+
var hasOwn = src;
|
|
1066
|
+
var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
1067
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
1068
|
+
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
1069
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
1070
|
+
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
1071
|
+
|
|
1072
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
1073
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
1074
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
1075
|
+
var stringToPath = function stringToPath(string) {
|
|
1076
|
+
var first = $strSlice(string, 0, 1);
|
|
1077
|
+
var last = $strSlice(string, -1);
|
|
1078
|
+
if (first === '%' && last !== '%') {
|
|
1079
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
1080
|
+
} else if (last === '%' && first !== '%') {
|
|
1081
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
1082
|
+
}
|
|
1083
|
+
var result = [];
|
|
1084
|
+
$replace(string, rePropName, function (match, number, quote, subString) {
|
|
1085
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
|
1086
|
+
});
|
|
1087
|
+
return result;
|
|
1088
|
+
};
|
|
1089
|
+
/* end adaptation */
|
|
1090
|
+
|
|
1091
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
1092
|
+
var intrinsicName = name;
|
|
1093
|
+
var alias;
|
|
1094
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
1095
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
1096
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
1100
|
+
var value = INTRINSICS[intrinsicName];
|
|
1101
|
+
if (value === needsEval) {
|
|
1102
|
+
value = doEval(intrinsicName);
|
|
1103
|
+
}
|
|
1104
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
1105
|
+
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
return {
|
|
1109
|
+
alias: alias,
|
|
1110
|
+
name: intrinsicName,
|
|
1111
|
+
value: value
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
1119
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
1120
|
+
throw new $TypeError('intrinsic name must be a non-empty string');
|
|
1121
|
+
}
|
|
1122
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
1123
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
1127
|
+
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
1128
|
+
}
|
|
1129
|
+
var parts = stringToPath(name);
|
|
1130
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
1131
|
+
|
|
1132
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
1133
|
+
var intrinsicRealName = intrinsic.name;
|
|
1134
|
+
var value = intrinsic.value;
|
|
1135
|
+
var skipFurtherCaching = false;
|
|
1136
|
+
|
|
1137
|
+
var alias = intrinsic.alias;
|
|
1138
|
+
if (alias) {
|
|
1139
|
+
intrinsicBaseName = alias[0];
|
|
1140
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
1144
|
+
var part = parts[i];
|
|
1145
|
+
var first = $strSlice(part, 0, 1);
|
|
1146
|
+
var last = $strSlice(part, -1);
|
|
1147
|
+
if (
|
|
1148
|
+
(
|
|
1149
|
+
(first === '"' || first === "'" || first === '`')
|
|
1150
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
1151
|
+
)
|
|
1152
|
+
&& first !== last
|
|
1153
|
+
) {
|
|
1154
|
+
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
1155
|
+
}
|
|
1156
|
+
if (part === 'constructor' || !isOwn) {
|
|
1157
|
+
skipFurtherCaching = true;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
intrinsicBaseName += '.' + part;
|
|
1161
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
1162
|
+
|
|
1163
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
1164
|
+
value = INTRINSICS[intrinsicRealName];
|
|
1165
|
+
} else if (value != null) {
|
|
1166
|
+
if (!(part in value)) {
|
|
1167
|
+
if (!allowMissing) {
|
|
1168
|
+
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
1169
|
+
}
|
|
1170
|
+
return void undefined$1;
|
|
1171
|
+
}
|
|
1172
|
+
if ($gOPD && (i + 1) >= parts.length) {
|
|
1173
|
+
var desc = $gOPD(value, part);
|
|
1174
|
+
isOwn = !!desc;
|
|
1175
|
+
|
|
1176
|
+
// By convention, when a data property is converted to an accessor
|
|
1177
|
+
// property to emulate a data property that does not suffer from
|
|
1178
|
+
// the override mistake, that accessor's getter is marked with
|
|
1179
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
1180
|
+
// uphold the illusion by pretending to see that original data
|
|
1181
|
+
// property, i.e., returning the value rather than the getter
|
|
1182
|
+
// itself.
|
|
1183
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
1184
|
+
value = desc.get;
|
|
1185
|
+
} else {
|
|
1186
|
+
value = value[part];
|
|
1187
|
+
}
|
|
1188
|
+
} else {
|
|
1189
|
+
isOwn = hasOwn(value, part);
|
|
1190
|
+
value = value[part];
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
if (isOwn && !skipFurtherCaching) {
|
|
1194
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
return value;
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1201
|
+
var callBind$1 = {exports: {}};
|
|
1202
|
+
|
|
1203
|
+
(function (module) {
|
|
1204
|
+
|
|
1205
|
+
var bind = functionBind;
|
|
1206
|
+
var GetIntrinsic = getIntrinsic;
|
|
1207
|
+
|
|
1208
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
1209
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
1210
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
1211
|
+
|
|
1212
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
1213
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
1214
|
+
var $max = GetIntrinsic('%Math.max%');
|
|
1215
|
+
|
|
1216
|
+
if ($defineProperty) {
|
|
1217
|
+
try {
|
|
1218
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
1219
|
+
} catch (e) {
|
|
1220
|
+
// IE 8 has a broken defineProperty
|
|
1221
|
+
$defineProperty = null;
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
module.exports = function callBind(originalFunction) {
|
|
1226
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
1227
|
+
if ($gOPD && $defineProperty) {
|
|
1228
|
+
var desc = $gOPD(func, 'length');
|
|
1229
|
+
if (desc.configurable) {
|
|
1230
|
+
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
1231
|
+
$defineProperty(
|
|
1232
|
+
func,
|
|
1233
|
+
'length',
|
|
1234
|
+
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
1235
|
+
);
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
return func;
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1241
|
+
var applyBind = function applyBind() {
|
|
1242
|
+
return $reflectApply(bind, $apply, arguments);
|
|
1243
|
+
};
|
|
1244
|
+
|
|
1245
|
+
if ($defineProperty) {
|
|
1246
|
+
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
1247
|
+
} else {
|
|
1248
|
+
module.exports.apply = applyBind;
|
|
1249
|
+
}
|
|
1250
|
+
} (callBind$1));
|
|
1251
|
+
|
|
1252
|
+
var GetIntrinsic$1 = getIntrinsic;
|
|
1253
|
+
|
|
1254
|
+
var callBind = callBind$1.exports;
|
|
1255
|
+
|
|
1256
|
+
var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
|
|
1257
|
+
|
|
1258
|
+
var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
|
|
1259
|
+
var intrinsic = GetIntrinsic$1(name, !!allowMissing);
|
|
1260
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
1261
|
+
return callBind(intrinsic);
|
|
1262
|
+
}
|
|
1263
|
+
return intrinsic;
|
|
1264
|
+
};
|
|
1265
|
+
|
|
1266
|
+
var GetIntrinsic = getIntrinsic;
|
|
1267
|
+
var callBound = callBound$1;
|
|
1268
|
+
|
|
1269
|
+
GetIntrinsic('%TypeError%');
|
|
1270
|
+
GetIntrinsic('%WeakMap%', true);
|
|
1271
|
+
GetIntrinsic('%Map%', true);
|
|
1272
|
+
|
|
1273
|
+
callBound('WeakMap.prototype.get', true);
|
|
1274
|
+
callBound('WeakMap.prototype.set', true);
|
|
1275
|
+
callBound('WeakMap.prototype.has', true);
|
|
1276
|
+
callBound('Map.prototype.get', true);
|
|
1277
|
+
callBound('Map.prototype.set', true);
|
|
1278
|
+
callBound('Map.prototype.has', true);
|
|
1279
|
+
|
|
1280
|
+
((function () {
|
|
1281
|
+
var array = [];
|
|
1282
|
+
for (var i = 0; i < 256; ++i) {
|
|
1283
|
+
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
return array;
|
|
1287
|
+
})());
|
|
1288
|
+
|
|
1289
|
+
var joinHyphenCase = function joinHyphenCase() {
|
|
1290
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1291
|
+
args[_key] = arguments[_key];
|
|
1292
|
+
}
|
|
1293
|
+
return args.join(" ").replace(/\s+/g, "-").toLowerCase();
|
|
1294
|
+
};
|
|
1295
|
+
|
|
300
1296
|
var memberSelectors = {
|
|
301
1297
|
membersTab: dataCy$1("agent-nav-tab"),
|
|
302
1298
|
newButton: dataCy$1("ntm-add-member-button"),
|
|
@@ -308,8 +1304,9 @@ var memberSelectors = {
|
|
|
308
1304
|
deactivatedAgentsButton: dataCy$1("ntm-members-menubar-deactivated-block"),
|
|
309
1305
|
activatedMembersButton: dataCy$1("ntm-members-menubar-active-block"),
|
|
310
1306
|
columnCheckBox: dataCy$1("neeto-ui-columns-checkbox"),
|
|
311
|
-
|
|
312
|
-
|
|
1307
|
+
roleLabel: function roleLabel(role) {
|
|
1308
|
+
return dataCy$1("".concat(joinHyphenCase(role), "-radio-label"));
|
|
1309
|
+
},
|
|
313
1310
|
dropDownIcon: dataCy$1("ntm-members-table-row-dropdown-button"),
|
|
314
1311
|
menuBarHeading: dataCy$1("ntm-members-menubar-heading")
|
|
315
1312
|
};
|
|
@@ -336,8 +1333,7 @@ var commonTexts = {
|
|
|
336
1333
|
copiedToClipboard: "Copied to clipboard!",
|
|
337
1334
|
crossSiteScript: "<script>alert('XSS')</script>",
|
|
338
1335
|
deactivate: "Deactivate",
|
|
339
|
-
"delete": "Delete
|
|
340
|
-
delete1: "Delete",
|
|
1336
|
+
"delete": "Delete",
|
|
341
1337
|
edit: "Edit",
|
|
342
1338
|
invalidEmailMessage: "Please enter a valid email.",
|
|
343
1339
|
invalidSearchInput: "Invalid search input",
|
|
@@ -434,14 +1430,12 @@ var currentDate = function currentDate() {
|
|
|
434
1430
|
};
|
|
435
1431
|
var futureDate = function futureDate() {
|
|
436
1432
|
var numberOfDays = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
437
|
-
var
|
|
438
|
-
var date = now.add(numberOfDays, "day").format("YYYY-MM-DD");
|
|
1433
|
+
var date = dayjs().add(numberOfDays, "day").format("YYYY-MM-DD");
|
|
439
1434
|
return date;
|
|
440
1435
|
};
|
|
441
1436
|
var pastDate = function pastDate() {
|
|
442
1437
|
var numberOfDays = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
443
|
-
var
|
|
444
|
-
var date = now.subtract(numberOfDays, "day").format("YYYY-MM-DD");
|
|
1438
|
+
var date = dayjs().subtract(numberOfDays, "day").format("YYYY-MM-DD");
|
|
445
1439
|
return date;
|
|
446
1440
|
};
|
|
447
1441
|
var dateUtils = {
|
|
@@ -465,20 +1459,13 @@ var navigateToMembersPage = function navigateToMembersPage() {
|
|
|
465
1459
|
waitForRequest && cy.waitForMultipleRequest("@fetchMembers", 2);
|
|
466
1460
|
cy.get(commonSelectors.heading).should("have.text", memberTexts.activeMembersHeading);
|
|
467
1461
|
};
|
|
468
|
-
var navigateToNewMemberPanel = function navigateToNewMemberPanel() {
|
|
469
|
-
var waitForRequest = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
470
|
-
navigateToMembersPage(waitForRequest);
|
|
471
|
-
cy.get(commonSelectors.heading).should("have.text", memberTexts.activeMembersHeading);
|
|
472
|
-
cy.get(memberSelectors.newButton).should("have.text", memberTexts.addMember).click();
|
|
473
|
-
cy.get(commonSelectors.paneHeader).should("have.text", memberTexts.newHeading);
|
|
474
|
-
};
|
|
475
1462
|
var addMemberViaUI = function addMemberViaUI(email) {
|
|
476
1463
|
var role = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : memberTexts.agent;
|
|
477
|
-
cy.get(memberSelectors.newButton).should("
|
|
1464
|
+
cy.get(memberSelectors.newButton).should("have.text", memberTexts.addMember).click();
|
|
478
1465
|
cy.get(commonSelectors.paneHeader).should("have.text", memberTexts.newHeading);
|
|
479
1466
|
cy.get(memberFormSelectors.emailTextField).should("be.focused");
|
|
480
1467
|
cy.typeAndEnter(memberFormSelectors.emailTextField, email);
|
|
481
|
-
|
|
1468
|
+
cy.get(memberSelectors.roleLabel(role)).click();
|
|
482
1469
|
cy.get(memberSelectors.continueButton).click();
|
|
483
1470
|
if (isStagingEnv) {
|
|
484
1471
|
cy.get(commonSelectors.checkboxLabel).should("have.text", memberTexts.addMemberToProducts(email));
|
|
@@ -503,18 +1490,31 @@ var addMemberViaUI = function addMemberViaUI(email) {
|
|
|
503
1490
|
cy.wait("@searchRequest");
|
|
504
1491
|
cy.contains(tableSelectors.tableRow, email).should("be.visible");
|
|
505
1492
|
};
|
|
506
|
-
var
|
|
1493
|
+
var verifyMemberDetails = function verifyMemberDetails(_ref) {
|
|
507
1494
|
var email = _ref.email,
|
|
508
1495
|
role = _ref.role,
|
|
509
|
-
|
|
1496
|
+
_ref$skipSearchReques = _ref.skipSearchRequest,
|
|
1497
|
+
skipSearchRequest = _ref$skipSearchReques === void 0 ? true : _ref$skipSearchReques;
|
|
1498
|
+
!skipSearchRequest && interceptMemberApi("searchRequest");
|
|
1499
|
+
cy.clearAndTypeFast(memberSelectors.searchTextField, email);
|
|
1500
|
+
!skipSearchRequest && cy.wait("@searchRequest");
|
|
1501
|
+
return cy.contains(commonSelectors.tableRow, email).within(function () {
|
|
1502
|
+
cy.get(memberSelectors.email).should("have.text", email);
|
|
1503
|
+
role && cy.get(memberSelectors.role).should("have.text", role);
|
|
1504
|
+
});
|
|
1505
|
+
};
|
|
1506
|
+
var updateMemberRole = function updateMemberRole(_ref2) {
|
|
1507
|
+
var email = _ref2.email,
|
|
1508
|
+
role = _ref2.role,
|
|
1509
|
+
skipSearchRequest = _ref2.skipSearchRequest;
|
|
510
1510
|
verifyMemberDetails({
|
|
511
1511
|
email: email,
|
|
512
1512
|
skipSearchRequest: skipSearchRequest
|
|
513
1513
|
}).within(function () {
|
|
514
1514
|
return cy.clickDropdownOption(commonTexts.edit);
|
|
515
1515
|
});
|
|
516
|
-
cy.get(commonSelectors.paneHeader).should("have.text", memberTexts.
|
|
517
|
-
|
|
1516
|
+
cy.get(commonSelectors.paneHeader).should("have.text", memberTexts.updateMemberRole);
|
|
1517
|
+
cy.get(memberSelectors.roleLabel(role)).click();
|
|
518
1518
|
interceptMemberApi("updateAndFetchMember", 2);
|
|
519
1519
|
cy.get(memberSelectors.submitButton).click();
|
|
520
1520
|
cy.wait("@updateAndFetchMember");
|
|
@@ -522,20 +1522,7 @@ var editMember = function editMember(_ref) {
|
|
|
522
1522
|
cy.wait("@updateAndFetchMember");
|
|
523
1523
|
verifyMemberDetails({
|
|
524
1524
|
email: email,
|
|
525
|
-
role:
|
|
526
|
-
});
|
|
527
|
-
};
|
|
528
|
-
var verifyMemberDetails = function verifyMemberDetails(_ref2) {
|
|
529
|
-
var email = _ref2.email,
|
|
530
|
-
role = _ref2.role,
|
|
531
|
-
_ref2$skipSearchReque = _ref2.skipSearchRequest,
|
|
532
|
-
skipSearchRequest = _ref2$skipSearchReque === void 0 ? true : _ref2$skipSearchReque;
|
|
533
|
-
!skipSearchRequest && interceptMemberApi("searchRequest");
|
|
534
|
-
cy.clearAndTypeFast(memberSelectors.searchTextField, email);
|
|
535
|
-
!skipSearchRequest && cy.wait("@searchRequest");
|
|
536
|
-
return cy.contains(commonSelectors.tableRow, email).within(function () {
|
|
537
|
-
cy.get(memberSelectors.email).should("have.text", email);
|
|
538
|
-
role && cy.get(memberSelectors.role).should("have.text", role);
|
|
1525
|
+
role: role
|
|
539
1526
|
});
|
|
540
1527
|
};
|
|
541
1528
|
var verifyActivatedMember = function verifyActivatedMember(_ref3) {
|
|
@@ -671,14 +1658,10 @@ var memberUtils = {
|
|
|
671
1658
|
checkColumnCheckBox: checkColumnCheckBox,
|
|
672
1659
|
deactivateMember: deactivateMember,
|
|
673
1660
|
deactivateMemberViaRequest: deactivateMemberViaRequest,
|
|
674
|
-
|
|
1661
|
+
updateMemberRole: updateMemberRole,
|
|
675
1662
|
interceptMemberApi: interceptMemberApi,
|
|
676
1663
|
navigateToMembersPage: navigateToMembersPage,
|
|
677
|
-
navigateToNewMemberPanel: navigateToNewMemberPanel,
|
|
678
1664
|
unCheckColumnCheckBox: unCheckColumnCheckBox,
|
|
679
|
-
verifyActivatedMember: verifyActivatedMember,
|
|
680
|
-
verifyActivateAlert: verifyActivateAlert,
|
|
681
|
-
verifyDeactivatedMember: verifyDeactivatedMember,
|
|
682
1665
|
verifyMemberDetails: verifyMemberDetails
|
|
683
1666
|
};
|
|
684
1667
|
|