@coolon/angular-ui-powerups 12.4.0-alpha.0 → 12.4.0-alpha.10
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/assets/empty-state.scss +11 -0
- package/assets/styles.scss +1 -0
- package/bundles/coolon-angular-ui-powerups-cypress.umd.js +382 -263
- package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +241 -251
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/cypress/builder.d.ts +48 -0
- package/cypress/components/aup-abstract-activity.d.ts +8 -0
- package/cypress/components/aup-activity.d.ts +8 -0
- package/cypress/components/aup-alert.d.ts +8 -0
- package/cypress/components/aup-command-face.d.ts +7 -0
- package/cypress/components/aup-command.d.ts +6 -18
- package/cypress/components/aup-empty-state.d.ts +3 -0
- package/cypress/components/aup-input.d.ts +8 -8
- package/cypress/components/aup-modal-activity.d.ts +4 -0
- package/cypress/components/aup-modal-alert.d.ts +6 -0
- package/cypress/components/aup-table.d.ts +1 -2
- package/cypress/components/button-mixin.d.ts +3 -1
- package/cypress/components/button.d.ts +4 -2
- package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -1
- package/cypress/exports.d.ts +8 -1
- package/cypress/page-builder.d.ts +10 -0
- package/cypress/page-element.d.ts +5 -2
- package/cypress/page.d.ts +10 -32
- package/cypress/path.d.ts +1 -1
- package/esm2015/cypress/builder.js +80 -0
- package/esm2015/cypress/builder.js.map +1 -0
- package/esm2015/cypress/builder.metadata.json +1 -0
- package/esm2015/cypress/components/aup-abstract-activity.js +11 -0
- package/esm2015/cypress/components/aup-abstract-activity.js.map +1 -0
- package/esm2015/cypress/components/aup-abstract-activity.metadata.json +1 -0
- package/esm2015/cypress/components/aup-activity.js +13 -0
- package/esm2015/cypress/components/aup-activity.js.map +1 -0
- package/esm2015/cypress/components/aup-activity.metadata.json +1 -0
- package/esm2015/cypress/components/aup-alert.js +13 -0
- package/esm2015/cypress/components/aup-alert.js.map +1 -0
- package/esm2015/cypress/components/aup-alert.metadata.json +1 -0
- package/esm2015/cypress/components/aup-command-face.js +20 -18
- package/esm2015/cypress/components/aup-command-face.js.map +1 -1
- package/esm2015/cypress/components/aup-command-face.metadata.json +1 -1
- package/esm2015/cypress/components/aup-command.js +25 -9
- package/esm2015/cypress/components/aup-command.js.map +1 -1
- package/esm2015/cypress/components/aup-command.metadata.json +1 -1
- package/esm2015/cypress/components/aup-empty-state.js +4 -0
- package/esm2015/cypress/components/aup-empty-state.js.map +1 -0
- package/esm2015/cypress/components/aup-empty-state.metadata.json +1 -0
- package/esm2015/cypress/components/aup-input.js +7 -7
- package/esm2015/cypress/components/aup-input.js.map +1 -1
- package/esm2015/cypress/components/aup-modal-activity.js +7 -0
- package/esm2015/cypress/components/aup-modal-activity.js.map +1 -0
- package/esm2015/cypress/components/aup-modal-activity.metadata.json +1 -0
- package/esm2015/cypress/components/aup-modal-alert.js +12 -0
- package/esm2015/cypress/components/aup-modal-alert.js.map +1 -0
- package/esm2015/cypress/components/aup-modal-alert.metadata.json +1 -0
- package/esm2015/cypress/components/aup-table.js.map +1 -1
- package/esm2015/cypress/components/aup-table.metadata.json +1 -1
- package/esm2015/cypress/components/button.js.map +1 -1
- package/esm2015/cypress/components/button.metadata.json +1 -1
- package/esm2015/cypress/exports.js +8 -1
- package/esm2015/cypress/exports.js.map +1 -1
- package/esm2015/cypress/exports.metadata.json +1 -1
- package/esm2015/cypress/page-builder.js +20 -0
- package/esm2015/cypress/page-builder.js.map +1 -0
- package/esm2015/cypress/page-builder.metadata.json +1 -0
- package/esm2015/cypress/page-element.js +9 -3
- package/esm2015/cypress/page-element.js.map +1 -1
- package/esm2015/cypress/page-element.metadata.json +1 -1
- package/esm2015/cypress/page.js +13 -14
- package/esm2015/cypress/page.js.map +1 -1
- package/esm2015/cypress/page.metadata.json +1 -1
- package/esm2015/cypress/path.js +5 -3
- package/esm2015/cypress/path.js.map +1 -1
- package/esm2015/lib/components/empty-state/empty-state.component.js +1 -1
- package/esm2015/lib/components/empty-state/empty-state.component.metadata.json +1 -1
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +3 -9
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.metadata.json +1 -1
- package/esm2015/lib/place/url-snapshot.js +1 -7
- package/esm2015/lib/place/url-snapshot.js.map +1 -1
- package/esm2015/lib/place/url-snapshot.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups-cypress.js +284 -169
- package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +225 -235
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/package.json +1 -1
- package/cypress/section.d.ts +0 -49
- package/esm2015/cypress/section.js +0 -58
- package/esm2015/cypress/section.js.map +0 -1
- package/esm2015/cypress/section.metadata.json +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups/cypress', ['exports', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = global.coolon['angular-ui-powerups'] || {}, global.coolon['angular-ui-powerups'].cypress = {}), global.
|
|
5
|
-
}(this, (function (exports,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@coolon/typescript-utilities'), require('lodash'), require('@angular/router')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups/cypress', ['exports', '@coolon/typescript-utilities', 'lodash', '@angular/router'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = global.coolon['angular-ui-powerups'] || {}, global.coolon['angular-ui-powerups'].cypress = {}), global.typescriptUtilities, global._, global.ng.router));
|
|
5
|
+
}(this, (function (exports, typescriptUtilities, _, router) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -26,47 +26,6 @@
|
|
|
26
26
|
|
|
27
27
|
var ___namespace = /*#__PURE__*/_interopNamespace(_);
|
|
28
28
|
|
|
29
|
-
var PageElement = /** @class */ (function () {
|
|
30
|
-
function PageElement(parent, selector) {
|
|
31
|
-
this.parentElementAccessor = parent instanceof PageElement ? function () { return parent.element(); } : parent;
|
|
32
|
-
this.elementAccessStrategy = ___namespace.isString(selector) ? {
|
|
33
|
-
findIn: function (p) { return p.find(selector); },
|
|
34
|
-
shouldNotExist: function (p) { return p.should('not.have', selector); }
|
|
35
|
-
} : selector;
|
|
36
|
-
}
|
|
37
|
-
PageElement.prototype.element = function () {
|
|
38
|
-
var parent = this.getParentElement();
|
|
39
|
-
return parent ? this.elementAccessStrategy.findIn(parent) : undefined;
|
|
40
|
-
};
|
|
41
|
-
PageElement.prototype.getParentElement = function () {
|
|
42
|
-
return this.parentElementAccessor ? this.parentElementAccessor() : undefined;
|
|
43
|
-
};
|
|
44
|
-
PageElement.prototype.find = function (selector) {
|
|
45
|
-
var _this = this;
|
|
46
|
-
return new PageElement(function () { return _this.element(); }, selector);
|
|
47
|
-
};
|
|
48
|
-
PageElement.prototype.click = function (text) {
|
|
49
|
-
text ? this.element().contains(text).click() : this.element().click();
|
|
50
|
-
};
|
|
51
|
-
Object.defineProperty(PageElement.prototype, "should", {
|
|
52
|
-
get: function () {
|
|
53
|
-
return this.element().should;
|
|
54
|
-
},
|
|
55
|
-
enumerable: false,
|
|
56
|
-
configurable: true
|
|
57
|
-
});
|
|
58
|
-
PageElement.prototype.shouldBeVisible = function () {
|
|
59
|
-
this.should('be.visible');
|
|
60
|
-
};
|
|
61
|
-
PageElement.prototype.shouldNotBeVisible = function () {
|
|
62
|
-
if (!this.elementAccessStrategy.shouldNotExist) {
|
|
63
|
-
typescriptUtilities.lang.abstractMethod(this.constructor);
|
|
64
|
-
}
|
|
65
|
-
this.elementAccessStrategy.shouldNotExist(this.getParentElement());
|
|
66
|
-
};
|
|
67
|
-
return PageElement;
|
|
68
|
-
}());
|
|
69
|
-
|
|
70
29
|
/*! *****************************************************************************
|
|
71
30
|
Copyright (c) Microsoft Corporation.
|
|
72
31
|
|
|
@@ -379,140 +338,123 @@
|
|
|
379
338
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
380
339
|
}
|
|
381
340
|
|
|
382
|
-
var
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
this.
|
|
341
|
+
var PageElement = /** @class */ (function () {
|
|
342
|
+
function PageElement(parent, selector) {
|
|
343
|
+
this.parentElementAccessor = parent instanceof PageElement ? function () { return parent.element(); } : parent;
|
|
344
|
+
this.elementAccessStrategy = ___namespace.isString(selector) ? {
|
|
345
|
+
findIn: function (p) { return p.find(selector); },
|
|
346
|
+
shouldNotExist: function (p) { return p.find(selector).should('not.exist'); }
|
|
347
|
+
} : selector;
|
|
386
348
|
}
|
|
387
|
-
|
|
388
|
-
var
|
|
389
|
-
|
|
390
|
-
urlTree.root.children.primary.segments.forEach(function (s) {
|
|
391
|
-
result = Object.assign(Object.assign({}, result), s.parameters);
|
|
392
|
-
});
|
|
393
|
-
return result;
|
|
349
|
+
PageElement.prototype.element = function () {
|
|
350
|
+
var parent = this.getParentElement();
|
|
351
|
+
return parent ? this.elementAccessStrategy.findIn(parent) : undefined;
|
|
394
352
|
};
|
|
395
|
-
|
|
396
|
-
return this.
|
|
353
|
+
PageElement.prototype.getParentElement = function () {
|
|
354
|
+
return this.parentElementAccessor ? this.parentElementAccessor() : undefined;
|
|
397
355
|
};
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
function
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
return path;
|
|
425
|
-
};
|
|
426
|
-
return Segment;
|
|
427
|
-
}());
|
|
428
|
-
Path.Segment = Segment;
|
|
429
|
-
var Builder = /** @class */ (function () {
|
|
430
|
-
function Builder() {
|
|
431
|
-
this.segments = [];
|
|
356
|
+
PageElement.prototype.find = function (selector) {
|
|
357
|
+
var _this = this;
|
|
358
|
+
return new PageElement(function () { return _this.element(); }, selector);
|
|
359
|
+
};
|
|
360
|
+
PageElement.prototype.click = function (text) {
|
|
361
|
+
text ? this.element().contains(text).click() : this.element().click();
|
|
362
|
+
};
|
|
363
|
+
Object.defineProperty(PageElement.prototype, "should", {
|
|
364
|
+
get: function () {
|
|
365
|
+
return this.getShoulder(this.getShouldElement());
|
|
366
|
+
},
|
|
367
|
+
enumerable: false,
|
|
368
|
+
configurable: true
|
|
369
|
+
});
|
|
370
|
+
PageElement.prototype.getShoulder = function (element) {
|
|
371
|
+
return element.should.bind(element);
|
|
372
|
+
};
|
|
373
|
+
PageElement.prototype.getShouldElement = function () {
|
|
374
|
+
return this.element();
|
|
375
|
+
};
|
|
376
|
+
PageElement.prototype.shouldBeVisible = function () {
|
|
377
|
+
this.should('be.visible');
|
|
378
|
+
};
|
|
379
|
+
PageElement.prototype.shouldNotBeVisible = function () {
|
|
380
|
+
if (!this.elementAccessStrategy.shouldNotExist) {
|
|
381
|
+
typescriptUtilities.lang.abstractMethod(this.constructor);
|
|
432
382
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
};
|
|
438
|
-
Builder.prototype.getPath = function () {
|
|
439
|
-
return new Path(this.segments);
|
|
440
|
-
};
|
|
441
|
-
return Builder;
|
|
442
|
-
}());
|
|
443
|
-
Path.Builder = Builder;
|
|
444
|
-
})(exports.Path || (exports.Path = {}));
|
|
383
|
+
this.elementAccessStrategy.shouldNotExist(this.getParentElement());
|
|
384
|
+
};
|
|
385
|
+
return PageElement;
|
|
386
|
+
}());
|
|
445
387
|
|
|
388
|
+
var FaceAccessor = /** @class */ (function () {
|
|
389
|
+
function FaceAccessor(face) {
|
|
390
|
+
this.face = face;
|
|
391
|
+
}
|
|
392
|
+
FaceAccessor.prototype.findIn = function (parent) {
|
|
393
|
+
return this.face.text ?
|
|
394
|
+
parent.contains("aup-command-face", this.face.text()) :
|
|
395
|
+
this.face.icon ?
|
|
396
|
+
parent.find("aup-icon[ng-reflect-icon=" + this.face.icon() + "]").closest('aup-command-face') :
|
|
397
|
+
undefined;
|
|
398
|
+
};
|
|
399
|
+
FaceAccessor.prototype.shouldNotExist = function (parent) {
|
|
400
|
+
return this.face.text ?
|
|
401
|
+
parent.should('not.contain', "aup-command-face", this.face.text()) :
|
|
402
|
+
this.face.icon ?
|
|
403
|
+
parent.should('not.contain', "aup-icon[ng-reflect-icon=" + this.face.icon() + "]") :
|
|
404
|
+
undefined;
|
|
405
|
+
};
|
|
406
|
+
return FaceAccessor;
|
|
407
|
+
}());
|
|
446
408
|
var AupCommandFace = /** @class */ (function (_super) {
|
|
447
409
|
__extends(AupCommandFace, _super);
|
|
448
410
|
function AupCommandFace(parentElement, face) {
|
|
449
411
|
return _super.call(this, function () { return parentElement.element(); }, AupCommandFace.createAccessor(face)) || this;
|
|
450
412
|
}
|
|
451
413
|
AupCommandFace.createAccessor = function (face) {
|
|
452
|
-
|
|
453
|
-
var accessor = {
|
|
454
|
-
findIn: function (parent) {
|
|
455
|
-
return face.text ?
|
|
456
|
-
parent.contains("aup-command-face", face.text()) :
|
|
457
|
-
face.icon ?
|
|
458
|
-
parent.find("aup-icon[ng-reflect-icon=" + face.icon() + "]").closest('aup-command-face') :
|
|
459
|
-
undefined;
|
|
460
|
-
},
|
|
461
|
-
shouldNotExist: function (parent) {
|
|
462
|
-
return face.text ?
|
|
463
|
-
parent.should("not.contain", "aup-command-face", face.text()) :
|
|
464
|
-
face.icon ?
|
|
465
|
-
parent.should("not.contain", "aup-icon[ng-reflect-icon=" + face.icon() + "]") :
|
|
466
|
-
undefined;
|
|
467
|
-
}
|
|
468
|
-
};
|
|
469
|
-
return accessor;
|
|
414
|
+
return new FaceAccessor(face);
|
|
470
415
|
};
|
|
471
416
|
return AupCommandFace;
|
|
472
417
|
}(PageElement));
|
|
473
418
|
|
|
474
|
-
function ButtonMixin(Base) {
|
|
475
|
-
return /** @class */ (function (_super) {
|
|
476
|
-
__extends(class_1, _super);
|
|
477
|
-
function class_1() {
|
|
478
|
-
var args = [];
|
|
479
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
480
|
-
args[_i] = arguments[_i];
|
|
481
|
-
}
|
|
482
|
-
return _super.apply(this, __spreadArray([], __read(args))) || this;
|
|
483
|
-
}
|
|
484
|
-
class_1.prototype.click = function () {
|
|
485
|
-
return this.element().click();
|
|
486
|
-
};
|
|
487
|
-
class_1.prototype.shouldBeDisabled = function () {
|
|
488
|
-
this.should("be.disabled");
|
|
489
|
-
// this.should("have.css", "color", "rgba(0,0,0,0.26)")
|
|
490
|
-
};
|
|
491
|
-
return class_1;
|
|
492
|
-
}(Base));
|
|
493
|
-
}
|
|
494
|
-
|
|
495
419
|
var AupCommand = /** @class */ (function (_super) {
|
|
496
420
|
__extends(AupCommand, _super);
|
|
497
|
-
function AupCommand(
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
421
|
+
function AupCommand(parent, faceOrSelector) {
|
|
422
|
+
return _super.call(this, parent, {
|
|
423
|
+
findIn: function (parentElement) {
|
|
424
|
+
if (___namespace.isString(faceOrSelector)) {
|
|
425
|
+
return parentElement.find(faceOrSelector);
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
return AupCommandFace.createAccessor(faceOrSelector).findIn(parentElement).closest('aup-command');
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
shouldNotExist: function (parentElement) {
|
|
432
|
+
this.findIn(parentElement).should("not.exist");
|
|
503
433
|
}
|
|
504
434
|
}) || this;
|
|
505
|
-
return _this;
|
|
506
435
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
436
|
+
AupCommand.prototype.click = function () {
|
|
437
|
+
this.getButton().click();
|
|
438
|
+
};
|
|
439
|
+
AupCommand.prototype.getShouldElement = function () {
|
|
440
|
+
return this.getButton();
|
|
441
|
+
};
|
|
442
|
+
AupCommand.prototype.shouldBeDisabled = function () {
|
|
443
|
+
this.getButton().should('be.disabled');
|
|
444
|
+
};
|
|
445
|
+
AupCommand.prototype.getButton = function () {
|
|
446
|
+
return this.element().find('button');
|
|
447
|
+
};
|
|
514
448
|
return AupCommand;
|
|
515
|
-
}(
|
|
449
|
+
}(PageElement));
|
|
450
|
+
|
|
451
|
+
var AupEmptyState = /** @class */ (function (_super) {
|
|
452
|
+
__extends(AupEmptyState, _super);
|
|
453
|
+
function AupEmptyState() {
|
|
454
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
455
|
+
}
|
|
456
|
+
return AupEmptyState;
|
|
457
|
+
}(PageElement));
|
|
516
458
|
|
|
517
459
|
exports.AupInput = /** @class */ (function (_super) {
|
|
518
460
|
__extends(AupInput, _super);
|
|
@@ -530,21 +472,21 @@
|
|
|
530
472
|
};
|
|
531
473
|
Object.defineProperty(AupInput.prototype, "labelShould", {
|
|
532
474
|
get: function () {
|
|
533
|
-
return this.label()
|
|
475
|
+
return this.getShoulder(this.label());
|
|
534
476
|
},
|
|
535
477
|
enumerable: false,
|
|
536
478
|
configurable: true
|
|
537
479
|
});
|
|
538
480
|
Object.defineProperty(AupInput.prototype, "hintShould", {
|
|
539
481
|
get: function () {
|
|
540
|
-
return this.hint()
|
|
482
|
+
return this.getShoulder(this.hint());
|
|
541
483
|
},
|
|
542
484
|
enumerable: false,
|
|
543
485
|
configurable: true
|
|
544
486
|
});
|
|
545
487
|
Object.defineProperty(AupInput.prototype, "errorShould", {
|
|
546
488
|
get: function () {
|
|
547
|
-
return this.error()
|
|
489
|
+
return this.getShoulder(this.error());
|
|
548
490
|
},
|
|
549
491
|
enumerable: false,
|
|
550
492
|
configurable: true
|
|
@@ -578,13 +520,9 @@
|
|
|
578
520
|
input.type("" + value);
|
|
579
521
|
this.input().should('have.value', "" + value);
|
|
580
522
|
};
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
},
|
|
585
|
-
enumerable: false,
|
|
586
|
-
configurable: true
|
|
587
|
-
});
|
|
523
|
+
HtmlInput.prototype.getShouldElement = function () {
|
|
524
|
+
return this.input();
|
|
525
|
+
};
|
|
588
526
|
return HtmlInput;
|
|
589
527
|
}(AupInput));
|
|
590
528
|
AupInput.HtmlInput = HtmlInput;
|
|
@@ -593,13 +531,9 @@
|
|
|
593
531
|
function TextAreaInput() {
|
|
594
532
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
595
533
|
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
},
|
|
600
|
-
enumerable: false,
|
|
601
|
-
configurable: true
|
|
602
|
-
});
|
|
534
|
+
TextAreaInput.prototype.getShouldElement = function () {
|
|
535
|
+
return this.input();
|
|
536
|
+
};
|
|
603
537
|
TextAreaInput.prototype.input = function () {
|
|
604
538
|
return this.element().find('textarea');
|
|
605
539
|
};
|
|
@@ -686,6 +620,27 @@
|
|
|
686
620
|
AupTable.Cell = Cell;
|
|
687
621
|
})(exports.AupTable || (exports.AupTable = {}));
|
|
688
622
|
|
|
623
|
+
function ButtonMixin(Base) {
|
|
624
|
+
return /** @class */ (function (_super) {
|
|
625
|
+
__extends(class_1, _super);
|
|
626
|
+
function class_1() {
|
|
627
|
+
var args = [];
|
|
628
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
629
|
+
args[_i] = arguments[_i];
|
|
630
|
+
}
|
|
631
|
+
return _super.apply(this, __spreadArray([], __read(args))) || this;
|
|
632
|
+
}
|
|
633
|
+
class_1.prototype.click = function () {
|
|
634
|
+
return this.element().click();
|
|
635
|
+
};
|
|
636
|
+
class_1.prototype.shouldBeDisabled = function () {
|
|
637
|
+
this.should("be.disabled");
|
|
638
|
+
// this.should("have.css", "color", "rgba(0,0,0,0.26)")
|
|
639
|
+
};
|
|
640
|
+
return class_1;
|
|
641
|
+
}(Base));
|
|
642
|
+
}
|
|
643
|
+
|
|
689
644
|
var Button = /** @class */ (function (_super) {
|
|
690
645
|
__extends(Button, _super);
|
|
691
646
|
function Button(parentElementAccessor, buttonText) {
|
|
@@ -701,78 +656,240 @@
|
|
|
701
656
|
return Button;
|
|
702
657
|
}(ButtonMixin(PageElement)));
|
|
703
658
|
|
|
704
|
-
exports.
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
659
|
+
exports.Builder = /** @class */ (function () {
|
|
660
|
+
function Builder(source) {
|
|
661
|
+
this.source = source;
|
|
662
|
+
this._sectionFactory = Builder.createFactoryMethod(this.source, PageElement);
|
|
663
|
+
this.aupEmptyState = Builder.createFactoryMethod(this.source, AupEmptyState, 'aup-empty-state');
|
|
664
|
+
}
|
|
665
|
+
Builder.prototype.find = function (selector) {
|
|
666
|
+
return new PageElement(this.source, selector);
|
|
667
|
+
};
|
|
668
|
+
Builder.prototype.section = function (selector, builder) {
|
|
669
|
+
return this._sectionFactory(selector, builder);
|
|
670
|
+
};
|
|
671
|
+
Builder.prototype.contains = function (text) {
|
|
672
|
+
return new PageElement(this.source, {
|
|
673
|
+
findIn: function (parent) { return parent.contains(text); },
|
|
674
|
+
shouldNotExist: function (parent) { return parent.should('not.contain', text); }
|
|
675
|
+
});
|
|
676
|
+
};
|
|
677
|
+
Builder.prototype.button = function (text) {
|
|
678
|
+
return new Button(this.source, text);
|
|
679
|
+
};
|
|
680
|
+
Builder.prototype.aupStringInput = function (selector) {
|
|
681
|
+
return new exports.AupInput.HtmlInput(this.source, selector !== null && selector !== void 0 ? selector : 'aup-string-input');
|
|
682
|
+
};
|
|
683
|
+
Builder.prototype.aupTextInput = function (selector) {
|
|
684
|
+
return new exports.AupInput.TextAreaInput(this.source, selector !== null && selector !== void 0 ? selector : 'aup-text-input');
|
|
685
|
+
};
|
|
686
|
+
Builder.prototype.aupPasswordInput = function (selector) {
|
|
687
|
+
return new exports.AupInput.HtmlInput(this.source, selector !== null && selector !== void 0 ? selector : 'aup-password-input');
|
|
688
|
+
};
|
|
689
|
+
Builder.prototype.aupNumberInput = function (selector) {
|
|
690
|
+
return new exports.AupInput.HtmlInput(this.source, selector !== null && selector !== void 0 ? selector : 'aup-number-input');
|
|
691
|
+
};
|
|
692
|
+
Builder.prototype.aupCommand = function (faceOrSelector) {
|
|
693
|
+
return new AupCommand(this.source, faceOrSelector);
|
|
694
|
+
};
|
|
695
|
+
Builder.prototype.aupTabbedNavigation = function () {
|
|
696
|
+
return new AupNavigation(this.source, 'aup-tabbed-place-navigation');
|
|
697
|
+
};
|
|
698
|
+
Builder.prototype.aupSideNavigation = function () {
|
|
699
|
+
return new AupNavigation(this.source, 'aup-list-place-nav');
|
|
700
|
+
};
|
|
701
|
+
Builder.prototype.aupTable = function (selector) {
|
|
702
|
+
return new exports.AupTable(this.source, selector !== null && selector !== void 0 ? selector : 'aup-table');
|
|
703
|
+
};
|
|
704
|
+
return Builder;
|
|
705
|
+
}());
|
|
706
|
+
(function (Builder) {
|
|
707
|
+
var Factory = /** @class */ (function () {
|
|
708
|
+
function Factory(parent, klass, defaultSelector) {
|
|
709
|
+
this.parent = parent;
|
|
710
|
+
this.klass = klass;
|
|
711
|
+
this.defaultSelector = defaultSelector;
|
|
712
|
+
}
|
|
713
|
+
Factory.prototype.create = function (selectorOrBuilder, optionalBuilder) {
|
|
714
|
+
var selector = ___namespace.isFunction(selectorOrBuilder) ? this.defaultSelector : selectorOrBuilder;
|
|
715
|
+
if (!selector) {
|
|
716
|
+
typescriptUtilities.lang.illegalState('This element requires a selector but none was provided');
|
|
711
717
|
}
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
718
|
+
var callback = ___namespace.isFunction(selectorOrBuilder) ? selectorOrBuilder : optionalBuilder;
|
|
719
|
+
var element = new this.klass(this.parent, selector);
|
|
720
|
+
return callback ? typescriptUtilities.Mixin.createProxy(element, callback(new Builder(this.parent))) : element;
|
|
721
|
+
};
|
|
722
|
+
return Factory;
|
|
723
|
+
}());
|
|
724
|
+
Builder.Factory = Factory;
|
|
725
|
+
function createFactoryMethod(element, klass, defaultSelector) {
|
|
726
|
+
var factory = new Factory(element, klass, defaultSelector);
|
|
727
|
+
return factory.create.bind(factory);
|
|
728
|
+
}
|
|
729
|
+
Builder.createFactoryMethod = createFactoryMethod;
|
|
730
|
+
})(exports.Builder || (exports.Builder = {}));
|
|
731
|
+
|
|
732
|
+
var AupAbstractActivity = /** @class */ (function (_super) {
|
|
733
|
+
__extends(AupAbstractActivity, _super);
|
|
734
|
+
function AupAbstractActivity(parent, selector) {
|
|
735
|
+
var _this = _super.call(this, parent, selector) || this;
|
|
736
|
+
_this.title = _this.find('aup-activity-title');
|
|
737
|
+
_this._confirmCommand = new exports.Builder(_this).aupCommand('[data-cy=confirm-command]');
|
|
738
|
+
_this._cancelCommand = new exports.Builder(_this).aupCommand('[data-cy=cancel-command]');
|
|
739
|
+
return _this;
|
|
740
|
+
}
|
|
741
|
+
return AupAbstractActivity;
|
|
742
|
+
}(PageElement));
|
|
743
|
+
|
|
744
|
+
var AupActivity = /** @class */ (function (_super) {
|
|
745
|
+
__extends(AupActivity, _super);
|
|
746
|
+
function AupActivity(parent, selector) {
|
|
747
|
+
return _super.call(this, parent, selector) || this;
|
|
748
|
+
}
|
|
749
|
+
Object.defineProperty(AupActivity.prototype, "confirmCommand", {
|
|
750
|
+
get: function () {
|
|
751
|
+
return this._confirmCommand;
|
|
752
|
+
},
|
|
753
|
+
enumerable: false,
|
|
754
|
+
configurable: true
|
|
755
|
+
});
|
|
756
|
+
Object.defineProperty(AupActivity.prototype, "cancelCommand", {
|
|
757
|
+
get: function () {
|
|
758
|
+
return this._cancelCommand;
|
|
759
|
+
},
|
|
760
|
+
enumerable: false,
|
|
761
|
+
configurable: true
|
|
762
|
+
});
|
|
763
|
+
return AupActivity;
|
|
764
|
+
}(AupAbstractActivity));
|
|
765
|
+
|
|
766
|
+
var AupModalActivity = /** @class */ (function (_super) {
|
|
767
|
+
__extends(AupModalActivity, _super);
|
|
768
|
+
function AupModalActivity() {
|
|
769
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
770
|
+
}
|
|
771
|
+
AupModalActivity.prototype.clickBackdrop = function () {
|
|
772
|
+
this.element().closest(".cdk-overlay-backdrop").click(-50, -50, { force: true });
|
|
773
|
+
};
|
|
774
|
+
return AupModalActivity;
|
|
775
|
+
}(AupActivity));
|
|
776
|
+
|
|
777
|
+
var AupAlert = /** @class */ (function (_super) {
|
|
778
|
+
__extends(AupAlert, _super);
|
|
779
|
+
function AupAlert(parent, selector) {
|
|
780
|
+
return _super.call(this, parent, selector) || this;
|
|
781
|
+
}
|
|
782
|
+
Object.defineProperty(AupAlert.prototype, "closeCommand", {
|
|
783
|
+
get: function () {
|
|
784
|
+
return this._confirmCommand;
|
|
785
|
+
},
|
|
786
|
+
enumerable: false,
|
|
787
|
+
configurable: true
|
|
788
|
+
});
|
|
789
|
+
AupAlert.prototype.clickClose = function () {
|
|
790
|
+
this.closeCommand.click();
|
|
791
|
+
};
|
|
792
|
+
return AupAlert;
|
|
793
|
+
}(AupAbstractActivity));
|
|
794
|
+
|
|
795
|
+
var AupModalAlert = /** @class */ (function (_super) {
|
|
796
|
+
__extends(AupModalAlert, _super);
|
|
797
|
+
function AupModalAlert(parent, selector) {
|
|
798
|
+
return _super.call(this, parent, selector) || this;
|
|
799
|
+
}
|
|
800
|
+
AupModalAlert.prototype.clickBackdrop = function () {
|
|
801
|
+
this.element()
|
|
802
|
+
.closest(".cdk-overlay-container")
|
|
803
|
+
.find(".cdk-overlay-backdrop").click(-50, -50, { force: true });
|
|
804
|
+
};
|
|
805
|
+
return AupModalAlert;
|
|
806
|
+
}(AupAlert));
|
|
807
|
+
|
|
808
|
+
var PageBuilder = /** @class */ (function (_super) {
|
|
809
|
+
__extends(PageBuilder, _super);
|
|
810
|
+
function PageBuilder() {
|
|
811
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
812
|
+
_this._modalInteractionFactory = exports.Builder.createFactoryMethod(_this.source, AupModalActivity);
|
|
813
|
+
_this._modalAlertFactory = exports.Builder.createFactoryMethod(_this.source, AupModalAlert);
|
|
814
|
+
return _this;
|
|
815
|
+
}
|
|
816
|
+
PageBuilder.prototype.aupModalActivity = function (selector, builder) {
|
|
817
|
+
return this._modalInteractionFactory(".dialog-interaction-context " + selector, builder);
|
|
818
|
+
};
|
|
819
|
+
PageBuilder.prototype.aupModalAlert = function (builder) {
|
|
820
|
+
return this._modalAlertFactory(".dialog-interaction-context aup-alert-dialog", builder);
|
|
821
|
+
};
|
|
822
|
+
PageBuilder.prototype.aupModelConfirm = function (builder) {
|
|
823
|
+
return this._modalInteractionFactory(".dialog-interaction-context aup-confirm-dialog", builder);
|
|
824
|
+
};
|
|
825
|
+
return PageBuilder;
|
|
826
|
+
}(exports.Builder));
|
|
827
|
+
|
|
828
|
+
var urlSerialiser = new router.DefaultUrlSerializer();
|
|
829
|
+
exports.Path = /** @class */ (function () {
|
|
830
|
+
function Path(segments) {
|
|
831
|
+
this.segments = segments;
|
|
832
|
+
}
|
|
833
|
+
Path.extractVisitParameters = function (url) {
|
|
834
|
+
var _a, _b;
|
|
835
|
+
var result = {};
|
|
836
|
+
var urlTree = urlSerialiser.parse(url);
|
|
837
|
+
var urlSegments = (_b = (_a = urlTree.root.children.primary) === null || _a === void 0 ? void 0 : _a.segments) !== null && _b !== void 0 ? _b : [];
|
|
838
|
+
urlSegments === null || urlSegments === void 0 ? void 0 : urlSegments.forEach(function (s) {
|
|
839
|
+
result = Object.assign(Object.assign({}, result), s.parameters);
|
|
840
|
+
});
|
|
841
|
+
return result;
|
|
842
|
+
};
|
|
843
|
+
Path.prototype.toUrl = function (matrixParams) {
|
|
844
|
+
return this.segments.map(function (s) { return s.toUrlPart(matrixParams); }).join('/');
|
|
845
|
+
};
|
|
846
|
+
return Path;
|
|
847
|
+
}());
|
|
848
|
+
(function (Path) {
|
|
849
|
+
function setUrlSerialiser(serialiser) {
|
|
850
|
+
urlSerialiser = serialiser;
|
|
851
|
+
}
|
|
852
|
+
Path.setUrlSerialiser = setUrlSerialiser;
|
|
853
|
+
var Segment = /** @class */ (function () {
|
|
854
|
+
function Segment(path, params) {
|
|
855
|
+
if (params === void 0) { params = {}; }
|
|
856
|
+
var _a;
|
|
857
|
+
this.path = path;
|
|
858
|
+
this.routeId = params === null || params === void 0 ? void 0 : params.routeId;
|
|
859
|
+
this.visitParams = (_a = params === null || params === void 0 ? void 0 : params.visitParams) !== null && _a !== void 0 ? _a : [];
|
|
772
860
|
}
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
861
|
+
Segment.prototype.toUrlPart = function (params) {
|
|
862
|
+
var path = this.path;
|
|
863
|
+
this.visitParams.forEach(function (p) {
|
|
864
|
+
var value = params[p];
|
|
865
|
+
if (value) {
|
|
866
|
+
path = path + ";" + p + "=" + value;
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
if (this.routeId && params[this.routeId]) {
|
|
870
|
+
path = path + '/' + params[this.routeId];
|
|
871
|
+
}
|
|
872
|
+
return path;
|
|
873
|
+
};
|
|
874
|
+
return Segment;
|
|
875
|
+
}());
|
|
876
|
+
Path.Segment = Segment;
|
|
877
|
+
var Builder = /** @class */ (function () {
|
|
878
|
+
function Builder() {
|
|
879
|
+
this.segments = [];
|
|
880
|
+
}
|
|
881
|
+
Builder.prototype.segment = function (name, params) {
|
|
882
|
+
var builder = new Segment(name, params);
|
|
883
|
+
this.segments.push(builder);
|
|
884
|
+
return this;
|
|
885
|
+
};
|
|
886
|
+
Builder.prototype.getPath = function () {
|
|
887
|
+
return new Path(this.segments);
|
|
888
|
+
};
|
|
889
|
+
return Builder;
|
|
890
|
+
}());
|
|
891
|
+
Path.Builder = Builder;
|
|
892
|
+
})(exports.Path || (exports.Path = {}));
|
|
776
893
|
|
|
777
894
|
exports.Page = /** @class */ (function (_super) {
|
|
778
895
|
__extends(Page, _super);
|
|
@@ -785,12 +902,14 @@
|
|
|
785
902
|
Page.prototype.element = function () {
|
|
786
903
|
return cy.get(this.rootElementSelector);
|
|
787
904
|
};
|
|
788
|
-
Page.prototype.visit = function (
|
|
789
|
-
this.tryAndVisit(
|
|
790
|
-
this.shouldBeActive(
|
|
905
|
+
Page.prototype.visit = function (visitParams, queryParams) {
|
|
906
|
+
this.tryAndVisit(visitParams, queryParams);
|
|
907
|
+
this.shouldBeActive(visitParams);
|
|
791
908
|
};
|
|
792
|
-
Page.prototype.tryAndVisit = function (params) {
|
|
793
|
-
|
|
909
|
+
Page.prototype.tryAndVisit = function (params, queryParams) {
|
|
910
|
+
var path = this.path.toUrl(params !== null && params !== void 0 ? params : {});
|
|
911
|
+
var queryString = queryParams ? "?" + new URLSearchParams(queryParams).toString() : '';
|
|
912
|
+
cy.visit("/" + path + queryString);
|
|
794
913
|
};
|
|
795
914
|
Page.prototype.shouldHaveActivityIds = function () {
|
|
796
915
|
var ids = [];
|
|
@@ -807,8 +926,8 @@
|
|
|
807
926
|
};
|
|
808
927
|
Page.prototype.shouldBeActive = function (withParameters) {
|
|
809
928
|
// Note: cy.window() doesn't return a promise... it's a chainable.
|
|
810
|
-
cy
|
|
811
|
-
cy
|
|
929
|
+
cy['waitUntil'](function () {
|
|
930
|
+
return cy.window().then(function (window) {
|
|
812
931
|
return window['aup.PlaceRouter'] && !window['aup.PlaceRouter'].isNavigating();
|
|
813
932
|
});
|
|
814
933
|
});
|
|
@@ -829,23 +948,15 @@
|
|
|
829
948
|
function create(pathOrPathBuilder, page) {
|
|
830
949
|
var pathBuilder = new exports.Path.Builder();
|
|
831
950
|
if (___namespace.isString(pathOrPathBuilder)) {
|
|
832
|
-
pathOrPathBuilder.split(
|
|
951
|
+
pathOrPathBuilder.split('/').filter(function (p) { return !___namespace.isEmpty(p); }).forEach(function (p) { return pathBuilder.segment(p); });
|
|
833
952
|
}
|
|
834
953
|
else {
|
|
835
954
|
pathOrPathBuilder(pathBuilder);
|
|
836
955
|
}
|
|
837
|
-
var
|
|
838
|
-
return typescriptUtilities.Mixin.createProxy(page(
|
|
956
|
+
var instance = new Page(pathBuilder.getPath());
|
|
957
|
+
return typescriptUtilities.Mixin.createProxy(page(new PageBuilder(instance)), instance);
|
|
839
958
|
}
|
|
840
959
|
Page.create = create;
|
|
841
|
-
var PageBuilder = /** @class */ (function (_super) {
|
|
842
|
-
__extends(PageBuilder, _super);
|
|
843
|
-
function PageBuilder() {
|
|
844
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
845
|
-
}
|
|
846
|
-
return PageBuilder;
|
|
847
|
-
}(exports.Section.Mixin(Page)));
|
|
848
|
-
Page.PageBuilder = PageBuilder;
|
|
849
960
|
})(exports.Page || (exports.Page = {}));
|
|
850
961
|
|
|
851
962
|
var AupCommandGroup = /** @class */ (function (_super) {
|
|
@@ -908,15 +1019,23 @@
|
|
|
908
1019
|
* Generated bundle index. Do not edit.
|
|
909
1020
|
*/
|
|
910
1021
|
|
|
1022
|
+
exports.AupAbstractActivity = AupAbstractActivity;
|
|
1023
|
+
exports.AupActivity = AupActivity;
|
|
1024
|
+
exports.AupAlert = AupAlert;
|
|
911
1025
|
exports.AupCommand = AupCommand;
|
|
912
1026
|
exports.AupCommandFace = AupCommandFace;
|
|
913
1027
|
exports.AupCommandGroup = AupCommandGroup;
|
|
1028
|
+
exports.AupEmptyState = AupEmptyState;
|
|
1029
|
+
exports.AupModalActivity = AupModalActivity;
|
|
1030
|
+
exports.AupModalAlert = AupModalAlert;
|
|
914
1031
|
exports.AupMoreMenu = AupMoreMenu;
|
|
915
1032
|
exports.AupNavigation = AupNavigation;
|
|
916
1033
|
exports.AupPopupMenu = AupPopupMenu;
|
|
917
1034
|
exports.AupToolBar = AupToolBar;
|
|
918
1035
|
exports.Button = Button;
|
|
919
1036
|
exports.ButtonMixin = ButtonMixin;
|
|
1037
|
+
exports.FaceAccessor = FaceAccessor;
|
|
1038
|
+
exports.PageBuilder = PageBuilder;
|
|
920
1039
|
exports.PageElement = PageElement;
|
|
921
1040
|
|
|
922
1041
|
Object.defineProperty(exports, '__esModule', { value: true });
|