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

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 (69) hide show
  1. package/bundles/coolon-angular-ui-powerups-cypress.umd.js +107 -115
  2. package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
  3. package/cypress/builder.d.ts +2 -0
  4. package/cypress/components/aup-command-face.d.ts +0 -7
  5. package/cypress/components/aup-table.d.ts +0 -2
  6. package/cypress/components/button.d.ts +1 -1
  7. package/cypress/components/form-element-mixin.d.ts +1 -1
  8. package/cypress/components/mat-checkbox.d.ts +1 -1
  9. package/cypress/components/popup/aup-abstract-popup-menu.d.ts +15 -0
  10. package/cypress/components/popup/aup-more-menu.d.ts +5 -0
  11. package/cypress/components/popup/aup-popup-menu-panel.d.ts +3 -0
  12. package/cypress/components/popup/aup-popup-menu.d.ts +7 -0
  13. package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -1
  14. package/cypress/element-locator.d.ts +3 -5
  15. package/cypress/exports.d.ts +4 -2
  16. package/cypress/page-element.d.ts +1 -3
  17. package/esm2015/cypress/builder.js +6 -8
  18. package/esm2015/cypress/builder.js.map +1 -1
  19. package/esm2015/cypress/builder.metadata.json +1 -1
  20. package/esm2015/cypress/components/aup-abstract-table.js +4 -8
  21. package/esm2015/cypress/components/aup-abstract-table.js.map +1 -1
  22. package/esm2015/cypress/components/aup-abstract-table.metadata.json +1 -1
  23. package/esm2015/cypress/components/aup-command-face.js +9 -20
  24. package/esm2015/cypress/components/aup-command-face.js.map +1 -1
  25. package/esm2015/cypress/components/aup-command-face.metadata.json +1 -1
  26. package/esm2015/cypress/components/aup-command.js +6 -11
  27. package/esm2015/cypress/components/aup-command.js.map +1 -1
  28. package/esm2015/cypress/components/aup-table.js.map +1 -1
  29. package/esm2015/cypress/components/aup-table.metadata.json +1 -1
  30. package/esm2015/cypress/components/button.js +1 -1
  31. package/esm2015/cypress/components/button.js.map +1 -1
  32. package/esm2015/cypress/components/mat-checkbox.js +1 -1
  33. package/esm2015/cypress/components/mat-checkbox.js.map +1 -1
  34. package/esm2015/cypress/components/popup/aup-abstract-popup-menu.js +33 -0
  35. package/esm2015/cypress/components/popup/aup-abstract-popup-menu.js.map +1 -0
  36. package/esm2015/cypress/components/popup/aup-abstract-popup-menu.metadata.json +1 -0
  37. package/esm2015/cypress/components/popup/aup-more-menu.js +8 -0
  38. package/esm2015/cypress/components/popup/aup-more-menu.js.map +1 -0
  39. package/esm2015/cypress/components/popup/aup-more-menu.metadata.json +1 -0
  40. package/esm2015/cypress/components/popup/aup-popup-menu-panel.js +4 -0
  41. package/esm2015/cypress/components/popup/aup-popup-menu-panel.js.map +1 -0
  42. package/esm2015/cypress/components/popup/aup-popup-menu-panel.metadata.json +1 -0
  43. package/esm2015/cypress/components/popup/aup-popup-menu.js +12 -0
  44. package/esm2015/cypress/components/popup/aup-popup-menu.js.map +1 -0
  45. package/esm2015/cypress/components/popup/aup-popup-menu.metadata.json +1 -0
  46. package/esm2015/cypress/components/table/aup-table-cell.js +2 -6
  47. package/esm2015/cypress/components/table/aup-table-cell.js.map +1 -1
  48. package/esm2015/cypress/components/table/aup-table-column.js +2 -4
  49. package/esm2015/cypress/components/table/aup-table-column.js.map +1 -1
  50. package/esm2015/cypress/components/table/aup-table-row.js +4 -6
  51. package/esm2015/cypress/components/table/aup-table-row.js.map +1 -1
  52. package/esm2015/cypress/element-locator.js +7 -13
  53. package/esm2015/cypress/element-locator.js.map +1 -1
  54. package/esm2015/cypress/exports.js +4 -2
  55. package/esm2015/cypress/exports.js.map +1 -1
  56. package/esm2015/cypress/exports.metadata.json +1 -1
  57. package/esm2015/cypress/page-element.js +3 -8
  58. package/esm2015/cypress/page-element.js.map +1 -1
  59. package/fesm2015/coolon-angular-ui-powerups-cypress.js +90 -106
  60. package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
  61. package/package.json +1 -1
  62. package/cypress/components/aup-more-menu.d.ts +0 -4
  63. package/cypress/components/aup-popup-menu.d.ts +0 -6
  64. package/esm2015/cypress/components/aup-more-menu.js +0 -7
  65. package/esm2015/cypress/components/aup-more-menu.js.map +0 -1
  66. package/esm2015/cypress/components/aup-more-menu.metadata.json +0 -1
  67. package/esm2015/cypress/components/aup-popup-menu.js +0 -19
  68. package/esm2015/cypress/components/aup-popup-menu.js.map +0 -1
  69. package/esm2015/cypress/components/aup-popup-menu.metadata.json +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aup-popup-menu.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/cypress/src/components/popup/aup-popup-menu.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,OAAO,YAAa,SAAQ,oBAAoB;IAEpD,YAAY,qBAAkC,EAAE,IAAuB;QACrE,MAAM,OAAO,GAAG,cAAc,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;QACzD,KAAK,CAAC,qBAAqB,EAAE,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,MAAmB,EAAE,IAAuB;QACxD,OAAO,IAAI,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACxC,CAAC;CACF","sourcesContent":["import { lang } from '@coolon/typescript-utilities';\nimport { PageElement } from '../../page-element';\nimport { AupCommandFace } from '../aup-command-face';\nimport { Types } from '../types';\nimport { AupAbstractPopupMenu } from './aup-abstract-popup-menu';\n\nexport class AupPopupMenu extends AupAbstractPopupMenu {\n\n constructor(parentElementAccessor: PageElement, face: Types.CommandFace) {\n const locator = AupCommandFace.createElementLocator(face)\n super(parentElementAccessor, parent => locator(parent).closest('button'));\n }\n\n static create(parent: PageElement, face: Types.CommandFace) {\n return new AupPopupMenu(parent, face);\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"AupPopupMenu":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./aup-abstract-popup-menu","name":"AupAbstractPopupMenu","line":6,"character":34},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../page-element","name":"PageElement","line":8,"character":37},{"__symbolic":"select","expression":{"__symbolic":"reference","module":"../types","name":"Types","line":8,"character":56},"member":"CommandFace"}]}]},"statics":{"create":{"__symbolic":"function","parameters":["parent","face"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"AupPopupMenu"},"arguments":[{"__symbolic":"reference","name":"parent"},{"__symbolic":"reference","name":"face"}]}}}}}}]
@@ -6,12 +6,8 @@ export class AupTableCell extends PageElement {
6
6
  }
7
7
  row() {
8
8
  const self = this;
9
- return this.parent.createRow({
10
- findIn(parent) {
11
- return self.rowId().then(rowId => {
12
- return parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId));
13
- });
14
- }
9
+ return this.parent.createRow(parent => {
10
+ return self.rowId().then(rowId => parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId)));
15
11
  });
16
12
  }
17
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"aup-table-cell.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/cypress/src/components/table/aup-table-cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,MAAM,OAAO,YAAqC,SAAQ,WAAiC;IAEzF,KAAK;QACH,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC/D,CAAC;IAED,GAAG;QACD,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;YAC3B,MAAM,CAAC,MAAmB;gBACxB,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;oBAC7B,OAAO,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,CAAC;gBAC/E,CAAC,CAAC,CAAC;YACP,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { PageElement } from '../../page-element';\nimport { AupAbstractTable } from '../aup-abstract-table';\nimport { AupTableRow } from './aup-table-row';\nimport Chainable = Cypress.Chainable;\n\nexport class AupTableCell<TR extends AupTableRow> extends PageElement<AupAbstractTable<TR>> {\n\n rowId(): Chainable<string> {\n return this.dom().closest('tr').invoke('attr', 'aup-row-id');\n }\n\n row(): TR {\n const self = this;\n return this.parent.createRow({\n findIn(parent: PageElement): Cypress.Chainable<JQuery> {\n return self.rowId().then(rowId => {\n return parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId));\n });\n }\n });\n }\n}\n"]}
1
+ {"version":3,"file":"aup-table-cell.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/cypress/src/components/table/aup-table-cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,MAAM,OAAO,YAAqC,SAAQ,WAAiC;IAEzF,KAAK;QACH,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC/D,CAAC;IAED,GAAG;QACD,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE;YACpC,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3G,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { PageElement } from '../../page-element';\nimport { AupAbstractTable } from '../aup-abstract-table';\nimport { AupTableRow } from './aup-table-row';\nimport Chainable = Cypress.Chainable;\n\nexport class AupTableCell<TR extends AupTableRow> extends PageElement<AupAbstractTable<TR>> {\n\n rowId(): Chainable<string> {\n return this.dom().closest('tr').invoke('attr', 'aup-row-id');\n }\n\n row(): TR {\n const self = this;\n return this.parent.createRow(parent => {\n return self.rowId().then(rowId => parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId)));\n });\n }\n}\n"]}
@@ -8,10 +8,8 @@ export class AupTableColumn extends PageElement {
8
8
  }
9
9
  cellContaining(content) {
10
10
  const self = this;
11
- return new AupTableCell(this.parent, {
12
- findIn(parent) {
13
- return parent.dom().contains(AupAbstractTable.cssSelectorForColumnCellRendererById(self.columnId), content);
14
- }
11
+ return new AupTableCell(this.parent, parent => {
12
+ return parent.dom().contains(AupAbstractTable.cssSelectorForColumnCellRendererById(self.columnId), content);
15
13
  });
16
14
  }
17
15
  rowContaining(content) {
@@ -1 +1 @@
1
- {"version":3,"file":"aup-table-column.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/cypress/src/components/table/aup-table-column.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,MAAM,OAAO,cAAuC,SAAQ,WAAiC;IAE3F,YAAY,KAA4B,EAAW,QAAgB;QACjE,KAAK,CAAC,KAAK,EAAE,gBAAgB,CAAC,oCAAoC,CAAC,QAAQ,CAAC,CAAC,CAAC;QAD7B,aAAQ,GAAR,QAAQ,CAAQ;IAEnE,CAAC;IAED,cAAc,CAAC,OAAe;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE;YACnC,MAAM,CAAC,MAAmB;gBACxB,OAAO,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,oCAAoC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;YAC9G,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAe;QAC3B,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC;IAC5C,CAAC;CACF","sourcesContent":["import { PageElement } from '../../page-element';\nimport { AupAbstractTable } from '../aup-abstract-table';\nimport { AupTableCell } from './aup-table-cell';\nimport { AupTableRow } from './aup-table-row';\n\nexport class AupTableColumn<TR extends AupTableRow> extends PageElement<AupAbstractTable<TR>> {\n\n constructor(table: AupAbstractTable<any>, readonly columnId: string) {\n super(table, AupAbstractTable.cssSelectorForColumnCellRendererById(columnId));\n }\n\n cellContaining(content: string): AupTableCell<TR> {\n const self = this;\n return new AupTableCell(this.parent, {\n findIn(parent: PageElement): Cypress.Chainable<JQuery> {\n return parent.dom().contains(AupAbstractTable.cssSelectorForColumnCellRendererById(self.columnId), content);\n }\n });\n }\n\n rowContaining(content: string): TR {\n return this.cellContaining(content).row();\n }\n}\n"]}
1
+ {"version":3,"file":"aup-table-column.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/cypress/src/components/table/aup-table-column.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,MAAM,OAAO,cAAuC,SAAQ,WAAiC;IAE3F,YAAY,KAA4B,EAAW,QAAgB;QACjE,KAAK,CAAC,KAAK,EAAE,gBAAgB,CAAC,oCAAoC,CAAC,QAAQ,CAAC,CAAC,CAAC;QAD7B,aAAQ,GAAR,QAAQ,CAAQ;IAEnE,CAAC;IAED,cAAc,CAAC,OAAe;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAC,MAAM,CAAC,EAAE;YAC3C,OAAO,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,oCAAoC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;QAC9G,CAAC,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAe;QAC3B,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC;IAC5C,CAAC;CACF","sourcesContent":["import { PageElement } from '../../page-element';\nimport { AupAbstractTable } from '../aup-abstract-table';\nimport { AupTableCell } from './aup-table-cell';\nimport { AupTableRow } from './aup-table-row';\n\nexport class AupTableColumn<TR extends AupTableRow> extends PageElement<AupAbstractTable<TR>> {\n\n constructor(table: AupAbstractTable<any>, readonly columnId: string) {\n super(table, AupAbstractTable.cssSelectorForColumnCellRendererById(columnId));\n }\n\n cellContaining(content: string): AupTableCell<TR> {\n const self = this;\n return new AupTableCell(this.parent,parent => {\n return parent.dom().contains(AupAbstractTable.cssSelectorForColumnCellRendererById(self.columnId), content);\n });\n }\n\n rowContaining(content: string): TR {\n return this.cellContaining(content).row();\n }\n}\n"]}
@@ -12,12 +12,10 @@ export class AupTableRow extends PageElement {
12
12
  }
13
13
  cell(columnOrId) {
14
14
  const self = this;
15
- return new AupTableCell(this.parent, {
16
- findIn(parent) {
17
- return self.rowId()
18
- .then(rowId => AupAbstractTable.cssSelectorForCell(rowId, columnOrId))
19
- .then(selector => parent.dom().find(selector));
20
- }
15
+ return new AupTableCell(this.parent, parent => {
16
+ return self.rowId()
17
+ .then(rowId => AupAbstractTable.cssSelectorForCell(rowId, columnOrId))
18
+ .then(selector => parent.dom().find(selector));
21
19
  });
22
20
  }
23
21
  shouldBeSelected() {
@@ -1 +1 @@
1
- {"version":3,"file":"aup-table-row.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/cypress/src/components/table/aup-table-row.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMhD,MAAM,OAAO,WAAY,SAAQ,WAAkC;IAEjE,KAAK;QACH,OAAO,IAAI,CAAC,GAAG,EAAE;aACd,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAClC,CAAC;IAED,eAAe,CAAC,KAAa;QAC3B,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IAKD,IAAI,CAAC,UAAyC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE;YACnC,MAAM,CAAC,MAAmB;gBACxB,OAAO,IAAI,CAAC,KAAK,EAAE;qBAChB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;qBACrE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACnD,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;IACtD,CAAC;IAED,mBAAmB;QACjB,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;IAC1D,CAAC;CAEF","sourcesContent":["/* tslint:disable:unified-signatures */\nimport { PageElement } from '../../page-element';\nimport { AupAbstractTable } from '../aup-abstract-table';\nimport { AupTableCell } from './aup-table-cell';\nimport { AupTableColumn } from './aup-table-column';\nimport { AupTableSelectionCell } from './aup-table-selection-cell';\nimport { AupTableSelectionColumn } from './aup-table-selection-column';\nimport Chainable = Cypress.Chainable;\n\nexport class AupTableRow extends PageElement<AupAbstractTable<any>> {\n\n rowId(): Chainable<string> {\n return this.dom()\n .invoke('attr', 'aup-row-id');\n }\n\n shouldHaveRowId(rowId: string) {\n this.rowId().should('eq', rowId);\n }\n\n cell(columnId: string): AupTableCell<this>\n cell(column: AupTableColumn<this>): AupTableCell<this>\n cell(column: AupTableSelectionColumn<this>): AupTableSelectionCell<this>\n cell(columnOrId: string | AupTableColumn<this>): AupTableCell<this> {\n const self = this;\n return new AupTableCell(this.parent, {\n findIn(parent: PageElement): Cypress.Chainable<JQuery> {\n return self.rowId()\n .then(rowId => AupAbstractTable.cssSelectorForCell(rowId, columnOrId))\n .then(selector => parent.dom().find(selector));\n }\n });\n }\n\n shouldBeSelected() {\n this.dom().should('have.class', 'aup-row-selected');\n }\n\n shouldNotBeSelected() {\n this.dom().should('not.have.class', 'aup-row-selected');\n }\n\n}\n"]}
1
+ {"version":3,"file":"aup-table-row.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/cypress/src/components/table/aup-table-row.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMhD,MAAM,OAAO,WAAY,SAAQ,WAAkC;IAEjE,KAAK;QACH,OAAO,IAAI,CAAC,GAAG,EAAE;aACd,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAClC,CAAC;IAED,eAAe,CAAC,KAAa;QAC3B,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IAKD,IAAI,CAAC,UAAyC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;YAC5C,OAAO,IAAI,CAAC,KAAK,EAAE;iBAChB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;iBACrE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;IACtD,CAAC;IAED,mBAAmB;QACjB,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;IAC1D,CAAC;CAEF","sourcesContent":["/* tslint:disable:unified-signatures */\nimport { PageElement } from '../../page-element';\nimport { AupAbstractTable } from '../aup-abstract-table';\nimport { AupTableCell } from './aup-table-cell';\nimport { AupTableColumn } from './aup-table-column';\nimport { AupTableSelectionCell } from './aup-table-selection-cell';\nimport { AupTableSelectionColumn } from './aup-table-selection-column';\nimport Chainable = Cypress.Chainable;\n\nexport class AupTableRow extends PageElement<AupAbstractTable<any>> {\n\n rowId(): Chainable<string> {\n return this.dom()\n .invoke('attr', 'aup-row-id');\n }\n\n shouldHaveRowId(rowId: string) {\n this.rowId().should('eq', rowId);\n }\n\n cell(columnId: string): AupTableCell<this>\n cell(column: AupTableColumn<this>): AupTableCell<this>\n cell(column: AupTableSelectionColumn<this>): AupTableSelectionCell<this>\n cell(columnOrId: string | AupTableColumn<this>): AupTableCell<this> {\n const self = this;\n return new AupTableCell(this.parent, parent => {\n return self.rowId()\n .then(rowId => AupAbstractTable.cssSelectorForCell(rowId, columnOrId))\n .then(selector => parent.dom().find(selector));\n });\n }\n\n shouldBeSelected() {\n this.dom().should('have.class', 'aup-row-selected');\n }\n\n shouldNotBeSelected() {\n this.dom().should('not.have.class', 'aup-row-selected');\n }\n\n}\n"]}
@@ -1,22 +1,16 @@
1
1
  export var ElementLocator;
2
2
  (function (ElementLocator) {
3
3
  function findByCssSelector(selector) {
4
- return {
5
- findIn: parent => parent.dom().find(selector),
6
- shouldNotExist: (p) => p.dom().find(selector).should('not.exist')
7
- };
4
+ return parent => parent.dom().find(selector);
8
5
  }
9
6
  ElementLocator.findByCssSelector = findByCssSelector;
10
- function findByTextContent(selector, text) {
11
- return {
12
- findIn(parent) {
13
- return parent.dom().contains(selector, text);
14
- },
15
- shouldNotExist(parent) {
16
- return parent.dom().should('not.contain', text);
17
- }
18
- };
7
+ function findByTextContent(text) {
8
+ return parent => parent.dom().contains(text);
19
9
  }
20
10
  ElementLocator.findByTextContent = findByTextContent;
11
+ function findBySelectorAndTextContent(selector, text) {
12
+ return parent => parent.dom().contains(selector, text);
13
+ }
14
+ ElementLocator.findBySelectorAndTextContent = findBySelectorAndTextContent;
21
15
  })(ElementLocator || (ElementLocator = {}));
22
16
  //# sourceMappingURL=element-locator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"element-locator.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/cypress/src/element-locator.ts"],"names":[],"mappings":"AAQA,MAAM,KAAW,cAAc,CAmB9B;AAnBD,WAAiB,cAAc;IAC7B,SAAgB,iBAAiB,CAAC,QAAgB;QAChD,OAAO;YACL,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC7C,cAAc,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;SAClE,CAAC;IACJ,CAAC;IALe,gCAAiB,oBAKhC,CAAA;IAED,SAAgB,iBAAiB,CAAC,QAAgB,EAAE,IAAY;QAC9D,OAAO;YACL,MAAM,CAAC,MAAmB;gBACxB,OAAO,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC/C,CAAC;YACD,cAAc,CAAC,MAAmB;gBAChC,OAAO,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;YAClD,CAAC;SACF,CAAC;IACJ,CAAC;IATe,gCAAiB,oBAShC,CAAA;AAEH,CAAC,EAnBgB,cAAc,KAAd,cAAc,QAmB9B","sourcesContent":["import { PageElement } from './page-element';\n\nexport interface ElementLocator {\n findIn(parent: PageElement): Cypress.Chainable<JQuery>;\n\n shouldNotExist?(parent: PageElement);\n}\n\nexport namespace ElementLocator {\n export function findByCssSelector(selector: string): ElementLocator {\n return {\n findIn: parent => parent.dom().find(selector),\n shouldNotExist: (p) => p.dom().find(selector).should('not.exist')\n };\n }\n\n export function findByTextContent(selector: string, text: string): ElementLocator {\n return {\n findIn(parent: PageElement): Cypress.Chainable<JQuery> {\n return parent.dom().contains(selector, text);\n },\n shouldNotExist(parent: PageElement) {\n return parent.dom().should('not.contain', text);\n }\n };\n }\n\n}\n"]}
1
+ {"version":3,"file":"element-locator.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/cypress/src/element-locator.ts"],"names":[],"mappings":"AAIA,MAAM,KAAW,cAAc,CAc9B;AAdD,WAAiB,cAAc;IAE7B,SAAgB,iBAAiB,CAAC,QAAgB;QAChD,OAAO,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC9C,CAAC;IAFe,gCAAiB,oBAEhC,CAAA;IAED,SAAgB,iBAAiB,CAAC,IAAY;QAC5C,OAAO,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAFe,gCAAiB,oBAEhC,CAAA;IAED,SAAgB,4BAA4B,CAAC,QAAgB,EAAE,IAAY;QACzE,OAAO,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;IAFe,2CAA4B,+BAE3C,CAAA;AAEH,CAAC,EAdgB,cAAc,KAAd,cAAc,QAc9B","sourcesContent":["import { PageElement } from './page-element';\n\nexport type ElementLocator = (parent: PageElement) => Cypress.Chainable<JQuery>;\n\nexport namespace ElementLocator {\n\n export function findByCssSelector(selector: string): ElementLocator {\n return parent => parent.dom().find(selector)\n }\n\n export function findByTextContent(text: string): ElementLocator {\n return parent => parent.dom().contains(text);\n }\n\n export function findBySelectorAndTextContent(selector: string, text: string): ElementLocator {\n return parent => parent.dom().contains(selector, text);\n }\n\n}\n"]}
@@ -18,9 +18,7 @@ export * from "./components/aup-empty-state";
18
18
  export * from "./components/aup-input";
19
19
  export * from "./components/aup-modal-activity";
20
20
  export * from "./components/aup-modal-alert";
21
- export * from "./components/aup-more-menu";
22
21
  export * from "./components/aup-navigation";
23
- export * from "./components/aup-popup-menu";
24
22
  export * from "./components/aup-table";
25
23
  export * from "./components/aup-tool-bar";
26
24
  export * from "./components/aup-tree-table";
@@ -28,6 +26,10 @@ export * from "./components/button";
28
26
  export * from "./components/form-element-mixin";
29
27
  export * from "./components/mat-checkbox";
30
28
  export * from "./components/types";
29
+ export * from "./components/popup/aup-abstract-popup-menu";
30
+ export * from "./components/popup/aup-more-menu";
31
+ export * from "./components/popup/aup-popup-menu-panel";
32
+ export * from "./components/popup/aup-popup-menu";
31
33
  export * from "./components/table/aup-table-cell";
32
34
  export * from "./components/table/aup-table-column";
33
35
  export * from "./components/table/aup-table-row";
@@ -1 +1 @@
1
- {"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/cypress/src/exports.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./builder\";\nexport * from \"./element-locator\";\nexport * from \"./page-builder\";\nexport * from \"./page-element\";\nexport * from \"./page\";\nexport * from \"./path\";\nexport * from \"./components/aup-abstract-activity\";\nexport * from \"./components/aup-abstract-table\";\nexport * from \"./components/aup-activity\";\nexport * from \"./components/aup-alert\";\nexport * from \"./components/aup-command-face\";\nexport * from \"./components/aup-command-group\";\nexport * from \"./components/aup-command\";\nexport * from \"./components/aup-empty-state\";\nexport * from \"./components/aup-input\";\nexport * from \"./components/aup-modal-activity\";\nexport * from \"./components/aup-modal-alert\";\nexport * from \"./components/aup-more-menu\";\nexport * from \"./components/aup-navigation\";\nexport * from \"./components/aup-popup-menu\";\nexport * from \"./components/aup-table\";\nexport * from \"./components/aup-tool-bar\";\nexport * from \"./components/aup-tree-table\";\nexport * from \"./components/button\";\nexport * from \"./components/form-element-mixin\";\nexport * from \"./components/mat-checkbox\";\nexport * from \"./components/types\";\nexport * from \"./components/table/aup-table-cell\";\nexport * from \"./components/table/aup-table-column\";\nexport * from \"./components/table/aup-table-row\";\nexport * from \"./components/table/aup-table-selection-cell\";\nexport * from \"./components/table/aup-table-selection-column\";\n"]}
1
+ {"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/cypress/src/exports.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./builder\";\nexport * from \"./element-locator\";\nexport * from \"./page-builder\";\nexport * from \"./page-element\";\nexport * from \"./page\";\nexport * from \"./path\";\nexport * from \"./components/aup-abstract-activity\";\nexport * from \"./components/aup-abstract-table\";\nexport * from \"./components/aup-activity\";\nexport * from \"./components/aup-alert\";\nexport * from \"./components/aup-command-face\";\nexport * from \"./components/aup-command-group\";\nexport * from \"./components/aup-command\";\nexport * from \"./components/aup-empty-state\";\nexport * from \"./components/aup-input\";\nexport * from \"./components/aup-modal-activity\";\nexport * from \"./components/aup-modal-alert\";\nexport * from \"./components/aup-navigation\";\nexport * from \"./components/aup-table\";\nexport * from \"./components/aup-tool-bar\";\nexport * from \"./components/aup-tree-table\";\nexport * from \"./components/button\";\nexport * from \"./components/form-element-mixin\";\nexport * from \"./components/mat-checkbox\";\nexport * from \"./components/types\";\nexport * from \"./components/popup/aup-abstract-popup-menu\";\nexport * from \"./components/popup/aup-more-menu\";\nexport * from \"./components/popup/aup-popup-menu-panel\";\nexport * from \"./components/popup/aup-popup-menu\";\nexport * from \"./components/table/aup-table-cell\";\nexport * from \"./components/table/aup-table-column\";\nexport * from \"./components/table/aup-table-row\";\nexport * from \"./components/table/aup-table-selection-cell\";\nexport * from \"./components/table/aup-table-selection-column\";\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./builder"},{"from":"./element-locator"},{"from":"./page-builder"},{"from":"./page-element"},{"from":"./page"},{"from":"./path"},{"from":"./components/aup-abstract-activity"},{"from":"./components/aup-abstract-table"},{"from":"./components/aup-activity"},{"from":"./components/aup-alert"},{"from":"./components/aup-command-face"},{"from":"./components/aup-command-group"},{"from":"./components/aup-command"},{"from":"./components/aup-empty-state"},{"from":"./components/aup-input"},{"from":"./components/aup-modal-activity"},{"from":"./components/aup-modal-alert"},{"from":"./components/aup-more-menu"},{"from":"./components/aup-navigation"},{"from":"./components/aup-popup-menu"},{"from":"./components/aup-table"},{"from":"./components/aup-tool-bar"},{"from":"./components/aup-tree-table"},{"from":"./components/button"},{"from":"./components/form-element-mixin"},{"from":"./components/mat-checkbox"},{"from":"./components/types"},{"from":"./components/table/aup-table-cell"},{"from":"./components/table/aup-table-column"},{"from":"./components/table/aup-table-row"},{"from":"./components/table/aup-table-selection-cell"},{"from":"./components/table/aup-table-selection-column"}]}]
1
+ [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./builder"},{"from":"./element-locator"},{"from":"./page-builder"},{"from":"./page-element"},{"from":"./page"},{"from":"./path"},{"from":"./components/aup-abstract-activity"},{"from":"./components/aup-abstract-table"},{"from":"./components/aup-activity"},{"from":"./components/aup-alert"},{"from":"./components/aup-command-face"},{"from":"./components/aup-command-group"},{"from":"./components/aup-command"},{"from":"./components/aup-empty-state"},{"from":"./components/aup-input"},{"from":"./components/aup-modal-activity"},{"from":"./components/aup-modal-alert"},{"from":"./components/aup-navigation"},{"from":"./components/aup-table"},{"from":"./components/aup-tool-bar"},{"from":"./components/aup-tree-table"},{"from":"./components/button"},{"from":"./components/form-element-mixin"},{"from":"./components/mat-checkbox"},{"from":"./components/types"},{"from":"./components/popup/aup-abstract-popup-menu"},{"from":"./components/popup/aup-more-menu"},{"from":"./components/popup/aup-popup-menu-panel"},{"from":"./components/popup/aup-popup-menu"},{"from":"./components/table/aup-table-cell"},{"from":"./components/table/aup-table-column"},{"from":"./components/table/aup-table-row"},{"from":"./components/table/aup-table-selection-cell"},{"from":"./components/table/aup-table-selection-column"}]}]
@@ -3,12 +3,12 @@ import { ElementLocator } from './element-locator';
3
3
  export class PageElement {
4
4
  constructor(parent, selectorOrLocator) {
5
5
  this.parent = parent;
6
- this.elementAccessStrategy = _.isString(selectorOrLocator) ?
6
+ this.domElementLocator = _.isString(selectorOrLocator) ?
7
7
  ElementLocator.findByCssSelector(selectorOrLocator) :
8
8
  selectorOrLocator;
9
9
  }
10
10
  dom() {
11
- return this.elementAccessStrategy.findIn(this.parent);
11
+ return this.domElementLocator(this.parent);
12
12
  }
13
13
  find(selector) {
14
14
  return new PageElement(this, selector);
@@ -35,12 +35,7 @@ export class PageElement {
35
35
  this.dom().should('exist');
36
36
  }
37
37
  shouldNotExist() {
38
- if (!this.elementAccessStrategy.shouldNotExist) {
39
- this.dom().should('not.exist');
40
- }
41
- else {
42
- this.elementAccessStrategy.shouldNotExist(this.parent);
43
- }
38
+ this.dom().should('not.exist');
44
39
  }
45
40
  }
46
41
  //# sourceMappingURL=page-element.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"page-element.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/cypress/src/page-element.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,OAAO,WAAW;IAMtB,YAAqB,MAAS,EAAE,iBAA0C;QAArD,WAAM,GAAN,MAAM,CAAG;QAC5B,IAAI,CAAC,qBAAqB,GAAG,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC;YAC1D,cAAc,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,CAAC;YACrD,iBAAiB,CAAC;IACtB,CAAC;IAED,GAAG;QACD,OAAO,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,CAAC,QAAgB;QACnB,OAAO,IAAI,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,IAAa;QACjB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;IAChE,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,WAAW,CAAC,OAA0B;QACpC,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;IACpB,CAAC;IAED,eAAe;QACb,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAChC,CAAC;IAED,WAAW;QACT,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED,cAAc;QACZ,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE;YAC9C,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;SAChC;aAAM;YACL,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACxD;IACH,CAAC;CACF","sourcesContent":["/* tslint:disable:unified-signatures */\nimport Chainable = Cypress.Chainable;\nimport * as _ from 'lodash';\nimport { ElementLocator } from './element-locator';\n\nexport class PageElement<P extends PageElement<any> = PageElement<any>> {\n\n readonly elementAccessStrategy: ElementLocator;\n\n constructor(parent: P, selector: string)\n constructor(parent: P, locator: ElementLocator)\n constructor(readonly parent: P, selectorOrLocator: string | ElementLocator) {\n this.elementAccessStrategy = _.isString(selectorOrLocator) ?\n ElementLocator.findByCssSelector(selectorOrLocator) :\n selectorOrLocator;\n }\n\n dom(): Chainable<JQuery> {\n return this.elementAccessStrategy.findIn(this.parent);\n }\n\n find(selector: string): PageElement {\n return new PageElement(this, selector);\n }\n\n click(text?: string) {\n text ? this.dom().contains(text).click() : this.dom().click();\n }\n\n get should() {\n return this.getShoulder(this.getShouldElement());\n }\n\n getShoulder(element: Chainable<JQuery>) {\n return element.should.bind(element);\n }\n\n getShouldElement(): Chainable<JQuery> {\n return this.dom();\n }\n\n shouldBeVisible() {\n this.should('be.visible');\n }\n\n shouldNotBeVisible() {\n this.should('not.be.visible');\n }\n\n shouldExist() {\n this.dom().should('exist');\n }\n\n shouldNotExist() {\n if (!this.elementAccessStrategy.shouldNotExist) {\n this.dom().should('not.exist');\n } else {\n this.elementAccessStrategy.shouldNotExist(this.parent);\n }\n }\n}\n\nexport namespace PageElement {\n\n // export type ParentLocator = PageElement | (() => Cypress.Chainable<JQuery>);\n // export type ParentLocator = PageElement;\n\n}\n"]}
1
+ {"version":3,"file":"page-element.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/cypress/src/page-element.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,OAAO,WAAW;IAMtB,YAAqB,MAAS,EAAE,iBAA0C;QAArD,WAAM,GAAN,MAAM,CAAG;QAC5B,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC;YACtD,cAAc,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,CAAC;YACrD,iBAAiB,CAAC;IACtB,CAAC;IAED,GAAG;QACD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,IAAI,CAAC,QAAgB;QACnB,OAAO,IAAI,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,IAAa;QACjB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;IAChE,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,WAAW,CAAC,OAA0B;QACpC,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;IACpB,CAAC;IAED,eAAe;QACb,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAChC,CAAC;IAED,WAAW;QACT,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED,cAAc;QACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;CACF","sourcesContent":["/* tslint:disable:unified-signatures */\nimport Chainable = Cypress.Chainable;\nimport * as _ from 'lodash';\nimport { ElementLocator } from './element-locator';\n\nexport class PageElement<P extends PageElement<any> = PageElement<any>> {\n\n readonly domElementLocator: ElementLocator;\n\n constructor(parent: P, selector: string)\n constructor(parent: P, locator: ElementLocator)\n constructor(readonly parent: P, selectorOrLocator: string | ElementLocator) {\n this.domElementLocator = _.isString(selectorOrLocator) ?\n ElementLocator.findByCssSelector(selectorOrLocator) :\n selectorOrLocator;\n }\n\n dom(): Chainable<JQuery> {\n return this.domElementLocator(this.parent);\n }\n\n find(selector: string): PageElement {\n return new PageElement(this, selector);\n }\n\n click(text?: string) {\n text ? this.dom().contains(text).click() : this.dom().click();\n }\n\n get should() {\n return this.getShoulder(this.getShouldElement());\n }\n\n getShoulder(element: Chainable<JQuery>) {\n return element.should.bind(element);\n }\n\n getShouldElement(): Chainable<JQuery> {\n return this.dom();\n }\n\n shouldBeVisible() {\n this.should('be.visible');\n }\n\n shouldNotBeVisible() {\n this.should('not.be.visible');\n }\n\n shouldExist() {\n this.dom().should('exist');\n }\n\n shouldNotExist() {\n this.dom().should('not.exist');\n }\n}\n"]}
@@ -7,34 +7,28 @@ import { DefaultUrlSerializer } from '@angular/router';
7
7
  var ElementLocator;
8
8
  (function (ElementLocator) {
9
9
  function findByCssSelector(selector) {
10
- return {
11
- findIn: parent => parent.dom().find(selector),
12
- shouldNotExist: (p) => p.dom().find(selector).should('not.exist')
13
- };
10
+ return parent => parent.dom().find(selector);
14
11
  }
15
12
  ElementLocator.findByCssSelector = findByCssSelector;
16
- function findByTextContent(selector, text) {
17
- return {
18
- findIn(parent) {
19
- return parent.dom().contains(selector, text);
20
- },
21
- shouldNotExist(parent) {
22
- return parent.dom().should('not.contain', text);
23
- }
24
- };
13
+ function findByTextContent(text) {
14
+ return parent => parent.dom().contains(text);
25
15
  }
26
16
  ElementLocator.findByTextContent = findByTextContent;
17
+ function findBySelectorAndTextContent(selector, text) {
18
+ return parent => parent.dom().contains(selector, text);
19
+ }
20
+ ElementLocator.findBySelectorAndTextContent = findBySelectorAndTextContent;
27
21
  })(ElementLocator || (ElementLocator = {}));
28
22
 
29
23
  class PageElement {
30
24
  constructor(parent, selectorOrLocator) {
31
25
  this.parent = parent;
32
- this.elementAccessStrategy = _.isString(selectorOrLocator) ?
26
+ this.domElementLocator = _.isString(selectorOrLocator) ?
33
27
  ElementLocator.findByCssSelector(selectorOrLocator) :
34
28
  selectorOrLocator;
35
29
  }
36
30
  dom() {
37
- return this.elementAccessStrategy.findIn(this.parent);
31
+ return this.domElementLocator(this.parent);
38
32
  }
39
33
  find(selector) {
40
34
  return new PageElement(this, selector);
@@ -61,56 +55,35 @@ class PageElement {
61
55
  this.dom().should('exist');
62
56
  }
63
57
  shouldNotExist() {
64
- if (!this.elementAccessStrategy.shouldNotExist) {
65
- this.dom().should('not.exist');
66
- }
67
- else {
68
- this.elementAccessStrategy.shouldNotExist(this.parent);
69
- }
58
+ this.dom().should('not.exist');
70
59
  }
71
60
  }
72
61
 
73
- class FaceElementLocator {
74
- constructor(face) {
75
- this.face = face;
76
- }
77
- findIn(parent) {
78
- return this.face.text ?
79
- parent.dom().contains(`aup-command-face`, this.face.text()) :
80
- this.face.icon ?
81
- parent.dom().find(`aup-icon[ng-reflect-icon=${this.face.icon()}]`).closest('aup-command-face') :
82
- undefined;
83
- }
84
- shouldNotExist(parent) {
85
- return this.face.text ?
86
- parent.should('not.contain', `aup-command-face`, this.face.text()) :
87
- this.face.icon ?
88
- parent.should('not.contain', `aup-icon[ng-reflect-icon=${this.face.icon()}]`) :
89
- undefined;
90
- }
91
- }
92
62
  class AupCommandFace extends PageElement {
93
63
  constructor(parentElement, face) {
94
64
  super(parentElement, AupCommandFace.createElementLocator(face));
95
65
  }
96
66
  static createElementLocator(face) {
97
- return new FaceElementLocator(face);
67
+ const locator = parent => {
68
+ return face.text ?
69
+ parent.dom().contains(`aup-command-face`, face.text()) :
70
+ face.icon ?
71
+ parent.dom().find(`aup-icon[ng-reflect-icon=${face.icon()}]`).closest('aup-command-face') :
72
+ undefined;
73
+ };
74
+ // aot compiler doesn't like lambas
75
+ return locator;
98
76
  }
99
77
  }
100
78
 
101
79
  class AupCommand extends PageElement {
102
80
  constructor(parent, faceOrSelector) {
103
- super(parent, {
104
- findIn(parentElement) {
105
- if (_.isString(faceOrSelector)) {
106
- return parentElement.dom().find(faceOrSelector);
107
- }
108
- else {
109
- return AupCommandFace.createElementLocator(faceOrSelector).findIn(parentElement).closest('aup-command');
110
- }
111
- },
112
- shouldNotExist(parentElement) {
113
- this.findIn(parentElement).should("not.exist");
81
+ super(parent, parentElement => {
82
+ if (_.isString(faceOrSelector)) {
83
+ return parentElement.dom().find(faceOrSelector);
84
+ }
85
+ else {
86
+ return AupCommandFace.createElementLocator(faceOrSelector)(parentElement).closest('aup-command');
114
87
  }
115
88
  });
116
89
  }
@@ -214,6 +187,46 @@ class AupInput extends PageElement {
214
187
  AupInput.TextAreaInput = TextAreaInput;
215
188
  })(AupInput || (AupInput = {}));
216
189
 
190
+ class AupPopupMenuPanel extends PageElement {
191
+ }
192
+
193
+ class AupAbstractPopupMenu extends PageElement {
194
+ constructor(parent, locator) {
195
+ super(parent, locator);
196
+ this.popup = new AupPopupMenuPanel(this, p => this.findPopupIn(p));
197
+ }
198
+ findPopupIn(p) {
199
+ return this.getOverlay().find('.mat-menu-panel');
200
+ }
201
+ getOverlay() {
202
+ return this.dom().closest('body').find('.cdk-overlay-container');
203
+ }
204
+ getBackdrop() {
205
+ return this.getOverlay().find('.cdk-overlay-backdrop');
206
+ }
207
+ openPopup() {
208
+ this.shouldNotBeOpen();
209
+ this.click();
210
+ return this.popup;
211
+ }
212
+ closePopup() {
213
+ this.shouldBeOpen();
214
+ this.getBackdrop().click();
215
+ }
216
+ shouldBeOpen() {
217
+ this.popup.shouldBeVisible();
218
+ }
219
+ shouldNotBeOpen() {
220
+ this.dom().closest('body').find('.mat-menu-panel').should("not.exist");
221
+ }
222
+ }
223
+
224
+ class AupMoreMenu extends AupAbstractPopupMenu {
225
+ static create(parent, selector) {
226
+ return new AupMoreMenu(parent, ElementLocator.findByCssSelector(selector !== null && selector !== void 0 ? selector : 'aup-more-menu'));
227
+ }
228
+ }
229
+
217
230
  class AupNavigation extends PageElement {
218
231
  click(label) {
219
232
  return super.click(label);
@@ -235,12 +248,8 @@ class AupTableCell extends PageElement {
235
248
  }
236
249
  row() {
237
250
  const self = this;
238
- return this.parent.createRow({
239
- findIn(parent) {
240
- return self.rowId().then(rowId => {
241
- return parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId));
242
- });
243
- }
251
+ return this.parent.createRow(parent => {
252
+ return self.rowId().then(rowId => parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId)));
244
253
  });
245
254
  }
246
255
  }
@@ -252,10 +261,8 @@ class AupTableColumn extends PageElement {
252
261
  }
253
262
  cellContaining(content) {
254
263
  const self = this;
255
- return new AupTableCell(this.parent, {
256
- findIn(parent) {
257
- return parent.dom().contains(AupAbstractTable.cssSelectorForColumnCellRendererById(self.columnId), content);
258
- }
264
+ return new AupTableCell(this.parent, parent => {
265
+ return parent.dom().contains(AupAbstractTable.cssSelectorForColumnCellRendererById(self.columnId), content);
259
266
  });
260
267
  }
261
268
  rowContaining(content) {
@@ -270,17 +277,13 @@ class AupTableSelectionColumn extends AupTableColumn {
270
277
 
271
278
  class AupAbstractTable extends PageElement {
272
279
  row(rowId) {
273
- return this.createRow({
274
- findIn(parent) {
275
- return parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId));
276
- }
280
+ return this.createRow(parent => {
281
+ return parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId));
277
282
  });
278
283
  }
279
284
  rowNumber(rowNumber) {
280
- return this.createRow({
281
- findIn(parent) {
282
- return parent.dom().find(AupAbstractTable.cssSelectorForNthTableRow(rowNumber));
283
- }
285
+ return this.createRow(parent => {
286
+ return parent.dom().find(AupAbstractTable.cssSelectorForNthTableRow(rowNumber));
284
287
  });
285
288
  }
286
289
  column(columnId) {
@@ -326,12 +329,10 @@ class AupTableRow extends PageElement {
326
329
  }
327
330
  cell(columnOrId) {
328
331
  const self = this;
329
- return new AupTableCell(this.parent, {
330
- findIn(parent) {
331
- return self.rowId()
332
- .then(rowId => AupAbstractTable.cssSelectorForCell(rowId, columnOrId))
333
- .then(selector => parent.dom().find(selector));
334
- }
332
+ return new AupTableCell(this.parent, parent => {
333
+ return self.rowId()
334
+ .then(rowId => AupAbstractTable.cssSelectorForCell(rowId, columnOrId))
335
+ .then(selector => parent.dom().find(selector));
335
336
  });
336
337
  }
337
338
  shouldBeSelected() {
@@ -389,13 +390,13 @@ function FormElementMixin(Base) {
389
390
 
390
391
  class Button extends FormElementMixin(PageElement) {
391
392
  constructor(parentElementAccessor, buttonText) {
392
- super(parentElementAccessor, ElementLocator.findByTextContent('button', buttonText));
393
+ super(parentElementAccessor, ElementLocator.findBySelectorAndTextContent('button', buttonText));
393
394
  }
394
395
  }
395
396
 
396
397
  class MatCheckbox extends FormElementMixin(PageElement) {
397
398
  constructor(parentElementAccessor, text) {
398
- super(parentElementAccessor, ElementLocator.findByTextContent('mat-checkbox', text));
399
+ super(parentElementAccessor, ElementLocator.findBySelectorAndTextContent('mat-checkbox', text));
399
400
  }
400
401
  shouldBeChecked() {
401
402
  this.hiddenCheckBoxElement().should('be.checked');
@@ -435,14 +436,7 @@ class Builder {
435
436
  return this.createContainerElement(PageElement, selector, builder);
436
437
  }
437
438
  contains(text) {
438
- return new PageElement(this.parentPageElement, {
439
- findIn(parent) {
440
- return parent.dom().contains(text);
441
- },
442
- shouldNotExist(parent) {
443
- return parent.dom().should('not.contain', text);
444
- }
445
- });
439
+ return new PageElement(this.parentPageElement, ElementLocator.findByTextContent(text));
446
440
  }
447
441
  button(text) {
448
442
  return new Button(this.parentPageElement, text);
@@ -471,6 +465,9 @@ class Builder {
471
465
  aupSideNavigation() {
472
466
  return new AupNavigation(this.parentPageElement, 'aup-list-place-nav');
473
467
  }
468
+ aupMoreMenu(selector) {
469
+ return AupMoreMenu.create(this.parentPageElement, selector);
470
+ }
474
471
  aupTable(selectorOrBuilder, optionalBuilder) {
475
472
  return this.createContainerElement(AupTable, selectorOrBuilder, optionalBuilder, 'aup-table');
476
473
  }
@@ -704,36 +701,23 @@ class Page extends PageElement {
704
701
  class AupCommandGroup extends PageElement {
705
702
  }
706
703
 
707
- class AupMoreMenu extends PageElement {
708
- static create(parent) {
709
- return new AupMoreMenu(parent, 'aup-more-menu');
704
+ class AupToolBar extends PageElement {
705
+ static create(parent, face) {
706
+ // const findFace = AupCommandFace.createFinder(() => parent.element(), face)
707
+ // return new AupCommandGroup(() => findFace().closest('button'));
710
708
  }
711
709
  }
712
710
 
713
- class AupPopupMenu extends PageElement {
711
+ class AupPopupMenu extends AupAbstractPopupMenu {
714
712
  constructor(parentElementAccessor, face) {
715
713
  const locator = AupCommandFace.createElementLocator(face);
716
- super(parentElementAccessor, {
717
- findIn(parent) {
718
- return locator.findIn(parent).closest('button');
719
- },
720
- shouldNotExist(parent) {
721
- locator.shouldNotExist(parent);
722
- }
723
- });
714
+ super(parentElementAccessor, parent => locator(parent).closest('button'));
724
715
  }
725
716
  static create(parent, face) {
726
717
  return new AupPopupMenu(parent, face);
727
718
  }
728
719
  }
729
720
 
730
- class AupToolBar extends PageElement {
731
- static create(parent, face) {
732
- // const findFace = AupCommandFace.createFinder(() => parent.element(), face)
733
- // return new AupCommandGroup(() => findFace().closest('button'));
734
- }
735
- }
736
-
737
721
  class AupTableSelectionCell extends AupTableCell {
738
722
  selectAll() {
739
723
  }
@@ -747,5 +731,5 @@ class AupTableSelectionCell extends AupTableCell {
747
731
  * Generated bundle index. Do not edit.
748
732
  */
749
733
 
750
- export { AupAbstractActivity, AupAbstractTable, AupActivity, AupAlert, AupCommand, AupCommandFace, AupCommandGroup, AupEmptyState, AupInput, AupModalActivity, AupModalAlert, AupMoreMenu, AupNavigation, AupPopupMenu, AupTable, AupTableCell, AupTableColumn, AupTableRow, AupTableSelectionCell, AupTableSelectionColumn, AupToolBar, AupTreeTable, Builder, Button, ElementLocator, FaceElementLocator, FormElementMixin, MatCheckbox, Page, PageBuilder, PageElement, Path };
734
+ export { AupAbstractActivity, AupAbstractPopupMenu, AupAbstractTable, AupActivity, AupAlert, AupCommand, AupCommandFace, AupCommandGroup, AupEmptyState, AupInput, AupModalActivity, AupModalAlert, AupMoreMenu, AupNavigation, AupPopupMenu, AupPopupMenuPanel, AupTable, AupTableCell, AupTableColumn, AupTableRow, AupTableSelectionCell, AupTableSelectionColumn, AupToolBar, AupTreeTable, Builder, Button, ElementLocator, FormElementMixin, MatCheckbox, Page, PageBuilder, PageElement, Path };
751
735
  //# sourceMappingURL=coolon-angular-ui-powerups-cypress.js.map