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