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

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 (121) hide show
  1. package/bundles/coolon-angular-ui-powerups-cypress.umd.js +344 -119
  2. package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.js +5 -4
  4. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  5. package/coolon-angular-ui-powerups.metadata.json +1 -1
  6. package/cypress/builder.d.ts +11 -2
  7. package/cypress/components/aup-abstract-activity.d.ts +2 -1
  8. package/cypress/components/aup-abstract-table.d.ts +18 -0
  9. package/cypress/components/aup-activity.d.ts +2 -1
  10. package/cypress/components/aup-alert.d.ts +2 -1
  11. package/cypress/components/aup-command-face.d.ts +5 -4
  12. package/cypress/components/aup-command.d.ts +1 -1
  13. package/cypress/components/aup-modal-alert.d.ts +2 -1
  14. package/cypress/components/aup-popup-menu.d.ts +1 -2
  15. package/cypress/components/aup-table.d.ts +5 -15
  16. package/cypress/components/aup-tree-table.d.ts +16 -0
  17. package/cypress/components/button.d.ts +9 -7
  18. package/cypress/components/form-element-mixin.d.ts +20 -0
  19. package/cypress/components/mat-checkbox.d.ts +29 -0
  20. package/cypress/components/table/aup-table-cell.d.ts +9 -0
  21. package/cypress/components/table/aup-table-column.d.ts +10 -0
  22. package/cypress/components/table/aup-table-row.d.ts +17 -0
  23. package/cypress/components/table/aup-table-selection-cell.d.ts +5 -0
  24. package/cypress/components/table/aup-table-selection-column.d.ts +5 -0
  25. package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -1
  26. package/cypress/element-locator.d.ts +10 -0
  27. package/cypress/exports.d.ts +10 -1
  28. package/cypress/page-element.d.ts +9 -11
  29. package/cypress/page.d.ts +1 -1
  30. package/esm2015/cypress/builder.js +30 -18
  31. package/esm2015/cypress/builder.js.map +1 -1
  32. package/esm2015/cypress/builder.metadata.json +1 -1
  33. package/esm2015/cypress/components/aup-abstract-activity.js +1 -0
  34. package/esm2015/cypress/components/aup-abstract-activity.js.map +1 -1
  35. package/esm2015/cypress/components/aup-abstract-activity.metadata.json +1 -1
  36. package/esm2015/cypress/components/aup-abstract-table.js +54 -0
  37. package/esm2015/cypress/components/aup-abstract-table.js.map +1 -0
  38. package/esm2015/cypress/components/aup-abstract-table.metadata.json +1 -0
  39. package/esm2015/cypress/components/aup-activity.js.map +1 -1
  40. package/esm2015/cypress/components/aup-activity.metadata.json +1 -1
  41. package/esm2015/cypress/components/aup-alert.js.map +1 -1
  42. package/esm2015/cypress/components/aup-alert.metadata.json +1 -1
  43. package/esm2015/cypress/components/aup-command-face.js +6 -6
  44. package/esm2015/cypress/components/aup-command-face.js.map +1 -1
  45. package/esm2015/cypress/components/aup-command-face.metadata.json +1 -1
  46. package/esm2015/cypress/components/aup-command.js +3 -3
  47. package/esm2015/cypress/components/aup-command.js.map +1 -1
  48. package/esm2015/cypress/components/aup-command.metadata.json +1 -1
  49. package/esm2015/cypress/components/aup-empty-state.js +1 -1
  50. package/esm2015/cypress/components/aup-empty-state.js.map +1 -1
  51. package/esm2015/cypress/components/aup-input.js +5 -5
  52. package/esm2015/cypress/components/aup-input.js.map +1 -1
  53. package/esm2015/cypress/components/aup-modal-activity.js +1 -1
  54. package/esm2015/cypress/components/aup-modal-activity.js.map +1 -1
  55. package/esm2015/cypress/components/aup-modal-alert.js +1 -1
  56. package/esm2015/cypress/components/aup-modal-alert.js.map +1 -1
  57. package/esm2015/cypress/components/aup-modal-alert.metadata.json +1 -1
  58. package/esm2015/cypress/components/aup-navigation.js +1 -1
  59. package/esm2015/cypress/components/aup-navigation.js.map +1 -1
  60. package/esm2015/cypress/components/aup-popup-menu.js +3 -3
  61. package/esm2015/cypress/components/aup-popup-menu.js.map +1 -1
  62. package/esm2015/cypress/components/aup-popup-menu.metadata.json +1 -1
  63. package/esm2015/cypress/components/aup-table.js +5 -33
  64. package/esm2015/cypress/components/aup-table.js.map +1 -1
  65. package/esm2015/cypress/components/aup-table.metadata.json +1 -1
  66. package/esm2015/cypress/components/aup-tree-table.js +34 -0
  67. package/esm2015/cypress/components/aup-tree-table.js.map +1 -0
  68. package/esm2015/cypress/components/aup-tree-table.metadata.json +1 -0
  69. package/esm2015/cypress/components/button.js +4 -10
  70. package/esm2015/cypress/components/button.js.map +1 -1
  71. package/esm2015/cypress/components/button.metadata.json +1 -1
  72. package/esm2015/cypress/components/form-element-mixin.js +11 -0
  73. package/esm2015/cypress/components/form-element-mixin.js.map +1 -0
  74. package/esm2015/cypress/components/form-element-mixin.metadata.json +1 -0
  75. package/esm2015/cypress/components/mat-checkbox.js +34 -0
  76. package/esm2015/cypress/components/mat-checkbox.js.map +1 -0
  77. package/esm2015/cypress/components/mat-checkbox.metadata.json +1 -0
  78. package/esm2015/cypress/components/table/aup-table-cell.js +18 -0
  79. package/esm2015/cypress/components/table/aup-table-cell.js.map +1 -0
  80. package/esm2015/cypress/components/table/aup-table-cell.metadata.json +1 -0
  81. package/esm2015/cypress/components/table/aup-table-column.js +21 -0
  82. package/esm2015/cypress/components/table/aup-table-column.js.map +1 -0
  83. package/esm2015/cypress/components/table/aup-table-column.metadata.json +1 -0
  84. package/esm2015/cypress/components/table/aup-table-row.js +30 -0
  85. package/esm2015/cypress/components/table/aup-table-row.js.map +1 -0
  86. package/esm2015/cypress/components/table/aup-table-row.metadata.json +1 -0
  87. package/esm2015/cypress/components/table/aup-table-selection-cell.js +6 -0
  88. package/esm2015/cypress/components/table/aup-table-selection-cell.js.map +1 -0
  89. package/esm2015/cypress/components/table/aup-table-selection-cell.metadata.json +1 -0
  90. package/esm2015/cypress/components/table/aup-table-selection-column.js +6 -0
  91. package/esm2015/cypress/components/table/aup-table-selection-column.js.map +1 -0
  92. package/esm2015/cypress/components/table/aup-table-selection-column.metadata.json +1 -0
  93. package/esm2015/cypress/element-locator.js +22 -0
  94. package/esm2015/cypress/element-locator.js.map +1 -0
  95. package/esm2015/cypress/element-locator.metadata.json +1 -0
  96. package/esm2015/cypress/exports.js +10 -1
  97. package/esm2015/cypress/exports.js.map +1 -1
  98. package/esm2015/cypress/exports.metadata.json +1 -1
  99. package/esm2015/cypress/page-element.js +21 -18
  100. package/esm2015/cypress/page-element.js.map +1 -1
  101. package/esm2015/cypress/page-element.metadata.json +1 -1
  102. package/esm2015/cypress/page.js +1 -1
  103. package/esm2015/cypress/page.js.map +1 -1
  104. package/esm2015/cypress/page.metadata.json +1 -1
  105. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js +4 -4
  106. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js.map +1 -1
  107. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.metadata.json +1 -1
  108. package/esm2015/lib/components/tables/tree-table/tree-table-model.js +1 -0
  109. package/esm2015/lib/components/tables/tree-table/tree-table-model.js.map +1 -1
  110. package/esm2015/lib/components/tables/tree-table/tree-table-model.metadata.json +1 -1
  111. package/fesm2015/coolon-angular-ui-powerups-cypress.js +269 -94
  112. package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
  113. package/fesm2015/coolon-angular-ui-powerups.js +5 -4
  114. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  115. package/lib/components/tables/tree-table/flattened-tree-list-model.d.ts +0 -1
  116. package/lib/components/tables/tree-table/tree-table-model.d.ts +4 -5
  117. package/package.json +1 -1
  118. package/cypress/components/button-mixin.d.ts +0 -19
  119. package/esm2015/cypress/components/button-mixin.js +0 -15
  120. package/esm2015/cypress/components/button-mixin.js.map +0 -1
  121. package/esm2015/cypress/components/button-mixin.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('@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';
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';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -338,27 +338,43 @@
338
338
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
339
339
  }
340
340
 
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
+
341
363
  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;
364
+ function PageElement(parent, selectorOrLocator) {
365
+ this.parent = parent;
366
+ this.elementAccessStrategy = ___namespace.isString(selectorOrLocator) ?
367
+ exports.ElementLocator.findByCssSelector(selectorOrLocator) :
368
+ selectorOrLocator;
348
369
  }
349
- PageElement.prototype.element = function () {
350
- var parent = this.getParentElement();
351
- return parent ? this.elementAccessStrategy.findIn(parent) : undefined;
352
- };
353
- PageElement.prototype.getParentElement = function () {
354
- return this.parentElementAccessor ? this.parentElementAccessor() : undefined;
370
+ PageElement.prototype.dom = function () {
371
+ return this.elementAccessStrategy.findIn(this.parent);
355
372
  };
356
373
  PageElement.prototype.find = function (selector) {
357
- var _this = this;
358
- return new PageElement(function () { return _this.element(); }, selector);
374
+ return new PageElement(this, selector);
359
375
  };
360
376
  PageElement.prototype.click = function (text) {
361
- text ? this.element().contains(text).click() : this.element().click();
377
+ text ? this.dom().contains(text).click() : this.dom().click();
362
378
  };
363
379
  Object.defineProperty(PageElement.prototype, "should", {
364
380
  get: function () {
@@ -371,47 +387,55 @@
371
387
  return element.should.bind(element);
372
388
  };
373
389
  PageElement.prototype.getShouldElement = function () {
374
- return this.element();
390
+ return this.dom();
375
391
  };
376
392
  PageElement.prototype.shouldBeVisible = function () {
377
393
  this.should('be.visible');
378
394
  };
379
395
  PageElement.prototype.shouldNotBeVisible = function () {
396
+ this.should('not.be.visible');
397
+ };
398
+ PageElement.prototype.shouldExist = function () {
399
+ this.dom().should('exist');
400
+ };
401
+ PageElement.prototype.shouldNotExist = function () {
380
402
  if (!this.elementAccessStrategy.shouldNotExist) {
381
- typescriptUtilities.lang.abstractMethod(this.constructor);
403
+ this.dom().should('not.exist');
404
+ }
405
+ else {
406
+ this.elementAccessStrategy.shouldNotExist(this.parent);
382
407
  }
383
- this.elementAccessStrategy.shouldNotExist(this.getParentElement());
384
408
  };
385
409
  return PageElement;
386
410
  }());
387
411
 
388
- var FaceAccessor = /** @class */ (function () {
389
- function FaceAccessor(face) {
412
+ var FaceElementLocator = /** @class */ (function () {
413
+ function FaceElementLocator(face) {
390
414
  this.face = face;
391
415
  }
392
- FaceAccessor.prototype.findIn = function (parent) {
416
+ FaceElementLocator.prototype.findIn = function (parent) {
393
417
  return this.face.text ?
394
- parent.contains("aup-command-face", this.face.text()) :
418
+ parent.dom().contains("aup-command-face", this.face.text()) :
395
419
  this.face.icon ?
396
- parent.find("aup-icon[ng-reflect-icon=" + this.face.icon() + "]").closest('aup-command-face') :
420
+ parent.dom().find("aup-icon[ng-reflect-icon=" + this.face.icon() + "]").closest('aup-command-face') :
397
421
  undefined;
398
422
  };
399
- FaceAccessor.prototype.shouldNotExist = function (parent) {
423
+ FaceElementLocator.prototype.shouldNotExist = function (parent) {
400
424
  return this.face.text ?
401
425
  parent.should('not.contain', "aup-command-face", this.face.text()) :
402
426
  this.face.icon ?
403
427
  parent.should('not.contain', "aup-icon[ng-reflect-icon=" + this.face.icon() + "]") :
404
428
  undefined;
405
429
  };
406
- return FaceAccessor;
430
+ return FaceElementLocator;
407
431
  }());
408
432
  var AupCommandFace = /** @class */ (function (_super) {
409
433
  __extends(AupCommandFace, _super);
410
434
  function AupCommandFace(parentElement, face) {
411
- return _super.call(this, function () { return parentElement.element(); }, AupCommandFace.createAccessor(face)) || this;
435
+ return _super.call(this, parentElement, AupCommandFace.createElementLocator(face)) || this;
412
436
  }
413
- AupCommandFace.createAccessor = function (face) {
414
- return new FaceAccessor(face);
437
+ AupCommandFace.createElementLocator = function (face) {
438
+ return new FaceElementLocator(face);
415
439
  };
416
440
  return AupCommandFace;
417
441
  }(PageElement));
@@ -422,10 +446,10 @@
422
446
  return _super.call(this, parent, {
423
447
  findIn: function (parentElement) {
424
448
  if (___namespace.isString(faceOrSelector)) {
425
- return parentElement.find(faceOrSelector);
449
+ return parentElement.dom().find(faceOrSelector);
426
450
  }
427
451
  else {
428
- return AupCommandFace.createAccessor(faceOrSelector).findIn(parentElement).closest('aup-command');
452
+ return AupCommandFace.createElementLocator(faceOrSelector).findIn(parentElement).closest('aup-command');
429
453
  }
430
454
  },
431
455
  shouldNotExist: function (parentElement) {
@@ -443,7 +467,7 @@
443
467
  this.getButton().should('be.disabled');
444
468
  };
445
469
  AupCommand.prototype.getButton = function () {
446
- return this.element().find('button');
470
+ return this.dom().find('button');
447
471
  };
448
472
  return AupCommand;
449
473
  }(PageElement));
@@ -454,7 +478,7 @@
454
478
  return _super !== null && _super.apply(this, arguments) || this;
455
479
  }
456
480
  AupEmptyState.prototype.shouldContainText = function (text) {
457
- this.element().should("contain.text", text);
481
+ this.dom().should("contain.text", text);
458
482
  };
459
483
  return AupEmptyState;
460
484
  }(PageElement));
@@ -465,13 +489,13 @@
465
489
  return _super !== null && _super.apply(this, arguments) || this;
466
490
  }
467
491
  AupInput.prototype.label = function () {
468
- return this.element().find('label');
492
+ return this.dom().find('label');
469
493
  };
470
494
  AupInput.prototype.hint = function () {
471
- return this.element().find('mat-hint');
495
+ return this.dom().find('mat-hint');
472
496
  };
473
497
  AupInput.prototype.error = function () {
474
- return this.element().find('mat-error');
498
+ return this.dom().find('mat-error');
475
499
  };
476
500
  Object.defineProperty(AupInput.prototype, "labelShould", {
477
501
  get: function () {
@@ -524,7 +548,7 @@
524
548
  return _super !== null && _super.apply(this, arguments) || this;
525
549
  }
526
550
  HtmlInput.prototype.input = function () {
527
- return this.element().find('input');
551
+ return this.dom().find('input');
528
552
  };
529
553
  HtmlInput.prototype.clear = function () {
530
554
  this.input().clear();
@@ -550,7 +574,7 @@
550
574
  return this.input();
551
575
  };
552
576
  TextAreaInput.prototype.input = function () {
553
- return this.element().find('textarea');
577
+ return this.dom().find('textarea');
554
578
  };
555
579
  TextAreaInput.prototype.clear = function () {
556
580
  this.input().clear();
@@ -581,61 +605,209 @@
581
605
  this.face(label).shouldBeVisible();
582
606
  };
583
607
  AupNavigation.prototype.shouldNotHaveLink = function (label) {
584
- this.face(label).shouldNotBeVisible();
608
+ this.face(label).shouldNotExist();
585
609
  };
586
610
  return AupNavigation;
587
611
  }(PageElement));
588
612
 
589
- exports.AupTable = /** @class */ (function (_super) {
590
- __extends(AupTable, _super);
591
- function AupTable(parentElementAccessor, selector) {
592
- return _super.call(this, parentElementAccessor, selector) || this;
613
+ var AupTableCell = /** @class */ (function (_super) {
614
+ __extends(AupTableCell, _super);
615
+ function AupTableCell() {
616
+ return _super !== null && _super.apply(this, arguments) || this;
593
617
  }
594
- AupTable.prototype.row = function (rowId) {
595
- var _this = this;
596
- return new AupTable.Row(function () { return _this.element(); }, "tr[aup-table-id=" + rowId + "]");
618
+ AupTableCell.prototype.rowId = function () {
619
+ return this.dom().closest('tr').invoke('attr', 'aup-row-id');
597
620
  };
598
- AupTable.prototype.column = function (columnId) {
599
- return new AupTable.Column(this, columnId);
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
+ });
600
630
  };
601
- return AupTable;
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;
602
750
  }(PageElement));
603
- (function (AupTable) {
751
+
752
+ var AupTable = /** @class */ (function (_super) {
753
+ __extends(AupTable, _super);
754
+ function AupTable() {
755
+ return _super !== null && _super.apply(this, arguments) || this;
756
+ }
757
+ AupTable.prototype.createRow = function (locator) {
758
+ return new AupTableRow(this, locator);
759
+ };
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);
777
+ };
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) {
604
786
  var Row = /** @class */ (function (_super) {
605
787
  __extends(Row, _super);
606
788
  function Row() {
607
789
  return _super !== null && _super.apply(this, arguments) || this;
608
790
  }
609
- return Row;
610
- }(PageElement));
611
- AupTable.Row = Row;
612
- var Column = /** @class */ (function () {
613
- function Column(table, columnId) {
614
- this.table = table;
615
- this.columnId = columnId;
616
- }
617
- Column.prototype.cell = function (content) {
618
- var self = this;
619
- return new Cell(this.table, {
620
- findIn: function (parent) {
621
- return parent.contains("aup-table-cell-renderer[column-id=" + self.columnId + "]", content);
622
- }
623
- });
791
+ Row.prototype.shouldBeExpanded = function () {
792
+ this.dom().should("not.have.class", "aup-node-collapsed");
624
793
  };
625
- return Column;
626
- }());
627
- AupTable.Column = Column;
628
- var Cell = /** @class */ (function (_super) {
629
- __extends(Cell, _super);
630
- function Cell() {
794
+ Row.prototype.shouldBeCollapsed = function () {
795
+ this.dom().should("have.class", "aup-node-collapsed");
796
+ };
797
+ return Row;
798
+ }(AupTableRow));
799
+ AupTreeTable.Row = Row;
800
+ var TreeControlColumn = /** @class */ (function (_super) {
801
+ __extends(TreeControlColumn, _super);
802
+ function TreeControlColumn() {
631
803
  return _super !== null && _super.apply(this, arguments) || this;
632
804
  }
633
- return Cell;
634
- }(PageElement));
635
- AupTable.Cell = Cell;
636
- })(exports.AupTable || (exports.AupTable = {}));
805
+ return TreeControlColumn;
806
+ }(AupTableColumn));
807
+ AupTreeTable.TreeControlColumn = TreeControlColumn;
808
+ })(exports.AupTreeTable || (exports.AupTreeTable = {}));
637
809
 
638
- function ButtonMixin(Base) {
810
+ function FormElementMixin(Base) {
639
811
  return /** @class */ (function (_super) {
640
812
  __extends(class_1, _super);
641
813
  function class_1() {
@@ -645,12 +817,8 @@
645
817
  }
646
818
  return _super.apply(this, __spreadArray([], __read(args))) || this;
647
819
  }
648
- class_1.prototype.click = function () {
649
- return this.element().click();
650
- };
651
820
  class_1.prototype.shouldBeDisabled = function () {
652
821
  this.should("be.disabled");
653
- // this.should("have.css", "color", "rgba(0,0,0,0.26)")
654
822
  };
655
823
  return class_1;
656
824
  }(Base));
@@ -659,60 +827,98 @@
659
827
  var Button = /** @class */ (function (_super) {
660
828
  __extends(Button, _super);
661
829
  function Button(parentElementAccessor, buttonText) {
662
- return _super.call(this, parentElementAccessor, {
663
- findIn: function (parent) {
664
- return parent.contains('button', buttonText);
665
- },
666
- shouldNotExist: function (parent) {
667
- return parent.should('not.contain', buttonText);
668
- }
669
- }) || this;
830
+ return _super.call(this, parentElementAccessor, exports.ElementLocator.findByTextContent('button', buttonText)) || this;
670
831
  }
671
832
  return Button;
672
- }(ButtonMixin(PageElement)));
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)));
673
869
 
674
870
  var Builder = /** @class */ (function () {
675
- function Builder(source) {
676
- this.source = source;
871
+ function Builder(parentPageElement) {
872
+ this.parentPageElement = parentPageElement;
677
873
  }
678
874
  Builder.prototype.find = function (selector) {
679
- return new PageElement(this.source, selector);
875
+ return new PageElement(this.parentPageElement, selector);
680
876
  };
681
877
  Builder.prototype.section = function (selector, builder) {
682
878
  return this.createContainerElement(PageElement, selector, builder);
683
879
  };
684
880
  Builder.prototype.contains = function (text) {
685
- return new PageElement(this.source, {
686
- findIn: function (parent) { return parent.contains(text); },
687
- shouldNotExist: function (parent) { return parent.should('not.contain', text); }
881
+ return new PageElement(this.parentPageElement, {
882
+ findIn: function (parent) {
883
+ return parent.dom().contains(text);
884
+ },
885
+ shouldNotExist: function (parent) {
886
+ return parent.dom().should('not.contain', text);
887
+ }
688
888
  });
689
889
  };
690
890
  Builder.prototype.button = function (text) {
691
- return new Button(this.source, text);
891
+ return new Button(this.parentPageElement, text);
892
+ };
893
+ Builder.prototype.matCheckbox = function (text) {
894
+ return new MatCheckbox(this.parentPageElement, text);
692
895
  };
693
896
  Builder.prototype.aupStringInput = function (selector) {
694
- return new exports.AupInput.HtmlInput(this.source, selector !== null && selector !== void 0 ? selector : 'aup-string-input');
897
+ return new exports.AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-string-input');
695
898
  };
696
899
  Builder.prototype.aupTextInput = function (selector) {
697
- return new exports.AupInput.TextAreaInput(this.source, selector !== null && selector !== void 0 ? selector : 'aup-text-input');
900
+ return new exports.AupInput.TextAreaInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-text-input');
698
901
  };
699
902
  Builder.prototype.aupPasswordInput = function (selector) {
700
- return new exports.AupInput.HtmlInput(this.source, selector !== null && selector !== void 0 ? selector : 'aup-password-input');
903
+ return new exports.AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-password-input');
701
904
  };
702
905
  Builder.prototype.aupNumberInput = function (selector) {
703
- return new exports.AupInput.HtmlInput(this.source, selector !== null && selector !== void 0 ? selector : 'aup-number-input');
906
+ return new exports.AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-number-input');
704
907
  };
705
908
  Builder.prototype.aupCommand = function (faceOrSelector) {
706
- return new AupCommand(this.source, faceOrSelector);
909
+ return new AupCommand(this.parentPageElement, faceOrSelector);
707
910
  };
708
911
  Builder.prototype.aupTabbedNavigation = function () {
709
- return new AupNavigation(this.source, 'aup-tabbed-place-navigation');
912
+ return new AupNavigation(this.parentPageElement, 'aup-tabbed-place-navigation');
710
913
  };
711
914
  Builder.prototype.aupSideNavigation = function () {
712
- return new AupNavigation(this.source, 'aup-list-place-nav');
915
+ return new AupNavigation(this.parentPageElement, 'aup-list-place-nav');
713
916
  };
714
- Builder.prototype.aupTable = function (selector) {
715
- return new exports.AupTable(this.source, selector !== null && selector !== void 0 ? selector : 'aup-table');
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');
716
922
  };
717
923
  Builder.prototype.aupEmptyState = function (selectorOrBuilder, optionalBuilder) {
718
924
  return this.createContainerElement(AupEmptyState, selectorOrBuilder, optionalBuilder, 'aup-empty-state');
@@ -724,7 +930,7 @@
724
930
  if (!selector) {
725
931
  typescriptUtilities.lang.illegalState('This element requires a selector but none was provided');
726
932
  }
727
- var element = new klass(this.source, selector);
933
+ var element = new klass(this.parentPageElement, selector);
728
934
  if (builder) {
729
935
  return typescriptUtilities.Mixin.createProxy(element, builder(element));
730
936
  }
@@ -738,7 +944,7 @@
738
944
  if (!selector) {
739
945
  typescriptUtilities.lang.illegalState('This element requires a selector but none was provided');
740
946
  }
741
- var element = new klass(this.source, selector);
947
+ var element = new klass(this.parentPageElement, selector);
742
948
  if (builder) {
743
949
  // create the B&E type that the builder has access to
744
950
  var decoratedElement = typescriptUtilities.Mixin.createProxy(element, new Builder(element));
@@ -755,7 +961,9 @@
755
961
  var AupAbstractActivity = /** @class */ (function (_super) {
756
962
  __extends(AupAbstractActivity, _super);
757
963
  function AupAbstractActivity(parent, selector) {
758
- var _this = _super.call(this, parent, selector) || this;
964
+ var _this =
965
+ // @ts-ignore
966
+ _super.call(this, parent, selector) || this;
759
967
  _this.title = _this.find('aup-activity-title');
760
968
  _this._confirmCommand = new Builder(_this).aupCommand('[data-cy=confirm-command]');
761
969
  _this._cancelCommand = new Builder(_this).aupCommand('[data-cy=cancel-command]');
@@ -792,7 +1000,7 @@
792
1000
  return _super !== null && _super.apply(this, arguments) || this;
793
1001
  }
794
1002
  AupModalActivity.prototype.clickBackdrop = function () {
795
- this.element().closest(".cdk-overlay-backdrop").click(-50, -50, { force: true });
1003
+ this.dom().closest(".cdk-overlay-backdrop").click(-50, -50, { force: true });
796
1004
  };
797
1005
  return AupModalActivity;
798
1006
  }(AupActivity));
@@ -821,7 +1029,7 @@
821
1029
  return _super.call(this, parent, selector) || this;
822
1030
  }
823
1031
  AupModalAlert.prototype.clickBackdrop = function () {
824
- this.element()
1032
+ this.dom()
825
1033
  .closest(".cdk-overlay-container")
826
1034
  .find(".cdk-overlay-backdrop").click(-50, -50, { force: true });
827
1035
  };
@@ -919,7 +1127,7 @@
919
1127
  _this.rootElementSelector = 'body';
920
1128
  return _this;
921
1129
  }
922
- Page.prototype.element = function () {
1130
+ Page.prototype.dom = function () {
923
1131
  return cy.get(this.rootElementSelector);
924
1132
  };
925
1133
  Page.prototype.visit = function (visitParams, queryParams) {
@@ -1003,13 +1211,13 @@
1003
1211
  __extends(AupPopupMenu, _super);
1004
1212
  function AupPopupMenu(parentElementAccessor, face) {
1005
1213
  var _this = this;
1006
- var accessor = AupCommandFace.createAccessor(face);
1214
+ var locator = AupCommandFace.createElementLocator(face);
1007
1215
  _this = _super.call(this, parentElementAccessor, {
1008
1216
  findIn: function (parent) {
1009
- return accessor.findIn(parent).closest('button');
1217
+ return locator.findIn(parent).closest('button');
1010
1218
  },
1011
1219
  shouldNotExist: function (parent) {
1012
- accessor.shouldNotExist(parent);
1220
+ locator.shouldNotExist(parent);
1013
1221
  }
1014
1222
  }) || this;
1015
1223
  return _this;
@@ -1032,6 +1240,16 @@
1032
1240
  return AupToolBar;
1033
1241
  }(PageElement));
1034
1242
 
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
+
1035
1253
  /**
1036
1254
  * @file Automatically generated by barrelsby.
1037
1255
  */
@@ -1052,11 +1270,18 @@
1052
1270
  exports.AupMoreMenu = AupMoreMenu;
1053
1271
  exports.AupNavigation = AupNavigation;
1054
1272
  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;
1055
1279
  exports.AupToolBar = AupToolBar;
1056
1280
  exports.Builder = Builder;
1057
1281
  exports.Button = Button;
1058
- exports.ButtonMixin = ButtonMixin;
1059
- exports.FaceAccessor = FaceAccessor;
1282
+ exports.FaceElementLocator = FaceElementLocator;
1283
+ exports.FormElementMixin = FormElementMixin;
1284
+ exports.MatCheckbox = MatCheckbox;
1060
1285
  exports.PageBuilder = PageBuilder;
1061
1286
  exports.PageElement = PageElement;
1062
1287