@coolon/angular-ui-powerups 12.4.0-alpha.19 → 12.4.0-alpha.2

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.
Files changed (146) hide show
  1. package/assets/styles.scss +0 -1
  2. package/bundles/coolon-angular-ui-powerups-cypress.umd.js +267 -626
  3. package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.js +11 -7
  5. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/cypress/components/aup-command-face.d.ts +4 -5
  8. package/cypress/components/aup-command.d.ts +1 -1
  9. package/cypress/components/aup-input.d.ts +5 -11
  10. package/cypress/components/aup-popup-menu.d.ts +2 -1
  11. package/cypress/components/aup-table.d.ts +16 -5
  12. package/cypress/components/button-mixin.d.ts +19 -0
  13. package/cypress/components/button.d.ts +7 -9
  14. package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -1
  15. package/cypress/exports.d.ts +2 -18
  16. package/cypress/page-element.d.ts +10 -9
  17. package/cypress/page.d.ts +33 -5
  18. package/cypress/section.d.ts +51 -0
  19. package/esm2015/cypress/components/aup-command-face.js +6 -6
  20. package/esm2015/cypress/components/aup-command-face.js.map +1 -1
  21. package/esm2015/cypress/components/aup-command-face.metadata.json +1 -1
  22. package/esm2015/cypress/components/aup-command.js +4 -12
  23. package/esm2015/cypress/components/aup-command.js.map +1 -1
  24. package/esm2015/cypress/components/aup-command.metadata.json +1 -1
  25. package/esm2015/cypress/components/aup-input.js +5 -17
  26. package/esm2015/cypress/components/aup-input.js.map +1 -1
  27. package/esm2015/cypress/components/aup-input.metadata.json +1 -1
  28. package/esm2015/cypress/components/aup-navigation.js +1 -1
  29. package/esm2015/cypress/components/aup-navigation.js.map +1 -1
  30. package/esm2015/cypress/components/aup-popup-menu.js +3 -3
  31. package/esm2015/cypress/components/aup-popup-menu.js.map +1 -1
  32. package/esm2015/cypress/components/aup-popup-menu.metadata.json +1 -1
  33. package/esm2015/cypress/components/aup-table.js +33 -5
  34. package/esm2015/cypress/components/aup-table.js.map +1 -1
  35. package/esm2015/cypress/components/aup-table.metadata.json +1 -1
  36. package/esm2015/cypress/components/button-mixin.js +15 -0
  37. package/esm2015/cypress/components/button-mixin.js.map +1 -0
  38. package/esm2015/cypress/components/button-mixin.metadata.json +1 -0
  39. package/esm2015/cypress/components/button.js +10 -4
  40. package/esm2015/cypress/components/button.js.map +1 -1
  41. package/esm2015/cypress/components/button.metadata.json +1 -1
  42. package/esm2015/cypress/exports.js +2 -18
  43. package/esm2015/cypress/exports.js.map +1 -1
  44. package/esm2015/cypress/exports.metadata.json +1 -1
  45. package/esm2015/cypress/page-element.js +18 -21
  46. package/esm2015/cypress/page-element.js.map +1 -1
  47. package/esm2015/cypress/page-element.metadata.json +1 -1
  48. package/esm2015/cypress/page.js +10 -8
  49. package/esm2015/cypress/page.js.map +1 -1
  50. package/esm2015/cypress/page.metadata.json +1 -1
  51. package/esm2015/cypress/path.js +1 -3
  52. package/esm2015/cypress/path.js.map +1 -1
  53. package/esm2015/cypress/section.js +58 -0
  54. package/esm2015/cypress/section.js.map +1 -0
  55. package/esm2015/cypress/section.metadata.json +1 -0
  56. package/esm2015/lib/components/empty-state/empty-state.component.js +1 -1
  57. package/esm2015/lib/components/empty-state/empty-state.component.metadata.json +1 -1
  58. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js +4 -4
  59. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js.map +1 -1
  60. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.metadata.json +1 -1
  61. package/esm2015/lib/components/tables/tree-table/tree-table-model.js +0 -1
  62. package/esm2015/lib/components/tables/tree-table/tree-table-model.js.map +1 -1
  63. package/esm2015/lib/components/tables/tree-table/tree-table-model.metadata.json +1 -1
  64. package/esm2015/lib/place/url-snapshot.js +7 -1
  65. package/esm2015/lib/place/url-snapshot.js.map +1 -1
  66. package/esm2015/lib/place/url-snapshot.metadata.json +1 -1
  67. package/fesm2015/coolon-angular-ui-powerups-cypress.js +185 -476
  68. package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
  69. package/fesm2015/coolon-angular-ui-powerups.js +11 -7
  70. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  71. package/lib/components/tables/tree-table/flattened-tree-list-model.d.ts +1 -0
  72. package/lib/components/tables/tree-table/tree-table-model.d.ts +5 -4
  73. package/package.json +1 -1
  74. package/assets/empty-state.scss +0 -11
  75. package/cypress/builder.d.ts +0 -43
  76. package/cypress/components/aup-abstract-activity.d.ts +0 -9
  77. package/cypress/components/aup-abstract-table.d.ts +0 -18
  78. package/cypress/components/aup-activity.d.ts +0 -9
  79. package/cypress/components/aup-alert.d.ts +0 -9
  80. package/cypress/components/aup-empty-state.d.ts +0 -4
  81. package/cypress/components/aup-modal-activity.d.ts +0 -4
  82. package/cypress/components/aup-modal-alert.d.ts +0 -7
  83. package/cypress/components/aup-tree-table.d.ts +0 -16
  84. package/cypress/components/form-element-mixin.d.ts +0 -20
  85. package/cypress/components/mat-checkbox.d.ts +0 -29
  86. package/cypress/components/table/aup-table-cell.d.ts +0 -9
  87. package/cypress/components/table/aup-table-column.d.ts +0 -10
  88. package/cypress/components/table/aup-table-row.d.ts +0 -17
  89. package/cypress/components/table/aup-table-selection-cell.d.ts +0 -5
  90. package/cypress/components/table/aup-table-selection-column.d.ts +0 -5
  91. package/cypress/element-locator.d.ts +0 -10
  92. package/cypress/page-builder.d.ts +0 -8
  93. package/esm2015/cypress/builder.js +0 -101
  94. package/esm2015/cypress/builder.js.map +0 -1
  95. package/esm2015/cypress/builder.metadata.json +0 -1
  96. package/esm2015/cypress/components/aup-abstract-activity.js +0 -12
  97. package/esm2015/cypress/components/aup-abstract-activity.js.map +0 -1
  98. package/esm2015/cypress/components/aup-abstract-activity.metadata.json +0 -1
  99. package/esm2015/cypress/components/aup-abstract-table.js +0 -54
  100. package/esm2015/cypress/components/aup-abstract-table.js.map +0 -1
  101. package/esm2015/cypress/components/aup-abstract-table.metadata.json +0 -1
  102. package/esm2015/cypress/components/aup-activity.js +0 -13
  103. package/esm2015/cypress/components/aup-activity.js.map +0 -1
  104. package/esm2015/cypress/components/aup-activity.metadata.json +0 -1
  105. package/esm2015/cypress/components/aup-alert.js +0 -13
  106. package/esm2015/cypress/components/aup-alert.js.map +0 -1
  107. package/esm2015/cypress/components/aup-alert.metadata.json +0 -1
  108. package/esm2015/cypress/components/aup-empty-state.js +0 -7
  109. package/esm2015/cypress/components/aup-empty-state.js.map +0 -1
  110. package/esm2015/cypress/components/aup-empty-state.metadata.json +0 -1
  111. package/esm2015/cypress/components/aup-modal-activity.js +0 -7
  112. package/esm2015/cypress/components/aup-modal-activity.js.map +0 -1
  113. package/esm2015/cypress/components/aup-modal-activity.metadata.json +0 -1
  114. package/esm2015/cypress/components/aup-modal-alert.js +0 -12
  115. package/esm2015/cypress/components/aup-modal-alert.js.map +0 -1
  116. package/esm2015/cypress/components/aup-modal-alert.metadata.json +0 -1
  117. package/esm2015/cypress/components/aup-tree-table.js +0 -34
  118. package/esm2015/cypress/components/aup-tree-table.js.map +0 -1
  119. package/esm2015/cypress/components/aup-tree-table.metadata.json +0 -1
  120. package/esm2015/cypress/components/form-element-mixin.js +0 -11
  121. package/esm2015/cypress/components/form-element-mixin.js.map +0 -1
  122. package/esm2015/cypress/components/form-element-mixin.metadata.json +0 -1
  123. package/esm2015/cypress/components/mat-checkbox.js +0 -34
  124. package/esm2015/cypress/components/mat-checkbox.js.map +0 -1
  125. package/esm2015/cypress/components/mat-checkbox.metadata.json +0 -1
  126. package/esm2015/cypress/components/table/aup-table-cell.js +0 -18
  127. package/esm2015/cypress/components/table/aup-table-cell.js.map +0 -1
  128. package/esm2015/cypress/components/table/aup-table-cell.metadata.json +0 -1
  129. package/esm2015/cypress/components/table/aup-table-column.js +0 -21
  130. package/esm2015/cypress/components/table/aup-table-column.js.map +0 -1
  131. package/esm2015/cypress/components/table/aup-table-column.metadata.json +0 -1
  132. package/esm2015/cypress/components/table/aup-table-row.js +0 -30
  133. package/esm2015/cypress/components/table/aup-table-row.js.map +0 -1
  134. package/esm2015/cypress/components/table/aup-table-row.metadata.json +0 -1
  135. package/esm2015/cypress/components/table/aup-table-selection-cell.js +0 -6
  136. package/esm2015/cypress/components/table/aup-table-selection-cell.js.map +0 -1
  137. package/esm2015/cypress/components/table/aup-table-selection-cell.metadata.json +0 -1
  138. package/esm2015/cypress/components/table/aup-table-selection-column.js +0 -6
  139. package/esm2015/cypress/components/table/aup-table-selection-column.js.map +0 -1
  140. package/esm2015/cypress/components/table/aup-table-selection-column.metadata.json +0 -1
  141. package/esm2015/cypress/element-locator.js +0 -22
  142. package/esm2015/cypress/element-locator.js.map +0 -1
  143. package/esm2015/cypress/element-locator.metadata.json +0 -1
  144. package/esm2015/cypress/page-builder.js +0 -15
  145. package/esm2015/cypress/page-builder.js.map +0 -1
  146. package/esm2015/cypress/page-builder.metadata.json +0 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@coolon/typescript-utilities'), require('lodash'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('@angular/router')) :
3
- typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups/cypress', ['exports', '@coolon/typescript-utilities', 'lodash', '@typescript-plus/fast-memoize-decorator/dist/src', '@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.src, global.ng.router));
5
- }(this, (function (exports, typescriptUtilities, _, src, router) { 'use strict';
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,6 +26,53 @@
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.getShoulder(this.getShouldElement());
54
+ },
55
+ enumerable: false,
56
+ configurable: true
57
+ });
58
+ PageElement.prototype.getShoulder = function (element) {
59
+ return element.should.bind(element);
60
+ };
61
+ PageElement.prototype.getShouldElement = function () {
62
+ return this.element();
63
+ };
64
+ PageElement.prototype.shouldBeVisible = function () {
65
+ this.should('be.visible');
66
+ };
67
+ PageElement.prototype.shouldNotBeVisible = function () {
68
+ if (!this.elementAccessStrategy.shouldNotExist) {
69
+ typescriptUtilities.lang.abstractMethod(this.constructor);
70
+ }
71
+ this.elementAccessStrategy.shouldNotExist(this.getParentElement());
72
+ };
73
+ return PageElement;
74
+ }());
75
+
29
76
  /*! *****************************************************************************
30
77
  Copyright (c) Microsoft Corporation.
31
78
 
@@ -338,124 +385,112 @@
338
385
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
339
386
  }
340
387
 
341
- exports.ElementLocator = void 0;
342
- (function (ElementLocator) {
343
- function findByCssSelector(selector) {
344
- return {
345
- findIn: function (parent) { return parent.dom().find(selector); },
346
- shouldNotExist: function (p) { return p.dom().find(selector).should('not.exist'); }
347
- };
348
- }
349
- ElementLocator.findByCssSelector = findByCssSelector;
350
- function findByTextContent(selector, text) {
351
- return {
352
- findIn: function (parent) {
353
- return parent.dom().contains(selector, text);
354
- },
355
- shouldNotExist: function (parent) {
356
- return parent.dom().should('not.contain', text);
357
- }
358
- };
359
- }
360
- ElementLocator.findByTextContent = findByTextContent;
361
- })(exports.ElementLocator || (exports.ElementLocator = {}));
362
-
363
- var PageElement = /** @class */ (function () {
364
- function PageElement(parent, selectorOrLocator) {
365
- this.parent = parent;
366
- this.elementAccessStrategy = ___namespace.isString(selectorOrLocator) ?
367
- exports.ElementLocator.findByCssSelector(selectorOrLocator) :
368
- selectorOrLocator;
388
+ var urlSerialiser = new router.DefaultUrlSerializer();
389
+ exports.Path = /** @class */ (function () {
390
+ function Path(segments) {
391
+ this.segments = segments;
369
392
  }
370
- PageElement.prototype.dom = function () {
371
- return this.elementAccessStrategy.findIn(this.parent);
372
- };
373
- PageElement.prototype.find = function (selector) {
374
- return new PageElement(this, selector);
375
- };
376
- PageElement.prototype.click = function (text) {
377
- text ? this.dom().contains(text).click() : this.dom().click();
378
- };
379
- Object.defineProperty(PageElement.prototype, "should", {
380
- get: function () {
381
- return this.getShoulder(this.getShouldElement());
382
- },
383
- enumerable: false,
384
- configurable: true
385
- });
386
- PageElement.prototype.getShoulder = function (element) {
387
- return element.should.bind(element);
388
- };
389
- PageElement.prototype.getShouldElement = function () {
390
- return this.dom();
391
- };
392
- PageElement.prototype.shouldBeVisible = function () {
393
- this.should('be.visible');
394
- };
395
- PageElement.prototype.shouldNotBeVisible = function () {
396
- this.should('not.be.visible');
393
+ Path.extractVisitParameters = function (url) {
394
+ var result = {};
395
+ var urlTree = urlSerialiser.parse(url);
396
+ urlTree.root.children.primary.segments.forEach(function (s) {
397
+ result = Object.assign(Object.assign({}, result), s.parameters);
398
+ });
399
+ return result;
397
400
  };
398
- PageElement.prototype.shouldExist = function () {
399
- this.dom().should('exist');
401
+ Path.prototype.toUrl = function (matrixParams) {
402
+ return this.segments.map(function (s) { return s.toUrlPart(matrixParams); }).join('/');
400
403
  };
401
- PageElement.prototype.shouldNotExist = function () {
402
- if (!this.elementAccessStrategy.shouldNotExist) {
403
- this.dom().should('not.exist');
404
+ return Path;
405
+ }());
406
+ (function (Path) {
407
+ function setUrlSerialiser(serialiser) {
408
+ urlSerialiser = serialiser;
409
+ }
410
+ Path.setUrlSerialiser = setUrlSerialiser;
411
+ var Segment = /** @class */ (function () {
412
+ function Segment(path, params) {
413
+ if (params === void 0) { params = {}; }
414
+ var _a;
415
+ this.path = path;
416
+ this.routeId = params === null || params === void 0 ? void 0 : params.routeId;
417
+ this.visitParams = (_a = params === null || params === void 0 ? void 0 : params.visitParams) !== null && _a !== void 0 ? _a : [];
404
418
  }
405
- else {
406
- this.elementAccessStrategy.shouldNotExist(this.parent);
419
+ Segment.prototype.toUrlPart = function (params) {
420
+ var path = this.path;
421
+ this.visitParams.forEach(function (p) {
422
+ var value = params[p];
423
+ if (value) {
424
+ path = path + ";" + p + "=" + value;
425
+ }
426
+ });
427
+ if (this.routeId && params[this.routeId]) {
428
+ path = path + '/' + params[this.routeId];
429
+ }
430
+ return path;
431
+ };
432
+ return Segment;
433
+ }());
434
+ Path.Segment = Segment;
435
+ var Builder = /** @class */ (function () {
436
+ function Builder() {
437
+ this.segments = [];
407
438
  }
408
- };
409
- return PageElement;
410
- }());
439
+ Builder.prototype.segment = function (name, params) {
440
+ var builder = new Segment(name, params);
441
+ this.segments.push(builder);
442
+ return this;
443
+ };
444
+ Builder.prototype.getPath = function () {
445
+ return new Path(this.segments);
446
+ };
447
+ return Builder;
448
+ }());
449
+ Path.Builder = Builder;
450
+ })(exports.Path || (exports.Path = {}));
411
451
 
412
- var FaceElementLocator = /** @class */ (function () {
413
- function FaceElementLocator(face) {
452
+ var FaceAccessor = /** @class */ (function () {
453
+ function FaceAccessor(face) {
414
454
  this.face = face;
415
455
  }
416
- FaceElementLocator.prototype.findIn = function (parent) {
456
+ FaceAccessor.prototype.findIn = function (parent) {
417
457
  return this.face.text ?
418
- parent.dom().contains("aup-command-face", this.face.text()) :
458
+ parent.contains("aup-command-face", this.face.text()) :
419
459
  this.face.icon ?
420
- parent.dom().find("aup-icon[ng-reflect-icon=" + this.face.icon() + "]").closest('aup-command-face') :
460
+ parent.find("aup-icon[ng-reflect-icon=" + this.face.icon() + "]").closest('aup-command-face') :
421
461
  undefined;
422
462
  };
423
- FaceElementLocator.prototype.shouldNotExist = function (parent) {
463
+ FaceAccessor.prototype.shouldNotExist = function (parent) {
424
464
  return this.face.text ?
425
465
  parent.should('not.contain', "aup-command-face", this.face.text()) :
426
466
  this.face.icon ?
427
467
  parent.should('not.contain', "aup-icon[ng-reflect-icon=" + this.face.icon() + "]") :
428
468
  undefined;
429
469
  };
430
- return FaceElementLocator;
470
+ return FaceAccessor;
431
471
  }());
432
472
  var AupCommandFace = /** @class */ (function (_super) {
433
473
  __extends(AupCommandFace, _super);
434
474
  function AupCommandFace(parentElement, face) {
435
- return _super.call(this, parentElement, AupCommandFace.createElementLocator(face)) || this;
475
+ return _super.call(this, function () { return parentElement.element(); }, AupCommandFace.createAccessor(face)) || this;
436
476
  }
437
- AupCommandFace.createElementLocator = function (face) {
438
- return new FaceElementLocator(face);
477
+ AupCommandFace.createAccessor = function (face) {
478
+ return new FaceAccessor(face);
439
479
  };
440
480
  return AupCommandFace;
441
481
  }(PageElement));
442
482
 
443
483
  var AupCommand = /** @class */ (function (_super) {
444
484
  __extends(AupCommand, _super);
445
- function AupCommand(parent, faceOrSelector) {
446
- return _super.call(this, parent, {
485
+ function AupCommand(parent, face) {
486
+ var _this = this;
487
+ var faceAccessor = AupCommandFace.createAccessor(face);
488
+ _this = _super.call(this, parent, {
447
489
  findIn: function (parentElement) {
448
- if (___namespace.isString(faceOrSelector)) {
449
- return parentElement.dom().find(faceOrSelector);
450
- }
451
- else {
452
- return AupCommandFace.createElementLocator(faceOrSelector).findIn(parentElement).closest('aup-command');
453
- }
454
- },
455
- shouldNotExist: function (parentElement) {
456
- this.findIn(parentElement).should("not.exist");
490
+ return faceAccessor.findIn(parentElement).closest('aup-command');
457
491
  }
458
492
  }) || this;
493
+ return _this;
459
494
  }
460
495
  AupCommand.prototype.click = function () {
461
496
  this.getButton().click();
@@ -467,35 +502,24 @@
467
502
  this.getButton().should('be.disabled');
468
503
  };
469
504
  AupCommand.prototype.getButton = function () {
470
- return this.dom().find('button');
505
+ return this.element().find('button');
471
506
  };
472
507
  return AupCommand;
473
508
  }(PageElement));
474
509
 
475
- var AupEmptyState = /** @class */ (function (_super) {
476
- __extends(AupEmptyState, _super);
477
- function AupEmptyState() {
478
- return _super !== null && _super.apply(this, arguments) || this;
479
- }
480
- AupEmptyState.prototype.shouldContainText = function (text) {
481
- this.dom().should("contain.text", text);
482
- };
483
- return AupEmptyState;
484
- }(PageElement));
485
-
486
510
  exports.AupInput = /** @class */ (function (_super) {
487
511
  __extends(AupInput, _super);
488
512
  function AupInput() {
489
513
  return _super !== null && _super.apply(this, arguments) || this;
490
514
  }
491
515
  AupInput.prototype.label = function () {
492
- return this.dom().find('label');
516
+ return this.element().find('label');
493
517
  };
494
518
  AupInput.prototype.hint = function () {
495
- return this.dom().find('mat-hint');
519
+ return this.element().find('mat-hint');
496
520
  };
497
521
  AupInput.prototype.error = function () {
498
- return this.dom().find('mat-error');
522
+ return this.element().find('mat-error');
499
523
  };
500
524
  Object.defineProperty(AupInput.prototype, "labelShould", {
501
525
  get: function () {
@@ -527,18 +551,6 @@
527
551
  AupInput.prototype.errorShouldBe = function (text) {
528
552
  return this.errorShould("have.text", text);
529
553
  };
530
- AupInput.prototype.shouldBeFocused = function () {
531
- this.input().should("have.focus");
532
- };
533
- AupInput.prototype.shouldNotBeFocused = function () {
534
- this.input().should("not.have.focus");
535
- };
536
- AupInput.prototype.type = function (characters) {
537
- this.input().type(characters);
538
- };
539
- AupInput.prototype.hitEnter = function () {
540
- this.type("{enter}");
541
- };
542
554
  return AupInput;
543
555
  }(PageElement));
544
556
  (function (AupInput) {
@@ -548,7 +560,7 @@
548
560
  return _super !== null && _super.apply(this, arguments) || this;
549
561
  }
550
562
  HtmlInput.prototype.input = function () {
551
- return this.dom().find('input');
563
+ return this.element().find('input');
552
564
  };
553
565
  HtmlInput.prototype.clear = function () {
554
566
  this.input().clear();
@@ -574,7 +586,7 @@
574
586
  return this.input();
575
587
  };
576
588
  TextAreaInput.prototype.input = function () {
577
- return this.dom().find('textarea');
589
+ return this.element().find('textarea');
578
590
  };
579
591
  TextAreaInput.prototype.clear = function () {
580
592
  this.input().clear();
@@ -605,209 +617,61 @@
605
617
  this.face(label).shouldBeVisible();
606
618
  };
607
619
  AupNavigation.prototype.shouldNotHaveLink = function (label) {
608
- this.face(label).shouldNotExist();
620
+ this.face(label).shouldNotBeVisible();
609
621
  };
610
622
  return AupNavigation;
611
623
  }(PageElement));
612
624
 
613
- var AupTableCell = /** @class */ (function (_super) {
614
- __extends(AupTableCell, _super);
615
- function AupTableCell() {
616
- return _super !== null && _super.apply(this, arguments) || this;
617
- }
618
- AupTableCell.prototype.rowId = function () {
619
- return this.dom().closest('tr').invoke('attr', 'aup-row-id');
620
- };
621
- AupTableCell.prototype.row = function () {
622
- var self = this;
623
- return this.parent.createRow({
624
- findIn: function (parent) {
625
- return self.rowId().then(function (rowId) {
626
- return parent.dom().find(exports.AupAbstractTable.cssSelectorForTableRowById(rowId));
627
- });
628
- }
629
- });
630
- };
631
- return AupTableCell;
632
- }(PageElement));
633
-
634
- var AupTableColumn = /** @class */ (function (_super) {
635
- __extends(AupTableColumn, _super);
636
- function AupTableColumn(table, columnId) {
637
- var _this = _super.call(this, table, exports.AupAbstractTable.cssSelectorForColumnCellRendererById(columnId)) || this;
638
- _this.columnId = columnId;
639
- return _this;
640
- }
641
- AupTableColumn.prototype.cellContaining = function (content) {
642
- var self = this;
643
- return new AupTableCell(this.parent, {
644
- findIn: function (parent) {
645
- return parent.dom().contains(exports.AupAbstractTable.cssSelectorForColumnCellRendererById(self.columnId), content);
646
- }
647
- });
648
- };
649
- AupTableColumn.prototype.rowContaining = function (content) {
650
- return this.cellContaining(content).row();
651
- };
652
- return AupTableColumn;
653
- }(PageElement));
654
-
655
- var AupTableSelectionColumn = /** @class */ (function (_super) {
656
- __extends(AupTableSelectionColumn, _super);
657
- function AupTableSelectionColumn() {
658
- return _super !== null && _super.apply(this, arguments) || this;
659
- }
660
- AupTableSelectionColumn.prototype.selectAll = function () {
661
- };
662
- return AupTableSelectionColumn;
663
- }(AupTableColumn));
664
-
665
- exports.AupAbstractTable = /** @class */ (function (_super) {
666
- __extends(AupAbstractTable, _super);
667
- function AupAbstractTable() {
668
- return _super !== null && _super.apply(this, arguments) || this;
669
- }
670
- AupAbstractTable.prototype.row = function (rowId) {
671
- return this.createRow({
672
- findIn: function (parent) {
673
- return parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId));
674
- }
675
- });
676
- };
677
- AupAbstractTable.prototype.rowNumber = function (rowNumber) {
678
- return this.createRow({
679
- findIn: function (parent) {
680
- return parent.dom().find(AupAbstractTable.cssSelectorForNthTableRow(rowNumber));
681
- }
682
- });
683
- };
684
- AupAbstractTable.prototype.column = function (columnId) {
685
- return new AupTableColumn(this, columnId);
686
- };
687
- Object.defineProperty(AupAbstractTable.prototype, "selectionColumn", {
688
- get: function () {
689
- return new AupTableSelectionColumn(this, 'selection-column');
690
- },
691
- enumerable: false,
692
- configurable: true
693
- });
694
- return AupAbstractTable;
695
- }(PageElement));
696
- __decorate([
697
- src.Memoize(),
698
- __metadata("design:type", AupTableSelectionColumn),
699
- __metadata("design:paramtypes", [])
700
- ], exports.AupAbstractTable.prototype, "selectionColumn", null);
701
- (function (AupAbstractTable) {
702
- function cssSelectorForTableRowById(rowId) {
703
- return "tbody tr[aup-row-id=" + rowId + "]";
704
- }
705
- AupAbstractTable.cssSelectorForTableRowById = cssSelectorForTableRowById;
706
- function cssSelectorForNthTableRow(rowNumber) {
707
- return "tbody tr:nth-child(" + rowNumber + ")";
708
- }
709
- AupAbstractTable.cssSelectorForNthTableRow = cssSelectorForNthTableRow;
710
- function cssSelectorForColumnCellRendererById(columnOrId) {
711
- var columnId = ___namespace.isString(columnOrId) ? columnOrId : columnOrId.columnId;
712
- return "aup-table-cell-renderer[column-id=" + columnId + "]";
713
- }
714
- AupAbstractTable.cssSelectorForColumnCellRendererById = cssSelectorForColumnCellRendererById;
715
- function cssSelectorForCell(rowId, columnOrId) {
716
- return cssSelectorForTableRowById(rowId) + " " + cssSelectorForColumnCellRendererById(columnOrId);
717
- }
718
- AupAbstractTable.cssSelectorForCell = cssSelectorForCell;
719
- })(exports.AupAbstractTable || (exports.AupAbstractTable = {}));
720
-
721
- var AupTableRow = /** @class */ (function (_super) {
722
- __extends(AupTableRow, _super);
723
- function AupTableRow() {
724
- return _super !== null && _super.apply(this, arguments) || this;
725
- }
726
- AupTableRow.prototype.rowId = function () {
727
- return this.dom()
728
- .invoke('attr', 'aup-row-id');
729
- };
730
- AupTableRow.prototype.shouldHaveRowId = function (rowId) {
731
- this.rowId().should('eq', rowId);
732
- };
733
- AupTableRow.prototype.cell = function (columnOrId) {
734
- var self = this;
735
- return new AupTableCell(this.parent, {
736
- findIn: function (parent) {
737
- return self.rowId()
738
- .then(function (rowId) { return exports.AupAbstractTable.cssSelectorForCell(rowId, columnOrId); })
739
- .then(function (selector) { return parent.dom().find(selector); });
740
- }
741
- });
742
- };
743
- AupTableRow.prototype.shouldBeSelected = function () {
744
- this.dom().should('have.class', 'aup-row-selected');
745
- };
746
- AupTableRow.prototype.shouldNotBeSelected = function () {
747
- this.dom().should('not.have.class', 'aup-row-selected');
748
- };
749
- return AupTableRow;
750
- }(PageElement));
751
-
752
- var AupTable = /** @class */ (function (_super) {
625
+ exports.AupTable = /** @class */ (function (_super) {
753
626
  __extends(AupTable, _super);
754
- function AupTable() {
755
- return _super !== null && _super.apply(this, arguments) || this;
627
+ function AupTable(parentElementAccessor, selector) {
628
+ return _super.call(this, parentElementAccessor, selector) || this;
756
629
  }
757
- AupTable.prototype.createRow = function (locator) {
758
- return new AupTableRow(this, locator);
630
+ AupTable.prototype.row = function (rowId) {
631
+ var _this = this;
632
+ return new AupTable.Row(function () { return _this.element(); }, "tr[aup-table-id=" + rowId + "]");
759
633
  };
760
- return AupTable;
761
- }(exports.AupAbstractTable));
762
-
763
- exports.AupTreeTable = /** @class */ (function (_super) {
764
- __extends(AupTreeTable, _super);
765
- function AupTreeTable() {
766
- return _super !== null && _super.apply(this, arguments) || this;
767
- }
768
- Object.defineProperty(AupTreeTable.prototype, "treeControlColumn", {
769
- get: function () {
770
- return new AupTreeTable.TreeControlColumn(this, 'tree-label');
771
- },
772
- enumerable: false,
773
- configurable: true
774
- });
775
- AupTreeTable.prototype.createRow = function (locator) {
776
- return new AupTreeTable.Row(this, locator);
634
+ AupTable.prototype.column = function (columnId) {
635
+ return new AupTable.Column(this, columnId);
777
636
  };
778
- return AupTreeTable;
779
- }(exports.AupAbstractTable));
780
- __decorate([
781
- src.Memoize(),
782
- __metadata("design:type", exports.AupTreeTable.TreeControlColumn),
783
- __metadata("design:paramtypes", [])
784
- ], exports.AupTreeTable.prototype, "treeControlColumn", null);
785
- (function (AupTreeTable) {
637
+ return AupTable;
638
+ }(PageElement));
639
+ (function (AupTable) {
786
640
  var Row = /** @class */ (function (_super) {
787
641
  __extends(Row, _super);
788
642
  function Row() {
789
643
  return _super !== null && _super.apply(this, arguments) || this;
790
644
  }
791
- Row.prototype.shouldBeExpanded = function () {
792
- this.dom().should("not.have.class", "aup-node-collapsed");
793
- };
794
- Row.prototype.shouldBeCollapsed = function () {
795
- this.dom().should("have.class", "aup-node-collapsed");
796
- };
797
645
  return Row;
798
- }(AupTableRow));
799
- AupTreeTable.Row = Row;
800
- var TreeControlColumn = /** @class */ (function (_super) {
801
- __extends(TreeControlColumn, _super);
802
- function TreeControlColumn() {
646
+ }(PageElement));
647
+ AupTable.Row = Row;
648
+ var Column = /** @class */ (function () {
649
+ function Column(table, columnId) {
650
+ this.table = table;
651
+ this.columnId = columnId;
652
+ }
653
+ Column.prototype.cell = function (content) {
654
+ var self = this;
655
+ return new Cell(this.table, {
656
+ findIn: function (parent) {
657
+ return parent.contains("aup-table-cell-renderer[column-id=" + self.columnId + "]", content);
658
+ }
659
+ });
660
+ };
661
+ return Column;
662
+ }());
663
+ AupTable.Column = Column;
664
+ var Cell = /** @class */ (function (_super) {
665
+ __extends(Cell, _super);
666
+ function Cell() {
803
667
  return _super !== null && _super.apply(this, arguments) || this;
804
668
  }
805
- return TreeControlColumn;
806
- }(AupTableColumn));
807
- AupTreeTable.TreeControlColumn = TreeControlColumn;
808
- })(exports.AupTreeTable || (exports.AupTreeTable = {}));
669
+ return Cell;
670
+ }(PageElement));
671
+ AupTable.Cell = Cell;
672
+ })(exports.AupTable || (exports.AupTable = {}));
809
673
 
810
- function FormElementMixin(Base) {
674
+ function ButtonMixin(Base) {
811
675
  return /** @class */ (function (_super) {
812
676
  __extends(class_1, _super);
813
677
  function class_1() {
@@ -817,8 +681,12 @@
817
681
  }
818
682
  return _super.apply(this, __spreadArray([], __read(args))) || this;
819
683
  }
684
+ class_1.prototype.click = function () {
685
+ return this.element().click();
686
+ };
820
687
  class_1.prototype.shouldBeDisabled = function () {
821
688
  this.should("be.disabled");
689
+ // this.should("have.css", "color", "rgba(0,0,0,0.26)")
822
690
  };
823
691
  return class_1;
824
692
  }(Base));
@@ -827,297 +695,88 @@
827
695
  var Button = /** @class */ (function (_super) {
828
696
  __extends(Button, _super);
829
697
  function Button(parentElementAccessor, buttonText) {
830
- return _super.call(this, parentElementAccessor, exports.ElementLocator.findByTextContent('button', buttonText)) || this;
831
- }
832
- return Button;
833
- }(FormElementMixin(PageElement)));
834
-
835
- var MatCheckbox = /** @class */ (function (_super) {
836
- __extends(MatCheckbox, _super);
837
- function MatCheckbox(parentElementAccessor, text) {
838
- return _super.call(this, parentElementAccessor, exports.ElementLocator.findByTextContent('mat-checkbox', text)) || this;
839
- }
840
- MatCheckbox.prototype.shouldBeChecked = function () {
841
- this.hiddenCheckBoxElement().should('be.checked');
842
- };
843
- MatCheckbox.prototype.shouldNotBeChecked = function () {
844
- this.hiddenCheckBoxElement().should('not.be.checked');
845
- };
846
- MatCheckbox.prototype.hiddenCheckBoxElement = function () {
847
- return this.dom().find('input[type=checkbox]');
848
- };
849
- MatCheckbox.prototype.check = function () {
850
- var _this = this;
851
- this.hiddenCheckBoxElement().then(function (el) {
852
- if (!el.prop('checked')) {
853
- _this.click();
854
- _this.shouldBeChecked();
855
- }
856
- });
857
- };
858
- MatCheckbox.prototype.uncheck = function () {
859
- var _this = this;
860
- this.hiddenCheckBoxElement().then(function (el) {
861
- if (el.prop('checked')) {
862
- _this.click();
863
- _this.shouldNotBeChecked();
864
- }
865
- });
866
- };
867
- return MatCheckbox;
868
- }(FormElementMixin(PageElement)));
869
-
870
- var Builder = /** @class */ (function () {
871
- function Builder(parentPageElement) {
872
- this.parentPageElement = parentPageElement;
873
- }
874
- Builder.prototype.find = function (selector) {
875
- return new PageElement(this.parentPageElement, selector);
876
- };
877
- Builder.prototype.section = function (selector, builder) {
878
- return this.createContainerElement(PageElement, selector, builder);
879
- };
880
- Builder.prototype.contains = function (text) {
881
- return new PageElement(this.parentPageElement, {
698
+ return _super.call(this, parentElementAccessor, {
882
699
  findIn: function (parent) {
883
- return parent.dom().contains(text);
700
+ return parent.contains('button', buttonText);
884
701
  },
885
702
  shouldNotExist: function (parent) {
886
- return parent.dom().should('not.contain', text);
703
+ return parent.should('not.contain', buttonText);
887
704
  }
888
- });
889
- };
890
- Builder.prototype.button = function (text) {
891
- return new Button(this.parentPageElement, text);
892
- };
893
- Builder.prototype.matCheckbox = function (text) {
894
- return new MatCheckbox(this.parentPageElement, text);
895
- };
896
- Builder.prototype.aupStringInput = function (selector) {
897
- return new exports.AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-string-input');
898
- };
899
- Builder.prototype.aupTextInput = function (selector) {
900
- return new exports.AupInput.TextAreaInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-text-input');
901
- };
902
- Builder.prototype.aupPasswordInput = function (selector) {
903
- return new exports.AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-password-input');
904
- };
905
- Builder.prototype.aupNumberInput = function (selector) {
906
- return new exports.AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-number-input');
907
- };
908
- Builder.prototype.aupCommand = function (faceOrSelector) {
909
- return new AupCommand(this.parentPageElement, faceOrSelector);
910
- };
911
- Builder.prototype.aupTabbedNavigation = function () {
912
- return new AupNavigation(this.parentPageElement, 'aup-tabbed-place-navigation');
913
- };
914
- Builder.prototype.aupSideNavigation = function () {
915
- return new AupNavigation(this.parentPageElement, 'aup-list-place-nav');
916
- };
917
- Builder.prototype.aupTable = function (selectorOrBuilder, optionalBuilder) {
918
- return this.createContainerElement(AupTable, selectorOrBuilder, optionalBuilder, 'aup-table');
919
- };
920
- Builder.prototype.aupTreeTable = function (selectorOrBuilder, optionalBuilder) {
921
- return this.createContainerElement(exports.AupTreeTable, selectorOrBuilder, optionalBuilder, 'aup-tree-table');
922
- };
923
- Builder.prototype.aupEmptyState = function (selectorOrBuilder, optionalBuilder) {
924
- return this.createContainerElement(AupEmptyState, selectorOrBuilder, optionalBuilder, 'aup-empty-state');
925
- };
926
- // TODO: use this in all the element factory methods to allow customisation
927
- Builder.prototype.createElement = function (klass, selectorOrBuilder, optionalBuilder, defaultSelector) {
928
- var selector = ___namespace.isString(selectorOrBuilder) ? selectorOrBuilder : defaultSelector;
929
- var builder = ___namespace.isFunction(selectorOrBuilder) ? selectorOrBuilder : optionalBuilder;
930
- if (!selector) {
931
- typescriptUtilities.lang.illegalState('This element requires a selector but none was provided');
932
- }
933
- var element = new klass(this.parentPageElement, selector);
934
- if (builder) {
935
- return typescriptUtilities.Mixin.createProxy(element, builder(element));
936
- }
937
- else {
938
- return element;
939
- }
940
- };
941
- Builder.prototype.createContainerElement = function (klass, selectorOrBuilder, optionalBuilder, defaultSelector) {
942
- var selector = ___namespace.isString(selectorOrBuilder) ? selectorOrBuilder : defaultSelector;
943
- var builder = ___namespace.isFunction(selectorOrBuilder) ? selectorOrBuilder : optionalBuilder;
944
- if (!selector) {
945
- typescriptUtilities.lang.illegalState('This element requires a selector but none was provided');
946
- }
947
- var element = new klass(this.parentPageElement, selector);
948
- if (builder) {
949
- // create the B&E type that the builder has access to
950
- var decoratedElement = typescriptUtilities.Mixin.createProxy(element, new Builder(element));
951
- // create final type that has the E & T type
952
- return typescriptUtilities.Mixin.createProxy(decoratedElement, builder(decoratedElement));
953
- }
954
- else {
955
- return element;
956
- }
957
- };
958
- return Builder;
959
- }());
960
-
961
- var AupAbstractActivity = /** @class */ (function (_super) {
962
- __extends(AupAbstractActivity, _super);
963
- function AupAbstractActivity(parent, selector) {
964
- var _this =
965
- // @ts-ignore
966
- _super.call(this, parent, selector) || this;
967
- _this.title = _this.find('aup-activity-title');
968
- _this._confirmCommand = new Builder(_this).aupCommand('[data-cy=confirm-command]');
969
- _this._cancelCommand = new Builder(_this).aupCommand('[data-cy=cancel-command]');
970
- return _this;
971
- }
972
- return AupAbstractActivity;
973
- }(PageElement));
974
-
975
- var AupActivity = /** @class */ (function (_super) {
976
- __extends(AupActivity, _super);
977
- function AupActivity(parent, selector) {
978
- return _super.call(this, parent, selector) || this;
979
- }
980
- Object.defineProperty(AupActivity.prototype, "confirmCommand", {
981
- get: function () {
982
- return this._confirmCommand;
983
- },
984
- enumerable: false,
985
- configurable: true
986
- });
987
- Object.defineProperty(AupActivity.prototype, "cancelCommand", {
988
- get: function () {
989
- return this._cancelCommand;
990
- },
991
- enumerable: false,
992
- configurable: true
993
- });
994
- return AupActivity;
995
- }(AupAbstractActivity));
996
-
997
- var AupModalActivity = /** @class */ (function (_super) {
998
- __extends(AupModalActivity, _super);
999
- function AupModalActivity() {
1000
- return _super !== null && _super.apply(this, arguments) || this;
1001
- }
1002
- AupModalActivity.prototype.clickBackdrop = function () {
1003
- this.dom().closest(".cdk-overlay-backdrop").click(-50, -50, { force: true });
1004
- };
1005
- return AupModalActivity;
1006
- }(AupActivity));
1007
-
1008
- var AupAlert = /** @class */ (function (_super) {
1009
- __extends(AupAlert, _super);
1010
- function AupAlert(parent, selector) {
1011
- return _super.call(this, parent, selector) || this;
1012
- }
1013
- Object.defineProperty(AupAlert.prototype, "closeCommand", {
1014
- get: function () {
1015
- return this._confirmCommand;
1016
- },
1017
- enumerable: false,
1018
- configurable: true
1019
- });
1020
- AupAlert.prototype.clickClose = function () {
1021
- this.closeCommand.click();
1022
- };
1023
- return AupAlert;
1024
- }(AupAbstractActivity));
1025
-
1026
- var AupModalAlert = /** @class */ (function (_super) {
1027
- __extends(AupModalAlert, _super);
1028
- function AupModalAlert(parent, selector) {
1029
- return _super.call(this, parent, selector) || this;
1030
- }
1031
- AupModalAlert.prototype.clickBackdrop = function () {
1032
- this.dom()
1033
- .closest(".cdk-overlay-container")
1034
- .find(".cdk-overlay-backdrop").click(-50, -50, { force: true });
1035
- };
1036
- return AupModalAlert;
1037
- }(AupAlert));
1038
-
1039
- var PageBuilder = /** @class */ (function (_super) {
1040
- __extends(PageBuilder, _super);
1041
- function PageBuilder() {
1042
- return _super !== null && _super.apply(this, arguments) || this;
1043
- }
1044
- PageBuilder.prototype.aupModalActivity = function (selector, builder) {
1045
- return this.createContainerElement(AupModalActivity, ".dialog-interaction-context " + selector, builder);
1046
- };
1047
- PageBuilder.prototype.aupModalAlert = function (builder) {
1048
- return this.createContainerElement(AupModalAlert, ".dialog-interaction-context aup-alert-dialog", builder);
1049
- };
1050
- PageBuilder.prototype.aupModelConfirm = function (builder) {
1051
- return this.aupModalActivity("aup-confirm-dialog", builder);
1052
- };
1053
- return PageBuilder;
1054
- }(Builder));
1055
-
1056
- var urlSerialiser = new router.DefaultUrlSerializer();
1057
- exports.Path = /** @class */ (function () {
1058
- function Path(segments) {
1059
- this.segments = segments;
1060
- }
1061
- Path.extractVisitParameters = function (url) {
1062
- var _a, _b;
1063
- var result = {};
1064
- var urlTree = urlSerialiser.parse(url);
1065
- var urlSegments = (_b = (_a = urlTree.root.children.primary) === null || _a === void 0 ? void 0 : _a.segments) !== null && _b !== void 0 ? _b : [];
1066
- urlSegments === null || urlSegments === void 0 ? void 0 : urlSegments.forEach(function (s) {
1067
- result = Object.assign(Object.assign({}, result), s.parameters);
1068
- });
1069
- return result;
1070
- };
1071
- Path.prototype.toUrl = function (matrixParams) {
1072
- return this.segments.map(function (s) { return s.toUrlPart(matrixParams); }).join('/');
1073
- };
1074
- return Path;
1075
- }());
1076
- (function (Path) {
1077
- function setUrlSerialiser(serialiser) {
1078
- urlSerialiser = serialiser;
705
+ }) || this;
1079
706
  }
1080
- Path.setUrlSerialiser = setUrlSerialiser;
1081
- var Segment = /** @class */ (function () {
1082
- function Segment(path, params) {
1083
- if (params === void 0) { params = {}; }
1084
- var _a;
1085
- this.path = path;
1086
- this.routeId = params === null || params === void 0 ? void 0 : params.routeId;
1087
- this.visitParams = (_a = params === null || params === void 0 ? void 0 : params.visitParams) !== null && _a !== void 0 ? _a : [];
1088
- }
1089
- Segment.prototype.toUrlPart = function (params) {
1090
- var path = this.path;
1091
- this.visitParams.forEach(function (p) {
1092
- var value = params[p];
1093
- if (value) {
1094
- path = path + ";" + p + "=" + value;
1095
- }
1096
- });
1097
- if (this.routeId && params[this.routeId]) {
1098
- path = path + '/' + params[this.routeId];
707
+ return Button;
708
+ }(ButtonMixin(PageElement)));
709
+
710
+ exports.Section = void 0;
711
+ (function (Section) {
712
+ function Mixin(Base) {
713
+ return /** @class */ (function (_super) {
714
+ __extends(class_1, _super);
715
+ function class_1() {
716
+ return _super !== null && _super.apply(this, arguments) || this;
1099
717
  }
1100
- return path;
1101
- };
1102
- return Segment;
1103
- }());
1104
- Path.Segment = Segment;
1105
- var Builder = /** @class */ (function () {
1106
- function Builder() {
1107
- this.segments = [];
718
+ class_1.prototype.section = function (selector, section) {
719
+ var _this = this;
720
+ var impl = new Impl(function () { return _this.element(); }, selector);
721
+ return typescriptUtilities.Mixin.createProxy(section(impl), impl);
722
+ };
723
+ class_1.prototype.find = function (selector) {
724
+ var _this = this;
725
+ return new PageElement(function () { return _this.element(); }, selector);
726
+ };
727
+ class_1.prototype.contains = function (text) {
728
+ var _this = this;
729
+ return new PageElement(function () { return _this.element(); }, {
730
+ findIn: function (parent) { return parent.contains(text); },
731
+ shouldNotExist: function (parent) { return parent.should('not.contain', text); }
732
+ });
733
+ };
734
+ class_1.prototype.button = function (text) {
735
+ var _this = this;
736
+ return new Button(function () { return _this.element(); }, text);
737
+ };
738
+ class_1.prototype.aupStringInput = function (selector) {
739
+ var _this = this;
740
+ return new exports.AupInput.HtmlInput(function () { return _this.element(); }, selector !== null && selector !== void 0 ? selector : 'aup-string-input');
741
+ };
742
+ class_1.prototype.aupTextInput = function (selector) {
743
+ var _this = this;
744
+ return new exports.AupInput.TextAreaInput(function () { return _this.element(); }, selector !== null && selector !== void 0 ? selector : 'aup-text-input');
745
+ };
746
+ class_1.prototype.aupPasswordInput = function (selector) {
747
+ var _this = this;
748
+ return new exports.AupInput.HtmlInput(function () { return _this.element(); }, selector !== null && selector !== void 0 ? selector : 'aup-password-input');
749
+ };
750
+ class_1.prototype.aupNumberInput = function (selector) {
751
+ var _this = this;
752
+ return new exports.AupInput.HtmlInput(function () { return _this.element(); }, selector !== null && selector !== void 0 ? selector : 'aup-number-input');
753
+ };
754
+ class_1.prototype.aupCommand = function (face) {
755
+ return new AupCommand(this, face);
756
+ };
757
+ class_1.prototype.aupTabbedNavigation = function () {
758
+ return new AupNavigation(this, 'aup-tabbed-place-navigation');
759
+ };
760
+ class_1.prototype.aupSideNavigation = function () {
761
+ var _this = this;
762
+ return new AupNavigation(function () { return _this.element(); }, 'aup-list-place-nav');
763
+ };
764
+ class_1.prototype.aupTable = function (selector) {
765
+ var _this = this;
766
+ return new exports.AupTable(function () { return _this.element(); }, selector !== null && selector !== void 0 ? selector : 'aup-table');
767
+ };
768
+ return class_1;
769
+ }(Base));
770
+ }
771
+ Section.Mixin = Mixin;
772
+ var Impl = /** @class */ (function (_super) {
773
+ __extends(Impl, _super);
774
+ function Impl() {
775
+ return _super !== null && _super.apply(this, arguments) || this;
1108
776
  }
1109
- Builder.prototype.segment = function (name, params) {
1110
- var builder = new Segment(name, params);
1111
- this.segments.push(builder);
1112
- return this;
1113
- };
1114
- Builder.prototype.getPath = function () {
1115
- return new Path(this.segments);
1116
- };
1117
- return Builder;
1118
- }());
1119
- Path.Builder = Builder;
1120
- })(exports.Path || (exports.Path = {}));
777
+ return Impl;
778
+ }(Mixin(PageElement)));
779
+ })(exports.Section || (exports.Section = {}));
1121
780
 
1122
781
  exports.Page = /** @class */ (function (_super) {
1123
782
  __extends(Page, _super);
@@ -1127,7 +786,7 @@
1127
786
  _this.rootElementSelector = 'body';
1128
787
  return _this;
1129
788
  }
1130
- Page.prototype.dom = function () {
789
+ Page.prototype.element = function () {
1131
790
  return cy.get(this.rootElementSelector);
1132
791
  };
1133
792
  Page.prototype.visit = function (visitParams, queryParams) {
@@ -1154,7 +813,7 @@
1154
813
  };
1155
814
  Page.prototype.shouldBeActive = function (withParameters) {
1156
815
  // Note: cy.window() doesn't return a promise... it's a chainable.
1157
- cy['waitUntil'](function () {
816
+ cy["waitUntil"](function () {
1158
817
  return cy.window().then(function (window) {
1159
818
  return window['aup.PlaceRouter'] && !window['aup.PlaceRouter'].isNavigating();
1160
819
  });
@@ -1173,19 +832,26 @@
1173
832
  return Page;
1174
833
  }(PageElement));
1175
834
  (function (Page) {
1176
- function create(pathOrPathBuilder, builder) {
835
+ function create(pathOrPathBuilder, page) {
1177
836
  var pathBuilder = new exports.Path.Builder();
1178
837
  if (___namespace.isString(pathOrPathBuilder)) {
1179
- pathOrPathBuilder.split('/').filter(function (p) { return !___namespace.isEmpty(p); }).forEach(function (p) { return pathBuilder.segment(p); });
838
+ pathOrPathBuilder.split("/").filter(function (p) { return !___namespace.isEmpty(p); }).forEach(function (p) { return pathBuilder.segment(p); });
1180
839
  }
1181
840
  else {
1182
841
  pathOrPathBuilder(pathBuilder);
1183
842
  }
1184
- var instance = new Page(pathBuilder.getPath());
1185
- var content = builder.call(instance, new PageBuilder(instance));
1186
- return typescriptUtilities.Mixin.createProxy(content, instance);
843
+ var builder = new PageBuilder(pathBuilder.getPath());
844
+ return typescriptUtilities.Mixin.createProxy(page(builder), builder);
1187
845
  }
1188
846
  Page.create = create;
847
+ var PageBuilder = /** @class */ (function (_super) {
848
+ __extends(PageBuilder, _super);
849
+ function PageBuilder() {
850
+ return _super !== null && _super.apply(this, arguments) || this;
851
+ }
852
+ return PageBuilder;
853
+ }(exports.Section.Mixin(Page)));
854
+ Page.PageBuilder = PageBuilder;
1189
855
  })(exports.Page || (exports.Page = {}));
1190
856
 
1191
857
  var AupCommandGroup = /** @class */ (function (_super) {
@@ -1211,13 +877,13 @@
1211
877
  __extends(AupPopupMenu, _super);
1212
878
  function AupPopupMenu(parentElementAccessor, face) {
1213
879
  var _this = this;
1214
- var locator = AupCommandFace.createElementLocator(face);
880
+ var accessor = AupCommandFace.createAccessor(face);
1215
881
  _this = _super.call(this, parentElementAccessor, {
1216
882
  findIn: function (parent) {
1217
- return locator.findIn(parent).closest('button');
883
+ return accessor.findIn(parent).closest('button');
1218
884
  },
1219
885
  shouldNotExist: function (parent) {
1220
- locator.shouldNotExist(parent);
886
+ accessor.shouldNotExist(parent);
1221
887
  }
1222
888
  }) || this;
1223
889
  return _this;
@@ -1240,16 +906,6 @@
1240
906
  return AupToolBar;
1241
907
  }(PageElement));
1242
908
 
1243
- var AupTableSelectionCell = /** @class */ (function (_super) {
1244
- __extends(AupTableSelectionCell, _super);
1245
- function AupTableSelectionCell() {
1246
- return _super !== null && _super.apply(this, arguments) || this;
1247
- }
1248
- AupTableSelectionCell.prototype.selectAll = function () {
1249
- };
1250
- return AupTableSelectionCell;
1251
- }(AupTableCell));
1252
-
1253
909
  /**
1254
910
  * @file Automatically generated by barrelsby.
1255
911
  */
@@ -1258,31 +914,16 @@
1258
914
  * Generated bundle index. Do not edit.
1259
915
  */
1260
916
 
1261
- exports.AupAbstractActivity = AupAbstractActivity;
1262
- exports.AupActivity = AupActivity;
1263
- exports.AupAlert = AupAlert;
1264
917
  exports.AupCommand = AupCommand;
1265
918
  exports.AupCommandFace = AupCommandFace;
1266
919
  exports.AupCommandGroup = AupCommandGroup;
1267
- exports.AupEmptyState = AupEmptyState;
1268
- exports.AupModalActivity = AupModalActivity;
1269
- exports.AupModalAlert = AupModalAlert;
1270
920
  exports.AupMoreMenu = AupMoreMenu;
1271
921
  exports.AupNavigation = AupNavigation;
1272
922
  exports.AupPopupMenu = AupPopupMenu;
1273
- exports.AupTable = AupTable;
1274
- exports.AupTableCell = AupTableCell;
1275
- exports.AupTableColumn = AupTableColumn;
1276
- exports.AupTableRow = AupTableRow;
1277
- exports.AupTableSelectionCell = AupTableSelectionCell;
1278
- exports.AupTableSelectionColumn = AupTableSelectionColumn;
1279
923
  exports.AupToolBar = AupToolBar;
1280
- exports.Builder = Builder;
1281
924
  exports.Button = Button;
1282
- exports.FaceElementLocator = FaceElementLocator;
1283
- exports.FormElementMixin = FormElementMixin;
1284
- exports.MatCheckbox = MatCheckbox;
1285
- exports.PageBuilder = PageBuilder;
925
+ exports.ButtonMixin = ButtonMixin;
926
+ exports.FaceAccessor = FaceAccessor;
1286
927
  exports.PageElement = PageElement;
1287
928
 
1288
929
  Object.defineProperty(exports, '__esModule', { value: true });