@coolon/angular-ui-powerups 12.4.0-alpha.16 → 12.4.0-alpha.18

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 (81) hide show
  1. package/bundles/coolon-angular-ui-powerups-cypress.umd.js +244 -93
  2. package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
  3. package/cypress/builder.d.ts +7 -2
  4. package/cypress/components/aup-abstract-activity.d.ts +2 -1
  5. package/cypress/components/aup-activity.d.ts +2 -1
  6. package/cypress/components/aup-alert.d.ts +2 -1
  7. package/cypress/components/aup-command-face.d.ts +5 -4
  8. package/cypress/components/aup-command.d.ts +1 -1
  9. package/cypress/components/aup-input.d.ts +2 -0
  10. package/cypress/components/aup-modal-alert.d.ts +2 -1
  11. package/cypress/components/aup-popup-menu.d.ts +1 -2
  12. package/cypress/components/aup-table.d.ts +30 -3
  13. package/cypress/components/button.d.ts +8 -6
  14. package/cypress/components/{button-mixin.d.ts → form-element-mixin.d.ts} +7 -6
  15. package/cypress/components/mat-checkbox.d.ts +29 -0
  16. package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -1
  17. package/cypress/element-locator.d.ts +10 -0
  18. package/cypress/exports.d.ts +3 -1
  19. package/cypress/page-element.d.ts +8 -10
  20. package/cypress/page.d.ts +1 -1
  21. package/esm2015/cypress/builder.js +26 -18
  22. package/esm2015/cypress/builder.js.map +1 -1
  23. package/esm2015/cypress/builder.metadata.json +1 -1
  24. package/esm2015/cypress/components/aup-abstract-activity.js +1 -0
  25. package/esm2015/cypress/components/aup-abstract-activity.js.map +1 -1
  26. package/esm2015/cypress/components/aup-abstract-activity.metadata.json +1 -1
  27. package/esm2015/cypress/components/aup-activity.js.map +1 -1
  28. package/esm2015/cypress/components/aup-activity.metadata.json +1 -1
  29. package/esm2015/cypress/components/aup-alert.js.map +1 -1
  30. package/esm2015/cypress/components/aup-alert.metadata.json +1 -1
  31. package/esm2015/cypress/components/aup-command-face.js +6 -6
  32. package/esm2015/cypress/components/aup-command-face.js.map +1 -1
  33. package/esm2015/cypress/components/aup-command-face.metadata.json +1 -1
  34. package/esm2015/cypress/components/aup-command.js +3 -3
  35. package/esm2015/cypress/components/aup-command.js.map +1 -1
  36. package/esm2015/cypress/components/aup-command.metadata.json +1 -1
  37. package/esm2015/cypress/components/aup-empty-state.js +1 -1
  38. package/esm2015/cypress/components/aup-empty-state.js.map +1 -1
  39. package/esm2015/cypress/components/aup-input.js +11 -5
  40. package/esm2015/cypress/components/aup-input.js.map +1 -1
  41. package/esm2015/cypress/components/aup-input.metadata.json +1 -1
  42. package/esm2015/cypress/components/aup-modal-activity.js +1 -1
  43. package/esm2015/cypress/components/aup-modal-activity.js.map +1 -1
  44. package/esm2015/cypress/components/aup-modal-alert.js +1 -1
  45. package/esm2015/cypress/components/aup-modal-alert.js.map +1 -1
  46. package/esm2015/cypress/components/aup-modal-alert.metadata.json +1 -1
  47. package/esm2015/cypress/components/aup-navigation.js +1 -1
  48. package/esm2015/cypress/components/aup-navigation.js.map +1 -1
  49. package/esm2015/cypress/components/aup-popup-menu.js +3 -3
  50. package/esm2015/cypress/components/aup-popup-menu.js.map +1 -1
  51. package/esm2015/cypress/components/aup-popup-menu.metadata.json +1 -1
  52. package/esm2015/cypress/components/aup-table.js +85 -7
  53. package/esm2015/cypress/components/aup-table.js.map +1 -1
  54. package/esm2015/cypress/components/aup-table.metadata.json +1 -1
  55. package/esm2015/cypress/components/button.js +4 -10
  56. package/esm2015/cypress/components/button.js.map +1 -1
  57. package/esm2015/cypress/components/button.metadata.json +1 -1
  58. package/esm2015/cypress/components/form-element-mixin.js +11 -0
  59. package/esm2015/cypress/components/form-element-mixin.js.map +1 -0
  60. package/esm2015/cypress/components/form-element-mixin.metadata.json +1 -0
  61. package/esm2015/cypress/components/mat-checkbox.js +34 -0
  62. package/esm2015/cypress/components/mat-checkbox.js.map +1 -0
  63. package/esm2015/cypress/components/mat-checkbox.metadata.json +1 -0
  64. package/esm2015/cypress/element-locator.js +22 -0
  65. package/esm2015/cypress/element-locator.js.map +1 -0
  66. package/esm2015/cypress/element-locator.metadata.json +1 -0
  67. package/esm2015/cypress/exports.js +3 -1
  68. package/esm2015/cypress/exports.js.map +1 -1
  69. package/esm2015/cypress/exports.metadata.json +1 -1
  70. package/esm2015/cypress/page-element.js +21 -18
  71. package/esm2015/cypress/page-element.js.map +1 -1
  72. package/esm2015/cypress/page-element.metadata.json +1 -1
  73. package/esm2015/cypress/page.js +1 -1
  74. package/esm2015/cypress/page.js.map +1 -1
  75. package/esm2015/cypress/page.metadata.json +1 -1
  76. package/fesm2015/coolon-angular-ui-powerups-cypress.js +213 -77
  77. package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
  78. package/package.json +1 -1
  79. package/esm2015/cypress/components/button-mixin.js +0 -15
  80. package/esm2015/cypress/components/button-mixin.js.map +0 -1
  81. package/esm2015/cypress/components/button-mixin.metadata.json +0 -1
@@ -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 () {
@@ -509,6 +533,12 @@
509
533
  AupInput.prototype.shouldNotBeFocused = function () {
510
534
  this.input().should("not.have.focus");
511
535
  };
536
+ AupInput.prototype.type = function (characters) {
537
+ this.input().type(characters);
538
+ };
539
+ AupInput.prototype.hitEnter = function () {
540
+ this.type("{enter}");
541
+ };
512
542
  return AupInput;
513
543
  }(PageElement));
514
544
  (function (AupInput) {
@@ -518,7 +548,7 @@
518
548
  return _super !== null && _super.apply(this, arguments) || this;
519
549
  }
520
550
  HtmlInput.prototype.input = function () {
521
- return this.element().find('input');
551
+ return this.dom().find('input');
522
552
  };
523
553
  HtmlInput.prototype.clear = function () {
524
554
  this.input().clear();
@@ -544,7 +574,7 @@
544
574
  return this.input();
545
575
  };
546
576
  TextAreaInput.prototype.input = function () {
547
- return this.element().find('textarea');
577
+ return this.dom().find('textarea');
548
578
  };
549
579
  TextAreaInput.prototype.clear = function () {
550
580
  this.input().clear();
@@ -575,61 +605,148 @@
575
605
  this.face(label).shouldBeVisible();
576
606
  };
577
607
  AupNavigation.prototype.shouldNotHaveLink = function (label) {
578
- this.face(label).shouldNotBeVisible();
608
+ this.face(label).shouldNotExist();
579
609
  };
580
610
  return AupNavigation;
581
611
  }(PageElement));
582
612
 
583
613
  exports.AupTable = /** @class */ (function (_super) {
584
614
  __extends(AupTable, _super);
585
- function AupTable(parentElementAccessor, selector) {
586
- return _super.call(this, parentElementAccessor, selector) || this;
615
+ function AupTable() {
616
+ return _super !== null && _super.apply(this, arguments) || this;
587
617
  }
588
618
  AupTable.prototype.row = function (rowId) {
589
- var _this = this;
590
- return new AupTable.Row(function () { return _this.element(); }, "tr[aup-table-id=" + rowId + "]");
619
+ return new AupTable.Row(this, AupTable.cssSelectorForTableRowById(rowId));
620
+ };
621
+ AupTable.prototype.rowNumber = function (rowNumber) {
622
+ return new AupTable.Row(this, AupTable.cssSelectorForNthTableRow(rowNumber));
591
623
  };
592
624
  AupTable.prototype.column = function (columnId) {
593
625
  return new AupTable.Column(this, columnId);
594
626
  };
627
+ AupTable.prototype.selectionColumn = function () {
628
+ return new AupTable.SelectionColumn(this, 'selection-column');
629
+ };
595
630
  return AupTable;
596
631
  }(PageElement));
597
632
  (function (AupTable) {
633
+ function cssSelectorForTableRowById(rowId) {
634
+ return "tbody tr[aup-row-id=" + rowId + "]";
635
+ }
636
+ AupTable.cssSelectorForTableRowById = cssSelectorForTableRowById;
637
+ function cssSelectorForNthTableRow(rowNumber) {
638
+ return "tbody tr:nth-child(" + rowNumber + ")";
639
+ }
640
+ AupTable.cssSelectorForNthTableRow = cssSelectorForNthTableRow;
641
+ function cssSelectorForColumnCellRendererById(columnId) {
642
+ return "aup-table-cell-renderer[column-id=" + columnId + "]";
643
+ }
644
+ AupTable.cssSelectorForColumnCellRendererById = cssSelectorForColumnCellRendererById;
645
+ function cssSelectorForCell(rowId, columnId) {
646
+ return cssSelectorForTableRowById(rowId) + " " + cssSelectorForColumnCellRendererById(columnId);
647
+ }
648
+ AupTable.cssSelectorForCell = cssSelectorForCell;
598
649
  var Row = /** @class */ (function (_super) {
599
650
  __extends(Row, _super);
600
- function Row() {
601
- return _super !== null && _super.apply(this, arguments) || this;
651
+ function Row(table, selectorOrLocator) {
652
+ var _this =
653
+ // @ts-ignore
654
+ _super.call(this, table, selectorOrLocator) || this;
655
+ _this.table = table;
656
+ return _this;
602
657
  }
658
+ Row.prototype.rowId = function () {
659
+ return this.dom()
660
+ .invoke('attr', 'aup-row-id');
661
+ };
662
+ Row.prototype.shouldHaveRowId = function (rowId) {
663
+ this.rowId().should("eq", rowId);
664
+ };
665
+ Row.prototype.cell = function (columnOrId) {
666
+ var self = this;
667
+ var columnId = ___namespace.isString(columnOrId) ? columnOrId : columnOrId.columnId;
668
+ return new Cell(this.table, {
669
+ findIn: function (parent) {
670
+ return self.rowId()
671
+ .then(function (rowId) { return AupTable.cssSelectorForCell(rowId, columnId); })
672
+ .then(function (selector) { return parent.dom().find(selector); });
673
+ }
674
+ });
675
+ };
676
+ Row.prototype.shouldBeSelected = function () {
677
+ this.dom().should('have.class', 'aup-row-selected');
678
+ };
679
+ Row.prototype.shouldNotBeSelected = function () {
680
+ this.dom().should('not.have.class', 'aup-row-selected');
681
+ };
603
682
  return Row;
604
683
  }(PageElement));
605
684
  AupTable.Row = Row;
606
- var Column = /** @class */ (function () {
685
+ var Column = /** @class */ (function (_super) {
686
+ __extends(Column, _super);
607
687
  function Column(table, columnId) {
608
- this.table = table;
609
- this.columnId = columnId;
688
+ var _this = _super.call(this, table, "aup-table-header-cell-renderer[column-id=\"" + columnId + "\"]") || this;
689
+ _this.table = table;
690
+ _this.columnId = columnId;
691
+ return _this;
610
692
  }
611
- Column.prototype.cell = function (content) {
693
+ Column.prototype.cellContaining = function (content) {
612
694
  var self = this;
613
695
  return new Cell(this.table, {
614
696
  findIn: function (parent) {
615
- return parent.contains("aup-table-cell-renderer[column-id=" + self.columnId + "]", content);
697
+ return parent.dom().contains(cssSelectorForColumnCellRendererById(self.columnId), content);
616
698
  }
617
699
  });
618
700
  };
701
+ Column.prototype.rowContaining = function (content) {
702
+ return this.cellContaining(content).row();
703
+ };
619
704
  return Column;
620
- }());
705
+ }(PageElement));
621
706
  AupTable.Column = Column;
707
+ var SelectionColumn = /** @class */ (function (_super) {
708
+ __extends(SelectionColumn, _super);
709
+ function SelectionColumn() {
710
+ return _super !== null && _super.apply(this, arguments) || this;
711
+ }
712
+ SelectionColumn.prototype.selectAll = function () {
713
+ };
714
+ return SelectionColumn;
715
+ }(Column));
716
+ AupTable.SelectionColumn = SelectionColumn;
622
717
  var Cell = /** @class */ (function (_super) {
623
718
  __extends(Cell, _super);
624
- function Cell() {
625
- return _super !== null && _super.apply(this, arguments) || this;
719
+ function Cell(table, elementLocator) {
720
+ var _this = _super.call(this, table, elementLocator) || this;
721
+ _this.table = table;
722
+ return _this;
626
723
  }
724
+ Cell.prototype.rowId = function () {
725
+ return this.dom().closest('tr').invoke('attr', 'aup-row-id');
726
+ };
727
+ Cell.prototype.row = function () {
728
+ var self = this;
729
+ return new Row(this.table, {
730
+ findIn: function (parent) {
731
+ return self.rowId()
732
+ .then(function (rowId) { return parent.dom().find(AupTable.cssSelectorForTableRowById(rowId)); });
733
+ }
734
+ });
735
+ };
627
736
  return Cell;
628
737
  }(PageElement));
629
738
  AupTable.Cell = Cell;
739
+ var SelectionColumnCell = /** @class */ (function (_super) {
740
+ __extends(SelectionColumnCell, _super);
741
+ function SelectionColumnCell() {
742
+ return _super !== null && _super.apply(this, arguments) || this;
743
+ }
744
+ return SelectionColumnCell;
745
+ }(Cell));
746
+ AupTable.SelectionColumnCell = SelectionColumnCell;
630
747
  })(exports.AupTable || (exports.AupTable = {}));
631
748
 
632
- function ButtonMixin(Base) {
749
+ function FormElementMixin(Base) {
633
750
  return /** @class */ (function (_super) {
634
751
  __extends(class_1, _super);
635
752
  function class_1() {
@@ -639,12 +756,8 @@
639
756
  }
640
757
  return _super.apply(this, __spreadArray([], __read(args))) || this;
641
758
  }
642
- class_1.prototype.click = function () {
643
- return this.element().click();
644
- };
645
759
  class_1.prototype.shouldBeDisabled = function () {
646
760
  this.should("be.disabled");
647
- // this.should("have.css", "color", "rgba(0,0,0,0.26)")
648
761
  };
649
762
  return class_1;
650
763
  }(Base));
@@ -653,60 +766,95 @@
653
766
  var Button = /** @class */ (function (_super) {
654
767
  __extends(Button, _super);
655
768
  function Button(parentElementAccessor, buttonText) {
656
- return _super.call(this, parentElementAccessor, {
657
- findIn: function (parent) {
658
- return parent.contains('button', buttonText);
659
- },
660
- shouldNotExist: function (parent) {
661
- return parent.should('not.contain', buttonText);
662
- }
663
- }) || this;
769
+ return _super.call(this, parentElementAccessor, exports.ElementLocator.findByTextContent('button', buttonText)) || this;
664
770
  }
665
771
  return Button;
666
- }(ButtonMixin(PageElement)));
772
+ }(FormElementMixin(PageElement)));
773
+
774
+ var MatCheckbox = /** @class */ (function (_super) {
775
+ __extends(MatCheckbox, _super);
776
+ function MatCheckbox(parentElementAccessor, text) {
777
+ return _super.call(this, parentElementAccessor, exports.ElementLocator.findByTextContent('mat-checkbox', text)) || this;
778
+ }
779
+ MatCheckbox.prototype.shouldBeChecked = function () {
780
+ this.hiddenCheckBoxElement().should('be.checked');
781
+ };
782
+ MatCheckbox.prototype.shouldNotBeChecked = function () {
783
+ this.hiddenCheckBoxElement().should('not.be.checked');
784
+ };
785
+ MatCheckbox.prototype.hiddenCheckBoxElement = function () {
786
+ return this.dom().find('input[type=checkbox]');
787
+ };
788
+ MatCheckbox.prototype.check = function () {
789
+ var _this = this;
790
+ this.hiddenCheckBoxElement().then(function (el) {
791
+ if (!el.prop('checked')) {
792
+ _this.click();
793
+ _this.shouldBeChecked();
794
+ }
795
+ });
796
+ };
797
+ MatCheckbox.prototype.uncheck = function () {
798
+ var _this = this;
799
+ this.hiddenCheckBoxElement().then(function (el) {
800
+ if (el.prop('checked')) {
801
+ _this.click();
802
+ _this.shouldNotBeChecked();
803
+ }
804
+ });
805
+ };
806
+ return MatCheckbox;
807
+ }(FormElementMixin(PageElement)));
667
808
 
668
809
  var Builder = /** @class */ (function () {
669
- function Builder(source) {
670
- this.source = source;
810
+ function Builder(parentPageElement) {
811
+ this.parentPageElement = parentPageElement;
671
812
  }
672
813
  Builder.prototype.find = function (selector) {
673
- return new PageElement(this.source, selector);
814
+ return new PageElement(this.parentPageElement, selector);
674
815
  };
675
816
  Builder.prototype.section = function (selector, builder) {
676
817
  return this.createContainerElement(PageElement, selector, builder);
677
818
  };
678
819
  Builder.prototype.contains = function (text) {
679
- return new PageElement(this.source, {
680
- findIn: function (parent) { return parent.contains(text); },
681
- shouldNotExist: function (parent) { return parent.should('not.contain', text); }
820
+ return new PageElement(this.parentPageElement, {
821
+ findIn: function (parent) {
822
+ return parent.dom().contains(text);
823
+ },
824
+ shouldNotExist: function (parent) {
825
+ return parent.dom().should('not.contain', text);
826
+ }
682
827
  });
683
828
  };
684
829
  Builder.prototype.button = function (text) {
685
- return new Button(this.source, text);
830
+ return new Button(this.parentPageElement, text);
831
+ };
832
+ Builder.prototype.matCheckbox = function (text) {
833
+ return new MatCheckbox(this.parentPageElement, text);
686
834
  };
687
835
  Builder.prototype.aupStringInput = function (selector) {
688
- return new exports.AupInput.HtmlInput(this.source, selector !== null && selector !== void 0 ? selector : 'aup-string-input');
836
+ return new exports.AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-string-input');
689
837
  };
690
838
  Builder.prototype.aupTextInput = function (selector) {
691
- return new exports.AupInput.TextAreaInput(this.source, selector !== null && selector !== void 0 ? selector : 'aup-text-input');
839
+ return new exports.AupInput.TextAreaInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-text-input');
692
840
  };
693
841
  Builder.prototype.aupPasswordInput = function (selector) {
694
- return new exports.AupInput.HtmlInput(this.source, selector !== null && selector !== void 0 ? selector : 'aup-password-input');
842
+ return new exports.AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-password-input');
695
843
  };
696
844
  Builder.prototype.aupNumberInput = function (selector) {
697
- return new exports.AupInput.HtmlInput(this.source, selector !== null && selector !== void 0 ? selector : 'aup-number-input');
845
+ return new exports.AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-number-input');
698
846
  };
699
847
  Builder.prototype.aupCommand = function (faceOrSelector) {
700
- return new AupCommand(this.source, faceOrSelector);
848
+ return new AupCommand(this.parentPageElement, faceOrSelector);
701
849
  };
702
850
  Builder.prototype.aupTabbedNavigation = function () {
703
- return new AupNavigation(this.source, 'aup-tabbed-place-navigation');
851
+ return new AupNavigation(this.parentPageElement, 'aup-tabbed-place-navigation');
704
852
  };
705
853
  Builder.prototype.aupSideNavigation = function () {
706
- return new AupNavigation(this.source, 'aup-list-place-nav');
854
+ return new AupNavigation(this.parentPageElement, 'aup-list-place-nav');
707
855
  };
708
- Builder.prototype.aupTable = function (selector) {
709
- return new exports.AupTable(this.source, selector !== null && selector !== void 0 ? selector : 'aup-table');
856
+ Builder.prototype.aupTable = function (selectorOrBuilder, optionalBuilder) {
857
+ return this.createContainerElement(exports.AupTable, selectorOrBuilder, optionalBuilder, 'aup-table');
710
858
  };
711
859
  Builder.prototype.aupEmptyState = function (selectorOrBuilder, optionalBuilder) {
712
860
  return this.createContainerElement(AupEmptyState, selectorOrBuilder, optionalBuilder, 'aup-empty-state');
@@ -718,7 +866,7 @@
718
866
  if (!selector) {
719
867
  typescriptUtilities.lang.illegalState('This element requires a selector but none was provided');
720
868
  }
721
- var element = new klass(this.source, selector);
869
+ var element = new klass(this.parentPageElement, selector);
722
870
  if (builder) {
723
871
  return typescriptUtilities.Mixin.createProxy(element, builder(element));
724
872
  }
@@ -732,7 +880,7 @@
732
880
  if (!selector) {
733
881
  typescriptUtilities.lang.illegalState('This element requires a selector but none was provided');
734
882
  }
735
- var element = new klass(this.source, selector);
883
+ var element = new klass(this.parentPageElement, selector);
736
884
  if (builder) {
737
885
  // create the B&E type that the builder has access to
738
886
  var decoratedElement = typescriptUtilities.Mixin.createProxy(element, new Builder(element));
@@ -749,7 +897,9 @@
749
897
  var AupAbstractActivity = /** @class */ (function (_super) {
750
898
  __extends(AupAbstractActivity, _super);
751
899
  function AupAbstractActivity(parent, selector) {
752
- var _this = _super.call(this, parent, selector) || this;
900
+ var _this =
901
+ // @ts-ignore
902
+ _super.call(this, parent, selector) || this;
753
903
  _this.title = _this.find('aup-activity-title');
754
904
  _this._confirmCommand = new Builder(_this).aupCommand('[data-cy=confirm-command]');
755
905
  _this._cancelCommand = new Builder(_this).aupCommand('[data-cy=cancel-command]');
@@ -786,7 +936,7 @@
786
936
  return _super !== null && _super.apply(this, arguments) || this;
787
937
  }
788
938
  AupModalActivity.prototype.clickBackdrop = function () {
789
- this.element().closest(".cdk-overlay-backdrop").click(-50, -50, { force: true });
939
+ this.dom().closest(".cdk-overlay-backdrop").click(-50, -50, { force: true });
790
940
  };
791
941
  return AupModalActivity;
792
942
  }(AupActivity));
@@ -815,7 +965,7 @@
815
965
  return _super.call(this, parent, selector) || this;
816
966
  }
817
967
  AupModalAlert.prototype.clickBackdrop = function () {
818
- this.element()
968
+ this.dom()
819
969
  .closest(".cdk-overlay-container")
820
970
  .find(".cdk-overlay-backdrop").click(-50, -50, { force: true });
821
971
  };
@@ -913,7 +1063,7 @@
913
1063
  _this.rootElementSelector = 'body';
914
1064
  return _this;
915
1065
  }
916
- Page.prototype.element = function () {
1066
+ Page.prototype.dom = function () {
917
1067
  return cy.get(this.rootElementSelector);
918
1068
  };
919
1069
  Page.prototype.visit = function (visitParams, queryParams) {
@@ -997,13 +1147,13 @@
997
1147
  __extends(AupPopupMenu, _super);
998
1148
  function AupPopupMenu(parentElementAccessor, face) {
999
1149
  var _this = this;
1000
- var accessor = AupCommandFace.createAccessor(face);
1150
+ var locator = AupCommandFace.createElementLocator(face);
1001
1151
  _this = _super.call(this, parentElementAccessor, {
1002
1152
  findIn: function (parent) {
1003
- return accessor.findIn(parent).closest('button');
1153
+ return locator.findIn(parent).closest('button');
1004
1154
  },
1005
1155
  shouldNotExist: function (parent) {
1006
- accessor.shouldNotExist(parent);
1156
+ locator.shouldNotExist(parent);
1007
1157
  }
1008
1158
  }) || this;
1009
1159
  return _this;
@@ -1049,8 +1199,9 @@
1049
1199
  exports.AupToolBar = AupToolBar;
1050
1200
  exports.Builder = Builder;
1051
1201
  exports.Button = Button;
1052
- exports.ButtonMixin = ButtonMixin;
1053
- exports.FaceAccessor = FaceAccessor;
1202
+ exports.FaceElementLocator = FaceElementLocator;
1203
+ exports.FormElementMixin = FormElementMixin;
1204
+ exports.MatCheckbox = MatCheckbox;
1054
1205
  exports.PageBuilder = PageBuilder;
1055
1206
  exports.PageElement = PageElement;
1056
1207