@coolon/angular-ui-powerups 12.4.0-alpha.18 → 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.
- package/bundles/coolon-angular-ui-powerups-cypress.umd.js +197 -117
- package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +5 -4
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/cypress/builder.d.ts +4 -0
- package/cypress/components/aup-abstract-table.d.ts +18 -0
- package/cypress/components/aup-table.d.ts +4 -41
- package/cypress/components/aup-tree-table.d.ts +16 -0
- package/cypress/components/button.d.ts +2 -2
- package/cypress/components/form-element-mixin.d.ts +2 -2
- package/cypress/components/mat-checkbox.d.ts +2 -2
- package/cypress/components/table/aup-table-cell.d.ts +9 -0
- package/cypress/components/table/aup-table-column.d.ts +10 -0
- package/cypress/components/table/aup-table-row.d.ts +17 -0
- package/cypress/components/table/aup-table-selection-cell.d.ts +5 -0
- package/cypress/components/table/aup-table-selection-column.d.ts +5 -0
- package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -1
- package/cypress/exports.d.ts +7 -0
- package/cypress/page-element.d.ts +4 -4
- package/esm2015/cypress/builder.js +4 -0
- package/esm2015/cypress/builder.js.map +1 -1
- package/esm2015/cypress/builder.metadata.json +1 -1
- package/esm2015/cypress/components/aup-abstract-table.js +54 -0
- package/esm2015/cypress/components/aup-abstract-table.js.map +1 -0
- package/esm2015/cypress/components/aup-abstract-table.metadata.json +1 -0
- package/esm2015/cypress/components/aup-table.js +5 -111
- package/esm2015/cypress/components/aup-table.js.map +1 -1
- package/esm2015/cypress/components/aup-table.metadata.json +1 -1
- package/esm2015/cypress/components/aup-tree-table.js +34 -0
- package/esm2015/cypress/components/aup-tree-table.js.map +1 -0
- package/esm2015/cypress/components/aup-tree-table.metadata.json +1 -0
- package/esm2015/cypress/components/table/aup-table-cell.js +18 -0
- package/esm2015/cypress/components/table/aup-table-cell.js.map +1 -0
- package/esm2015/cypress/components/table/aup-table-cell.metadata.json +1 -0
- package/esm2015/cypress/components/table/aup-table-column.js +21 -0
- package/esm2015/cypress/components/table/aup-table-column.js.map +1 -0
- package/esm2015/cypress/components/table/aup-table-column.metadata.json +1 -0
- package/esm2015/cypress/components/table/aup-table-row.js +30 -0
- package/esm2015/cypress/components/table/aup-table-row.js.map +1 -0
- package/esm2015/cypress/components/table/aup-table-row.metadata.json +1 -0
- package/esm2015/cypress/components/table/aup-table-selection-cell.js +6 -0
- package/esm2015/cypress/components/table/aup-table-selection-cell.js.map +1 -0
- package/esm2015/cypress/components/table/aup-table-selection-cell.metadata.json +1 -0
- package/esm2015/cypress/components/table/aup-table-selection-column.js +6 -0
- package/esm2015/cypress/components/table/aup-table-selection-column.js.map +1 -0
- package/esm2015/cypress/components/table/aup-table-selection-column.metadata.json +1 -0
- package/esm2015/cypress/exports.js +7 -0
- package/esm2015/cypress/exports.js.map +1 -1
- package/esm2015/cypress/exports.metadata.json +1 -1
- package/esm2015/cypress/page-element.js +1 -1
- package/esm2015/cypress/page-element.js.map +1 -1
- package/esm2015/cypress/page-element.metadata.json +1 -1
- package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js +4 -4
- package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js.map +1 -1
- package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.metadata.json +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-table-model.js +1 -0
- package/esm2015/lib/components/tables/tree-table/tree-table-model.js.map +1 -1
- package/esm2015/lib/components/tables/tree-table/tree-table-model.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups-cypress.js +134 -89
- package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +5 -4
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/tables/tree-table/flattened-tree-list-model.d.ts +0 -1
- package/lib/components/tables/tree-table/tree-table-model.d.ts +4 -5
- package/package.json +1 -1
package/cypress/builder.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { AupEmptyState } from './components/aup-empty-state';
|
|
|
4
4
|
import { AupInput } from './components/aup-input';
|
|
5
5
|
import { AupNavigation } from './components/aup-navigation';
|
|
6
6
|
import { AupTable } from './components/aup-table';
|
|
7
|
+
import { AupTreeTable } from './components/aup-tree-table';
|
|
7
8
|
import { Button } from './components/button';
|
|
8
9
|
import { MatCheckbox } from './components/mat-checkbox';
|
|
9
10
|
import { Types } from './components/types';
|
|
@@ -27,6 +28,9 @@ export declare class Builder {
|
|
|
27
28
|
aupTable(selector?: string): AupTable;
|
|
28
29
|
aupTable<T extends object>(builder: Builder.ContainerCallback<T, AupTable>): AupTable & T;
|
|
29
30
|
aupTable<T extends object>(selector: string, builder: Builder.ContainerCallback<T, AupTable>): AupTable & T;
|
|
31
|
+
aupTreeTable(selector?: string): AupTreeTable;
|
|
32
|
+
aupTreeTable<T extends object>(builder: Builder.ContainerCallback<T, AupTreeTable>): AupTreeTable & T;
|
|
33
|
+
aupTreeTable<T extends object>(selector: string, builder: Builder.ContainerCallback<T, AupTreeTable>): AupTreeTable & T;
|
|
30
34
|
aupEmptyState(selector?: string): AupEmptyState;
|
|
31
35
|
aupEmptyState<T extends object>(builder: Builder.ContainerCallback<T, AupEmptyState>): AupEmptyState & T;
|
|
32
36
|
aupEmptyState<T extends object>(selector: string, builder: Builder.ContainerCallback<T, AupEmptyState>): AupEmptyState & T;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ElementLocator } from '../element-locator';
|
|
2
|
+
import { PageElement } from '../page-element';
|
|
3
|
+
import { AupTableColumn } from './table/aup-table-column';
|
|
4
|
+
import { AupTableRow } from './table/aup-table-row';
|
|
5
|
+
import { AupTableSelectionColumn } from './table/aup-table-selection-column';
|
|
6
|
+
export declare abstract class AupAbstractTable<TR extends AupTableRow> extends PageElement {
|
|
7
|
+
row(rowId: any): TR;
|
|
8
|
+
rowNumber(rowNumber: number): TR;
|
|
9
|
+
column(columnId: string): AupTableColumn<TR>;
|
|
10
|
+
get selectionColumn(): AupTableSelectionColumn<TR>;
|
|
11
|
+
abstract createRow(locator: ElementLocator): TR;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace AupAbstractTable {
|
|
14
|
+
function cssSelectorForTableRowById(rowId: string): string;
|
|
15
|
+
function cssSelectorForNthTableRow(rowNumber: number): string;
|
|
16
|
+
function cssSelectorForColumnCellRendererById(columnOrId: AupTableColumn<any> | string): string;
|
|
17
|
+
function cssSelectorForCell(rowId: string, columnOrId: string | AupTableColumn<any>): string;
|
|
18
|
+
}
|
|
@@ -1,45 +1,8 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
1
|
import { ElementLocator } from '../element-locator';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
column(columnId: string): AupTable.Column;
|
|
8
|
-
selectionColumn(): AupTable.SelectionColumn;
|
|
2
|
+
import { AupAbstractTable } from './aup-abstract-table';
|
|
3
|
+
import { AupTableRow } from './table/aup-table-row';
|
|
4
|
+
export declare class AupTable extends AupAbstractTable<AupTableRow> {
|
|
5
|
+
createRow(locator: ElementLocator): AupTableRow;
|
|
9
6
|
}
|
|
10
7
|
export declare namespace AupTable {
|
|
11
|
-
import Chainable = Cypress.Chainable;
|
|
12
|
-
function cssSelectorForTableRowById(rowId: string): string;
|
|
13
|
-
function cssSelectorForNthTableRow(rowNumber: number): string;
|
|
14
|
-
function cssSelectorForColumnCellRendererById(columnId: string): string;
|
|
15
|
-
function cssSelectorForCell(rowId: string, columnId: string): string;
|
|
16
|
-
class Row extends PageElement {
|
|
17
|
-
readonly table: AupTable;
|
|
18
|
-
constructor(table: AupTable, selectorOrLocator: string | ElementLocator);
|
|
19
|
-
rowId(): Chainable<string>;
|
|
20
|
-
shouldHaveRowId(rowId: string): void;
|
|
21
|
-
cell(columnId: string): Cell;
|
|
22
|
-
cell(column: AupTable.Column): Cell;
|
|
23
|
-
cell(column: AupTable.SelectionColumn): SelectionColumnCell;
|
|
24
|
-
shouldBeSelected(): void;
|
|
25
|
-
shouldNotBeSelected(): void;
|
|
26
|
-
}
|
|
27
|
-
class Column extends PageElement {
|
|
28
|
-
readonly table: AupTable;
|
|
29
|
-
readonly columnId: string;
|
|
30
|
-
constructor(table: AupTable, columnId: string);
|
|
31
|
-
cellContaining(content: string): Cell;
|
|
32
|
-
rowContaining(content: string): Row;
|
|
33
|
-
}
|
|
34
|
-
class SelectionColumn extends Column {
|
|
35
|
-
selectAll(): void;
|
|
36
|
-
}
|
|
37
|
-
class Cell extends PageElement {
|
|
38
|
-
readonly table: AupTable;
|
|
39
|
-
constructor(table: AupTable, elementLocator: ElementLocator);
|
|
40
|
-
rowId(): Chainable<string>;
|
|
41
|
-
row(): Row;
|
|
42
|
-
}
|
|
43
|
-
class SelectionColumnCell extends Cell {
|
|
44
|
-
}
|
|
45
8
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ElementLocator } from '../element-locator';
|
|
2
|
+
import { AupAbstractTable } from './aup-abstract-table';
|
|
3
|
+
import { AupTableColumn } from './table/aup-table-column';
|
|
4
|
+
import { AupTableRow } from './table/aup-table-row';
|
|
5
|
+
export declare class AupTreeTable extends AupAbstractTable<AupTreeTable.Row> {
|
|
6
|
+
get treeControlColumn(): AupTreeTable.TreeControlColumn;
|
|
7
|
+
createRow(locator: ElementLocator): AupTreeTable.Row;
|
|
8
|
+
}
|
|
9
|
+
export declare namespace AupTreeTable {
|
|
10
|
+
class Row extends AupTableRow {
|
|
11
|
+
shouldBeExpanded(): void;
|
|
12
|
+
shouldBeCollapsed(): void;
|
|
13
|
+
}
|
|
14
|
+
class TreeControlColumn extends AupTableColumn<Row> {
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -5,9 +5,9 @@ declare const Button_base: {
|
|
|
5
5
|
new (...args: any[]): {
|
|
6
6
|
shouldBeDisabled(): void;
|
|
7
7
|
readonly elementAccessStrategy: ElementLocator;
|
|
8
|
-
readonly parent: PageElement
|
|
8
|
+
readonly parent: PageElement<any>;
|
|
9
9
|
dom(): Cypress.Chainable<JQuery<HTMLElement>>;
|
|
10
|
-
find(selector: string): PageElement
|
|
10
|
+
find(selector: string): PageElement<PageElement<any>>;
|
|
11
11
|
click(text?: string): void;
|
|
12
12
|
readonly should: any;
|
|
13
13
|
getShoulder(element: Cypress.Chainable<JQuery<HTMLElement>>): any;
|
|
@@ -5,9 +5,9 @@ export declare function FormElementMixin<T, BC extends Constructable<PageElement
|
|
|
5
5
|
new (...args: any[]): {
|
|
6
6
|
shouldBeDisabled(): void;
|
|
7
7
|
readonly elementAccessStrategy: import("../element-locator").ElementLocator;
|
|
8
|
-
readonly parent: PageElement
|
|
8
|
+
readonly parent: PageElement<any>;
|
|
9
9
|
dom(): Cypress.Chainable<JQuery<HTMLElement>>;
|
|
10
|
-
find(selector: string): PageElement
|
|
10
|
+
find(selector: string): PageElement<PageElement<any>>;
|
|
11
11
|
click(text?: string): void;
|
|
12
12
|
readonly should: any;
|
|
13
13
|
getShoulder(element: Cypress.Chainable<JQuery<HTMLElement>>): any;
|
|
@@ -5,9 +5,9 @@ declare const MatCheckbox_base: {
|
|
|
5
5
|
new (...args: any[]): {
|
|
6
6
|
shouldBeDisabled(): void;
|
|
7
7
|
readonly elementAccessStrategy: ElementLocator;
|
|
8
|
-
readonly parent: PageElement
|
|
8
|
+
readonly parent: PageElement<any>;
|
|
9
9
|
dom(): Cypress.Chainable<JQuery<HTMLElement>>;
|
|
10
|
-
find(selector: string): PageElement
|
|
10
|
+
find(selector: string): PageElement<PageElement<any>>;
|
|
11
11
|
click(text?: string): void;
|
|
12
12
|
readonly should: any;
|
|
13
13
|
getShoulder(element: Cypress.Chainable<JQuery<HTMLElement>>): any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
import { PageElement } from '../../page-element';
|
|
3
|
+
import { AupAbstractTable } from '../aup-abstract-table';
|
|
4
|
+
import { AupTableRow } from './aup-table-row';
|
|
5
|
+
import Chainable = Cypress.Chainable;
|
|
6
|
+
export declare class AupTableCell<TR extends AupTableRow> extends PageElement<AupAbstractTable<TR>> {
|
|
7
|
+
rowId(): Chainable<string>;
|
|
8
|
+
row(): TR;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PageElement } from '../../page-element';
|
|
2
|
+
import { AupAbstractTable } from '../aup-abstract-table';
|
|
3
|
+
import { AupTableCell } from './aup-table-cell';
|
|
4
|
+
import { AupTableRow } from './aup-table-row';
|
|
5
|
+
export declare class AupTableColumn<TR extends AupTableRow> extends PageElement<AupAbstractTable<TR>> {
|
|
6
|
+
readonly columnId: string;
|
|
7
|
+
constructor(table: AupAbstractTable<any>, columnId: string);
|
|
8
|
+
cellContaining(content: string): AupTableCell<TR>;
|
|
9
|
+
rowContaining(content: string): TR;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
import { PageElement } from '../../page-element';
|
|
3
|
+
import { AupAbstractTable } from '../aup-abstract-table';
|
|
4
|
+
import { AupTableCell } from './aup-table-cell';
|
|
5
|
+
import { AupTableColumn } from './aup-table-column';
|
|
6
|
+
import { AupTableSelectionCell } from './aup-table-selection-cell';
|
|
7
|
+
import { AupTableSelectionColumn } from './aup-table-selection-column';
|
|
8
|
+
import Chainable = Cypress.Chainable;
|
|
9
|
+
export declare class AupTableRow extends PageElement<AupAbstractTable<any>> {
|
|
10
|
+
rowId(): Chainable<string>;
|
|
11
|
+
shouldHaveRowId(rowId: string): void;
|
|
12
|
+
cell(columnId: string): AupTableCell<this>;
|
|
13
|
+
cell(column: AupTableColumn<this>): AupTableCell<this>;
|
|
14
|
+
cell(column: AupTableSelectionColumn<this>): AupTableSelectionCell<this>;
|
|
15
|
+
shouldBeSelected(): void;
|
|
16
|
+
shouldNotBeSelected(): void;
|
|
17
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"exports":[{"from":"./components/types"}],"metadata":{"Builder":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"}]}],"find":[{"__symbolic":"method"}],"section":[{"__symbolic":"method"}],"contains":[{"__symbolic":"method"}],"button":[{"__symbolic":"method"}],"matCheckbox":[{"__symbolic":"method"}],"aupStringInput":[{"__symbolic":"method"}],"aupTextInput":[{"__symbolic":"method"}],"aupPasswordInput":[{"__symbolic":"method"}],"aupNumberInput":[{"__symbolic":"method"}],"aupCommand":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"aupTabbedNavigation":[{"__symbolic":"method"}],"aupSideNavigation":[{"__symbolic":"method"}],"aupTable":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"aupEmptyState":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"createElement":[{"__symbolic":"method"}],"createContainerElement":[{"__symbolic":"method"}]}},"ElementLocator":{"__symbolic":"interface"},"PageBuilder":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"Builder"},"members":{"aupModalActivity":[{"__symbolic":"method"}],"aupModalAlert":[{"__symbolic":"method"}],"aupModelConfirm":[{"__symbolic":"method"}]}},"PageElement":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]},{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"ElementLocator"}]},{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}],"dom":[{"__symbolic":"method"}],"find":[{"__symbolic":"method"}],"click":[{"__symbolic":"method"}],"getShoulder":[{"__symbolic":"method"}],"getShouldElement":[{"__symbolic":"method"}],"shouldBeVisible":[{"__symbolic":"method"}],"shouldNotBeVisible":[{"__symbolic":"method"}],"shouldExist":[{"__symbolic":"method"}],"shouldNotExist":[{"__symbolic":"method"}]}},"Page":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Path"}]}],"dom":[{"__symbolic":"method"}],"visit":[{"__symbolic":"method"}],"tryAndVisit":[{"__symbolic":"method"}],"shouldHaveActivityIds":[{"__symbolic":"method"}],"shouldNotHaveActivityIds":[{"__symbolic":"method"}],"shouldHaveTitle":[{"__symbolic":"method"}],"shouldBeActive":[{"__symbolic":"method"}]}},"Path":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Path"},"member":"Segment"}]}]}],"toUrl":[{"__symbolic":"method"}]}},"AupAbstractActivity":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}]}},"AupActivity":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"AupAbstractActivity"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}]}},"AupAlert":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"AupAbstractActivity"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}],"clickClose":[{"__symbolic":"method"}]}},"FaceElementLocator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ɵa"},"member":"CommandFace"}]}],"findIn":[{"__symbolic":"method"}],"shouldNotExist":[{"__symbolic":"method"}]}},"AupCommandFace":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ɵa"},"member":"CommandFace"}]}]},"statics":{"createElementLocator":{"__symbolic":"function","parameters":["face"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"FaceElementLocator"},"arguments":[{"__symbolic":"reference","name":"face"}]}}}},"AupCommandGroup":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{}},"AupCommand":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ɵa"},"member":"CommandFace"}]}],"click":[{"__symbolic":"method"}],"getShouldElement":[{"__symbolic":"method"}],"shouldBeDisabled":[{"__symbolic":"method"}],"getButton":[{"__symbolic":"method"}]}},"AupEmptyState":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"shouldContainText":[{"__symbolic":"method"}]}},"AupInput":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"PageElement"},"members":{"label":[{"__symbolic":"method"}],"hint":[{"__symbolic":"method"}],"error":[{"__symbolic":"method"}],"labelShouldBe":[{"__symbolic":"method"}],"hintShouldBe":[{"__symbolic":"method"}],"errorShouldBe":[{"__symbolic":"method"}],"shouldBeFocused":[{"__symbolic":"method"}],"shouldNotBeFocused":[{"__symbolic":"method"}],"type":[{"__symbolic":"method"}],"hitEnter":[{"__symbolic":"method"}],"input":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"setValue":[{"__symbolic":"method"}]}},"AupModalActivity":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"AupActivity"},"members":{"clickBackdrop":[{"__symbolic":"method"}]}},"AupModalAlert":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"AupAlert"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}],"clickBackdrop":[{"__symbolic":"method"}]}},"AupMoreMenu":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{},"statics":{"create":{"__symbolic":"function","parameters":["parent"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"AupMoreMenu"},"arguments":[{"__symbolic":"reference","name":"parent"},"aup-more-menu"]}}}},"AupNavigation":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"click":[{"__symbolic":"method"}],"face":[{"__symbolic":"method"}],"shouldHaveLink":[{"__symbolic":"method"}],"shouldNotHaveLink":[{"__symbolic":"method"}]}},"AupPopupMenu":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ɵa"},"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"}]}}}},"AupTable":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"row":[{"__symbolic":"method"}],"rowNumber":[{"__symbolic":"method"}],"column":[{"__symbolic":"method"}],"selectionColumn":[{"__symbolic":"method"}]}},"AupToolBar":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{}},"Button":{"__symbolic":"class","extends":{"__symbolic":"error","message":"Symbol reference expected","line":4,"character":28,"module":"./components/button"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}]}},"FormElementMixin":{"__symbolic":"function","parameters":["Base"],"value":{"__symbolic":"class"}},"MatCheckbox":{"__symbolic":"class","extends":{"__symbolic":"error","message":"Symbol reference expected","line":4,"character":33,"module":"./components/mat-checkbox"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}],"shouldBeChecked":[{"__symbolic":"method"}],"shouldNotBeChecked":[{"__symbolic":"method"}],"hiddenCheckBoxElement":[{"__symbolic":"method"}],"check":[{"__symbolic":"method"}],"uncheck":[{"__symbolic":"method"}]}}},"origins":{"Builder":"./builder","ElementLocator":"./element-locator","PageBuilder":"./page-builder","PageElement":"./page-element","Page":"./page","Path":"./path","AupAbstractActivity":"./components/aup-abstract-activity","AupActivity":"./components/aup-activity","AupAlert":"./components/aup-alert","FaceElementLocator":"./components/aup-command-face","AupCommandFace":"./components/aup-command-face","AupCommandGroup":"./components/aup-command-group","AupCommand":"./components/aup-command","AupEmptyState":"./components/aup-empty-state","AupInput":"./components/aup-input","AupModalActivity":"./components/aup-modal-activity","AupModalAlert":"./components/aup-modal-alert","AupMoreMenu":"./components/aup-more-menu","AupNavigation":"./components/aup-navigation","AupPopupMenu":"./components/aup-popup-menu","AupTable":"./components/aup-table","AupToolBar":"./components/aup-tool-bar","Button":"./components/button","FormElementMixin":"./components/form-element-mixin","MatCheckbox":"./components/mat-checkbox","ɵa":"./components/types"},"importAs":"@coolon/angular-ui-powerups/cypress"}
|
|
1
|
+
{"__symbolic":"module","version":4,"exports":[{"from":"./components/types"}],"metadata":{"Builder":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"}]}],"find":[{"__symbolic":"method"}],"section":[{"__symbolic":"method"}],"contains":[{"__symbolic":"method"}],"button":[{"__symbolic":"method"}],"matCheckbox":[{"__symbolic":"method"}],"aupStringInput":[{"__symbolic":"method"}],"aupTextInput":[{"__symbolic":"method"}],"aupPasswordInput":[{"__symbolic":"method"}],"aupNumberInput":[{"__symbolic":"method"}],"aupCommand":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"aupTabbedNavigation":[{"__symbolic":"method"}],"aupSideNavigation":[{"__symbolic":"method"}],"aupTable":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"aupTreeTable":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"aupEmptyState":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"createElement":[{"__symbolic":"method"}],"createContainerElement":[{"__symbolic":"method"}]}},"ElementLocator":{"__symbolic":"interface"},"PageBuilder":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"Builder"},"members":{"aupModalActivity":[{"__symbolic":"method"}],"aupModalAlert":[{"__symbolic":"method"}],"aupModelConfirm":[{"__symbolic":"method"}]}},"PageElement":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":9,"character":22,"context":{"typeName":"P"},"module":"./page-element"},{"__symbolic":"reference","name":"string"}]},{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":10,"character":22,"context":{"typeName":"P"},"module":"./page-element"},{"__symbolic":"reference","name":"ElementLocator"}]},{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":11,"character":31,"context":{"typeName":"P"},"module":"./page-element"},{"__symbolic":"reference","name":"string"}]}],"dom":[{"__symbolic":"method"}],"find":[{"__symbolic":"method"}],"click":[{"__symbolic":"method"}],"getShoulder":[{"__symbolic":"method"}],"getShouldElement":[{"__symbolic":"method"}],"shouldBeVisible":[{"__symbolic":"method"}],"shouldNotBeVisible":[{"__symbolic":"method"}],"shouldExist":[{"__symbolic":"method"}],"shouldNotExist":[{"__symbolic":"method"}]}},"Page":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Path"}]}],"dom":[{"__symbolic":"method"}],"visit":[{"__symbolic":"method"}],"tryAndVisit":[{"__symbolic":"method"}],"shouldHaveActivityIds":[{"__symbolic":"method"}],"shouldNotHaveActivityIds":[{"__symbolic":"method"}],"shouldHaveTitle":[{"__symbolic":"method"}],"shouldBeActive":[{"__symbolic":"method"}]}},"Path":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Path"},"member":"Segment"}]}]}],"toUrl":[{"__symbolic":"method"}]}},"AupAbstractActivity":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}]}},"AupAbstractTable":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"PageElement"},"members":{"row":[{"__symbolic":"method"}],"rowNumber":[{"__symbolic":"method"}],"column":[{"__symbolic":"method"}],"selectionColumn":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":31,"character":3}}]}],"createRow":[{"__symbolic":"method"}]}},"AupActivity":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"AupAbstractActivity"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}]}},"AupAlert":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"AupAbstractActivity"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}],"clickClose":[{"__symbolic":"method"}]}},"FaceElementLocator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ɵa"},"member":"CommandFace"}]}],"findIn":[{"__symbolic":"method"}],"shouldNotExist":[{"__symbolic":"method"}]}},"AupCommandFace":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ɵa"},"member":"CommandFace"}]}]},"statics":{"createElementLocator":{"__symbolic":"function","parameters":["face"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"FaceElementLocator"},"arguments":[{"__symbolic":"reference","name":"face"}]}}}},"AupCommandGroup":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{}},"AupCommand":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ɵa"},"member":"CommandFace"}]}],"click":[{"__symbolic":"method"}],"getShouldElement":[{"__symbolic":"method"}],"shouldBeDisabled":[{"__symbolic":"method"}],"getButton":[{"__symbolic":"method"}]}},"AupEmptyState":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"shouldContainText":[{"__symbolic":"method"}]}},"AupInput":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"PageElement"},"members":{"label":[{"__symbolic":"method"}],"hint":[{"__symbolic":"method"}],"error":[{"__symbolic":"method"}],"labelShouldBe":[{"__symbolic":"method"}],"hintShouldBe":[{"__symbolic":"method"}],"errorShouldBe":[{"__symbolic":"method"}],"shouldBeFocused":[{"__symbolic":"method"}],"shouldNotBeFocused":[{"__symbolic":"method"}],"type":[{"__symbolic":"method"}],"hitEnter":[{"__symbolic":"method"}],"input":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"setValue":[{"__symbolic":"method"}]}},"AupModalActivity":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"AupActivity"},"members":{"clickBackdrop":[{"__symbolic":"method"}]}},"AupModalAlert":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"AupAlert"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}],"clickBackdrop":[{"__symbolic":"method"}]}},"AupMoreMenu":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{},"statics":{"create":{"__symbolic":"function","parameters":["parent"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"AupMoreMenu"},"arguments":[{"__symbolic":"reference","name":"parent"},"aup-more-menu"]}}}},"AupNavigation":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"click":[{"__symbolic":"method"}],"face":[{"__symbolic":"method"}],"shouldHaveLink":[{"__symbolic":"method"}],"shouldNotHaveLink":[{"__symbolic":"method"}]}},"AupPopupMenu":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"ɵa"},"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"}]}}}},"AupTable":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"AupAbstractTable"},"members":{"createRow":[{"__symbolic":"method"}]}},"AupToolBar":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{}},"AupTreeTable":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"AupAbstractTable"},"members":{"treeControlColumn":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":9,"character":3}}]}],"createRow":[{"__symbolic":"method"}]}},"Button":{"__symbolic":"class","extends":{"__symbolic":"error","message":"Symbol reference expected","line":4,"character":28,"module":"./components/button"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}]}},"FormElementMixin":{"__symbolic":"function","parameters":["Base"],"value":{"__symbolic":"class"}},"MatCheckbox":{"__symbolic":"class","extends":{"__symbolic":"error","message":"Symbol reference expected","line":4,"character":33,"module":"./components/mat-checkbox"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"PageElement"},{"__symbolic":"reference","name":"string"}]}],"shouldBeChecked":[{"__symbolic":"method"}],"shouldNotBeChecked":[{"__symbolic":"method"}],"hiddenCheckBoxElement":[{"__symbolic":"method"}],"check":[{"__symbolic":"method"}],"uncheck":[{"__symbolic":"method"}]}},"AupTableCell":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"PageElement"},"members":{"rowId":[{"__symbolic":"method"}],"row":[{"__symbolic":"method"}]}},"AupTableColumn":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"PageElement"},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"AupAbstractTable"},{"__symbolic":"reference","name":"string"}]}],"cellContaining":[{"__symbolic":"method"}],"rowContaining":[{"__symbolic":"method"}]}},"AupTableRow":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"PageElement"},"members":{"rowId":[{"__symbolic":"method"}],"shouldHaveRowId":[{"__symbolic":"method"}],"cell":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"shouldBeSelected":[{"__symbolic":"method"}],"shouldNotBeSelected":[{"__symbolic":"method"}]}},"AupTableSelectionCell":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"AupTableCell"},"members":{"selectAll":[{"__symbolic":"method"}]}},"AupTableSelectionColumn":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"AupTableColumn"},"members":{"selectAll":[{"__symbolic":"method"}]}}},"origins":{"Builder":"./builder","ElementLocator":"./element-locator","PageBuilder":"./page-builder","PageElement":"./page-element","Page":"./page","Path":"./path","AupAbstractActivity":"./components/aup-abstract-activity","AupAbstractTable":"./components/aup-abstract-table","AupActivity":"./components/aup-activity","AupAlert":"./components/aup-alert","FaceElementLocator":"./components/aup-command-face","AupCommandFace":"./components/aup-command-face","AupCommandGroup":"./components/aup-command-group","AupCommand":"./components/aup-command","AupEmptyState":"./components/aup-empty-state","AupInput":"./components/aup-input","AupModalActivity":"./components/aup-modal-activity","AupModalAlert":"./components/aup-modal-alert","AupMoreMenu":"./components/aup-more-menu","AupNavigation":"./components/aup-navigation","AupPopupMenu":"./components/aup-popup-menu","AupTable":"./components/aup-table","AupToolBar":"./components/aup-tool-bar","AupTreeTable":"./components/aup-tree-table","Button":"./components/button","FormElementMixin":"./components/form-element-mixin","MatCheckbox":"./components/mat-checkbox","AupTableCell":"./components/table/aup-table-cell","AupTableColumn":"./components/table/aup-table-column","AupTableRow":"./components/table/aup-table-row","AupTableSelectionCell":"./components/table/aup-table-selection-cell","AupTableSelectionColumn":"./components/table/aup-table-selection-column","ɵa":"./components/types"},"importAs":"@coolon/angular-ui-powerups/cypress"}
|
package/cypress/exports.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./page-element";
|
|
|
8
8
|
export * from "./page";
|
|
9
9
|
export * from "./path";
|
|
10
10
|
export * from "./components/aup-abstract-activity";
|
|
11
|
+
export * from "./components/aup-abstract-table";
|
|
11
12
|
export * from "./components/aup-activity";
|
|
12
13
|
export * from "./components/aup-alert";
|
|
13
14
|
export * from "./components/aup-command-face";
|
|
@@ -22,7 +23,13 @@ export * from "./components/aup-navigation";
|
|
|
22
23
|
export * from "./components/aup-popup-menu";
|
|
23
24
|
export * from "./components/aup-table";
|
|
24
25
|
export * from "./components/aup-tool-bar";
|
|
26
|
+
export * from "./components/aup-tree-table";
|
|
25
27
|
export * from "./components/button";
|
|
26
28
|
export * from "./components/form-element-mixin";
|
|
27
29
|
export * from "./components/mat-checkbox";
|
|
28
30
|
export * from "./components/types";
|
|
31
|
+
export * from "./components/table/aup-table-cell";
|
|
32
|
+
export * from "./components/table/aup-table-column";
|
|
33
|
+
export * from "./components/table/aup-table-row";
|
|
34
|
+
export * from "./components/table/aup-table-selection-cell";
|
|
35
|
+
export * from "./components/table/aup-table-selection-column";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="cypress" />
|
|
2
2
|
import Chainable = Cypress.Chainable;
|
|
3
3
|
import { ElementLocator } from './element-locator';
|
|
4
|
-
export declare class PageElement {
|
|
5
|
-
readonly parent:
|
|
4
|
+
export declare class PageElement<P extends PageElement<any> = PageElement<any>> {
|
|
5
|
+
readonly parent: P;
|
|
6
6
|
readonly elementAccessStrategy: ElementLocator;
|
|
7
|
-
constructor(parent:
|
|
8
|
-
constructor(parent:
|
|
7
|
+
constructor(parent: P, selector: string);
|
|
8
|
+
constructor(parent: P, locator: ElementLocator);
|
|
9
9
|
dom(): Chainable<JQuery>;
|
|
10
10
|
find(selector: string): PageElement;
|
|
11
11
|
click(text?: string): void;
|
|
@@ -5,6 +5,7 @@ import { AupEmptyState } from './components/aup-empty-state';
|
|
|
5
5
|
import { AupInput } from './components/aup-input';
|
|
6
6
|
import { AupNavigation } from './components/aup-navigation';
|
|
7
7
|
import { AupTable } from './components/aup-table';
|
|
8
|
+
import { AupTreeTable } from './components/aup-tree-table';
|
|
8
9
|
import { Button } from './components/button';
|
|
9
10
|
import { MatCheckbox } from './components/mat-checkbox';
|
|
10
11
|
import { PageElement } from './page-element';
|
|
@@ -58,6 +59,9 @@ export class Builder {
|
|
|
58
59
|
aupTable(selectorOrBuilder, optionalBuilder) {
|
|
59
60
|
return this.createContainerElement(AupTable, selectorOrBuilder, optionalBuilder, 'aup-table');
|
|
60
61
|
}
|
|
62
|
+
aupTreeTable(selectorOrBuilder, optionalBuilder) {
|
|
63
|
+
return this.createContainerElement(AupTreeTable, selectorOrBuilder, optionalBuilder, 'aup-tree-table');
|
|
64
|
+
}
|
|
61
65
|
aupEmptyState(selectorOrBuilder, optionalBuilder) {
|
|
62
66
|
return this.createContainerElement(AupEmptyState, selectorOrBuilder, optionalBuilder, 'aup-empty-state');
|
|
63
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/cypress/src/builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,OAAO;IAElB,YAAqB,iBAA8B;QAA9B,sBAAiB,GAAjB,iBAAiB,CAAa;IACnD,CAAC;IAED,IAAI,CAAC,QAAgB;QACnB,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,CAAmB,QAAgB,EAAE,OAAqC;QAC/E,OAAO,IAAI,CAAC,sBAAsB,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAED,QAAQ,CAAC,IAAY;QACnB,OAA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B;IACH,CAAC;IAES,sBAAsB,CAA0C,KAAuB,EACvB,iBAA2D,EAC3D,eAAgD,EAChD,eAAwB;QAEhG,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,CAAC;QACrF,MAAM,OAAO,GAAG,CAAC,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,CAAC;QAEtF,IAAI,CAAC,QAAQ,EAAE;YACb,IAAI,CAAC,YAAY,CAAC,wDAAwD,CAAC,CAAC;SAC7E;QAED,MAAM,OAAO,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAC5D,IAAI,OAAO,EAAE;YACX,qDAAqD;YACrD,MAAM,gBAAgB,GAAG,WAAW,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;YAChF,4CAA4C;YAC5C,OAAO,WAAW,CAAC,WAAW,CAAC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;SAC7E;aAAM;YACL,OAAO,OAAgB,CAAC;SACzB;IACH,CAAC;CAEF","sourcesContent":["import { Constructable } from '@coolon/pectin';\nimport { lang, Mixin as CreateMixin } from '@coolon/typescript-utilities';\nimport * as _ from 'lodash';\nimport { AupCommand } from './components/aup-command';\nimport { AupEmptyState } from './components/aup-empty-state';\nimport { AupInput } from './components/aup-input';\nimport { AupNavigation } from './components/aup-navigation';\nimport { AupTable } from './components/aup-table';\nimport { Button } from './components/button';\nimport { MatCheckbox } from './components/mat-checkbox';\nimport { Types } from './components/types';\nimport { PageElement } from './page-element';\n\nexport class Builder {\n\n constructor(readonly parentPageElement: PageElement) {\n }\n\n find(selector: string): PageElement {\n return new PageElement(this.parentPageElement, selector);\n }\n\n section<T extends object>(selector: string, builder: Builder.ContainerCallback<T>): T & PageElement {\n return this.createContainerElement(PageElement, selector, builder);\n }\n\n contains(text: string): PageElement {\n return new PageElement(this.parentPageElement, {\n findIn(parent) {\n return parent.dom().contains(text);\n },\n shouldNotExist(parent) {\n return parent.dom().should('not.contain', text);\n }\n });\n }\n\n button(text: string): Button {\n return new Button(this.parentPageElement, text);\n }\n\n matCheckbox(text: string): MatCheckbox {\n return new MatCheckbox(this.parentPageElement, text);\n }\n\n aupStringInput(selector?: string): AupInput<string> {\n return new AupInput.HtmlInput(this.parentPageElement, selector ?? 'aup-string-input');\n }\n\n aupTextInput(selector?: string): AupInput<string> {\n return new AupInput.TextAreaInput(this.parentPageElement, selector ?? 'aup-text-input');\n }\n\n aupPasswordInput(selector?: string): AupInput<string> {\n return new AupInput.HtmlInput(this.parentPageElement, selector ?? 'aup-password-input');\n }\n\n aupNumberInput(selector?: string): AupInput<number> {\n return new AupInput.HtmlInput(this.parentPageElement, selector ?? 'aup-number-input');\n }\n\n aupCommand(selector: string): AupCommand\n // tslint:disable-next-line:unified-signatures\n aupCommand(face: Types.CommandFace): AupCommand\n aupCommand(faceOrSelector: string | Types.CommandFace): AupCommand {\n return new AupCommand(this.parentPageElement, faceOrSelector);\n }\n\n aupTabbedNavigation<T extends object>(): AupNavigation {\n return new AupNavigation(this.parentPageElement, 'aup-tabbed-place-navigation');\n }\n\n aupSideNavigation<T extends object>(): AupNavigation {\n return new AupNavigation(this.parentPageElement, 'aup-list-place-nav');\n }\n\n aupTable(selector?: string): AupTable\n aupTable<T extends object>(builder: Builder.ContainerCallback<T, AupTable>): AupTable & T\n aupTable<T extends object>(selector: string, builder: Builder.ContainerCallback<T, AupTable>): AupTable & T\n aupTable<T extends object>(selectorOrBuilder?: string | Builder.ContainerCallback<T, AupTable>,\n optionalBuilder?: Builder.ContainerCallback<T, AupTable>): AupTable & T {\n return this.createContainerElement(AupTable, selectorOrBuilder, optionalBuilder, 'aup-table');\n }\n\n aupEmptyState(selector?: string): AupEmptyState\n aupEmptyState<T extends object>(builder: Builder.ContainerCallback<T, AupEmptyState>): AupEmptyState & T\n aupEmptyState<T extends object>(selector: string,\n builder: Builder.ContainerCallback<T, AupEmptyState>): AupEmptyState & T\n aupEmptyState<T extends object>(selectorOrBuilder?: string | Builder.ContainerCallback<T, AupEmptyState>,\n optionalBuilder?: Builder.ContainerCallback<T, AupEmptyState>): AupEmptyState & T {\n return this.createContainerElement(AupEmptyState, selectorOrBuilder, optionalBuilder, 'aup-empty-state');\n }\n\n // TODO: use this in all the element factory methods to allow customisation\n protected createElement<T extends object, E extends PageElement>(klass: Constructable<E>,\n selectorOrBuilder: string | Builder.ElementCallback<T, E>,\n optionalBuilder: Builder.ElementCallback<T, E>,\n defaultSelector?: string): E & T {\n\n const selector = _.isString(selectorOrBuilder) ? selectorOrBuilder : defaultSelector;\n const builder = _.isFunction(selectorOrBuilder) ? selectorOrBuilder : optionalBuilder;\n\n if (!selector) {\n lang.illegalState('This element requires a selector but none was provided');\n }\n\n const element = new klass(this.parentPageElement, selector);\n if (builder) {\n return CreateMixin.createProxy(element, builder(element));\n } else {\n return element as E & T;\n }\n }\n\n protected createContainerElement<T extends object, E extends PageElement>(klass: Constructable<E>,\n selectorOrBuilder: string | Builder.ContainerCallback<T, E>,\n optionalBuilder: Builder.ContainerCallback<T, E>,\n defaultSelector?: string): E & T {\n\n const selector = _.isString(selectorOrBuilder) ? selectorOrBuilder : defaultSelector;\n const builder = _.isFunction(selectorOrBuilder) ? selectorOrBuilder : optionalBuilder;\n\n if (!selector) {\n lang.illegalState('This element requires a selector but none was provided');\n }\n\n const element = new klass(this.parentPageElement, selector);\n if (builder) {\n // create the B&E type that the builder has access to\n const decoratedElement = CreateMixin.createProxy(element, new Builder(element));\n // create final type that has the E & T type\n return CreateMixin.createProxy(decoratedElement, builder(decoratedElement));\n } else {\n return element as E & T;\n }\n }\n\n}\n\n\nexport namespace Builder {\n export type ElementCallback<T, E extends PageElement = PageElement> = (section: E) => T;\n export type ContainerCallback<T, E extends PageElement = PageElement, B extends Builder = Builder> = (section: B & E) => T;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/cypress/src/builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,OAAO;IAElB,YAAqB,iBAA8B;QAA9B,sBAAiB,GAAjB,iBAAiB,CAAa;IACnD,CAAC;IAED,IAAI,CAAC,QAAgB;QACnB,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,CAAmB,QAAgB,EAAE,OAAqC;QAC/E,OAAO,IAAI,CAAC,sBAAsB,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAED,QAAQ,CAAC,IAAY;QACnB,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,iBAAiB,EAAE;YAC7C,MAAM,CAAC,MAAM;gBACX,OAAO,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CA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YACL,OAAO,OAAgB,CAAC;SACzB;IACH,CAAC;IAES,sBAAsB,CAA0C,KAAuB,EACvB,iBAA2D,EAC3D,eAAgD,EAChD,eAAwB;QAEhG,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,CAAC;QACrF,MAAM,OAAO,GAAG,CAAC,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,CAAC;QAEtF,IAAI,CAAC,QAAQ,EAAE;YACb,IAAI,CAAC,YAAY,CAAC,wDAAwD,CAAC,CAAC;SAC7E;QAED,MAAM,OAAO,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QAC5D,IAAI,OAAO,EAAE;YACX,qDAAqD;YACrD,MAAM,gBAAgB,GAAG,WAAW,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;YAChF,4CAA4C;YAC5C,OAAO,WAAW,CAAC,WAAW,CAAC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;SAC7E;aAAM;YACL,OAAO,OAAgB,CAAC;SACzB;IACH,CAAC;CAEF","sourcesContent":["import { Constructable } from '@coolon/pectin';\nimport { lang, Mixin as CreateMixin } from '@coolon/typescript-utilities';\nimport * as _ from 'lodash';\nimport { AupCommand } from './components/aup-command';\nimport { AupEmptyState } from './components/aup-empty-state';\nimport { AupInput } from './components/aup-input';\nimport { AupNavigation } from './components/aup-navigation';\nimport { AupTable } from './components/aup-table';\nimport { AupTreeTable } from './components/aup-tree-table';\nimport { Button } from './components/button';\nimport { MatCheckbox } from './components/mat-checkbox';\nimport { Types } from './components/types';\nimport { PageElement } from './page-element';\n\nexport class Builder {\n\n constructor(readonly parentPageElement: PageElement) {\n }\n\n find(selector: string): PageElement {\n return new PageElement(this.parentPageElement, selector);\n }\n\n section<T extends object>(selector: string, builder: Builder.ContainerCallback<T>): T & PageElement {\n return this.createContainerElement(PageElement, selector, builder);\n }\n\n contains(text: string): PageElement {\n return new PageElement(this.parentPageElement, {\n findIn(parent) {\n return parent.dom().contains(text);\n },\n shouldNotExist(parent) {\n return parent.dom().should('not.contain', text);\n }\n });\n }\n\n button(text: string): Button {\n return new Button(this.parentPageElement, text);\n }\n\n matCheckbox(text: string): MatCheckbox {\n return new MatCheckbox(this.parentPageElement, text);\n }\n\n aupStringInput(selector?: string): AupInput<string> {\n return new AupInput.HtmlInput(this.parentPageElement, selector ?? 'aup-string-input');\n }\n\n aupTextInput(selector?: string): AupInput<string> {\n return new AupInput.TextAreaInput(this.parentPageElement, selector ?? 'aup-text-input');\n }\n\n aupPasswordInput(selector?: string): AupInput<string> {\n return new AupInput.HtmlInput(this.parentPageElement, selector ?? 'aup-password-input');\n }\n\n aupNumberInput(selector?: string): AupInput<number> {\n return new AupInput.HtmlInput(this.parentPageElement, selector ?? 'aup-number-input');\n }\n\n aupCommand(selector: string): AupCommand\n // tslint:disable-next-line:unified-signatures\n aupCommand(face: Types.CommandFace): AupCommand\n aupCommand(faceOrSelector: string | Types.CommandFace): AupCommand {\n return new AupCommand(this.parentPageElement, faceOrSelector);\n }\n\n aupTabbedNavigation<T extends object>(): AupNavigation {\n return new AupNavigation(this.parentPageElement, 'aup-tabbed-place-navigation');\n }\n\n aupSideNavigation<T extends object>(): AupNavigation {\n return new AupNavigation(this.parentPageElement, 'aup-list-place-nav');\n }\n\n aupTable(selector?: string): AupTable\n aupTable<T extends object>(builder: Builder.ContainerCallback<T, AupTable>): AupTable & T\n aupTable<T extends object>(selector: string, builder: Builder.ContainerCallback<T, AupTable>): AupTable & T\n aupTable<T extends object>(selectorOrBuilder?: string | Builder.ContainerCallback<T, AupTable>,\n optionalBuilder?: Builder.ContainerCallback<T, AupTable>): AupTable & T {\n return this.createContainerElement(AupTable, selectorOrBuilder, optionalBuilder, 'aup-table');\n }\n\n aupTreeTable(selector?: string): AupTreeTable\n aupTreeTable<T extends object>(builder: Builder.ContainerCallback<T, AupTreeTable>): AupTreeTable & T\n aupTreeTable<T extends object>(selector: string, builder: Builder.ContainerCallback<T, AupTreeTable>): AupTreeTable & T\n aupTreeTable<T extends object>(selectorOrBuilder?: string | Builder.ContainerCallback<T, AupTreeTable>,\n optionalBuilder?: Builder.ContainerCallback<T, AupTreeTable>): AupTreeTable & T {\n return this.createContainerElement(AupTreeTable, selectorOrBuilder, optionalBuilder, 'aup-tree-table');\n }\n\n aupEmptyState(selector?: string): AupEmptyState\n aupEmptyState<T extends object>(builder: Builder.ContainerCallback<T, AupEmptyState>): AupEmptyState & T\n aupEmptyState<T extends object>(selector: string,\n builder: Builder.ContainerCallback<T, AupEmptyState>): AupEmptyState & T\n aupEmptyState<T extends object>(selectorOrBuilder?: string | Builder.ContainerCallback<T, AupEmptyState>,\n optionalBuilder?: Builder.ContainerCallback<T, AupEmptyState>): AupEmptyState & T {\n return this.createContainerElement(AupEmptyState, selectorOrBuilder, optionalBuilder, 'aup-empty-state');\n }\n\n // TODO: use this in all the element factory methods to allow customisation\n protected createElement<T extends object, E extends PageElement>(klass: Constructable<E>,\n selectorOrBuilder: string | Builder.ElementCallback<T, E>,\n optionalBuilder: Builder.ElementCallback<T, E>,\n defaultSelector?: string): E & T {\n\n const selector = _.isString(selectorOrBuilder) ? selectorOrBuilder : defaultSelector;\n const builder = _.isFunction(selectorOrBuilder) ? selectorOrBuilder : optionalBuilder;\n\n if (!selector) {\n lang.illegalState('This element requires a selector but none was provided');\n }\n\n const element = new klass(this.parentPageElement, selector);\n if (builder) {\n return CreateMixin.createProxy(element, builder(element));\n } else {\n return element as E & T;\n }\n }\n\n protected createContainerElement<T extends object, E extends PageElement>(klass: Constructable<E>,\n selectorOrBuilder: string | Builder.ContainerCallback<T, E>,\n optionalBuilder: Builder.ContainerCallback<T, E>,\n defaultSelector?: string): E & T {\n\n const selector = _.isString(selectorOrBuilder) ? selectorOrBuilder : defaultSelector;\n const builder = _.isFunction(selectorOrBuilder) ? selectorOrBuilder : optionalBuilder;\n\n if (!selector) {\n lang.illegalState('This element requires a selector but none was provided');\n }\n\n const element = new klass(this.parentPageElement, selector);\n if (builder) {\n // create the B&E type that the builder has access to\n const decoratedElement = CreateMixin.createProxy(element, new Builder(element));\n // create final type that has the E & T type\n return CreateMixin.createProxy(decoratedElement, builder(decoratedElement));\n } else {\n return element as E & T;\n }\n }\n\n}\n\n\nexport namespace Builder {\n export type ElementCallback<T, E extends PageElement = PageElement> = (section: E) => T;\n export type ContainerCallback<T, E extends PageElement = PageElement, B extends Builder = Builder> = (section: B & E) => T;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"Builder":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./page-element","name":"PageElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"Builder":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./page-element","name":"PageElement","line":16,"character":42}]}],"find":[{"__symbolic":"method"}],"section":[{"__symbolic":"method"}],"contains":[{"__symbolic":"method"}],"button":[{"__symbolic":"method"}],"matCheckbox":[{"__symbolic":"method"}],"aupStringInput":[{"__symbolic":"method"}],"aupTextInput":[{"__symbolic":"method"}],"aupPasswordInput":[{"__symbolic":"method"}],"aupNumberInput":[{"__symbolic":"method"}],"aupCommand":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"aupTabbedNavigation":[{"__symbolic":"method"}],"aupSideNavigation":[{"__symbolic":"method"}],"aupTable":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"aupTreeTable":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"aupEmptyState":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"createElement":[{"__symbolic":"method"}],"createContainerElement":[{"__symbolic":"method"}]}}}}]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
/* tslint:disable:unified-signatures */
|
|
3
|
+
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
4
|
+
import * as _ from 'lodash';
|
|
5
|
+
import { PageElement } from '../page-element';
|
|
6
|
+
import { AupTableColumn } from './table/aup-table-column';
|
|
7
|
+
import { AupTableSelectionColumn } from './table/aup-table-selection-column';
|
|
8
|
+
export class AupAbstractTable extends PageElement {
|
|
9
|
+
row(rowId) {
|
|
10
|
+
return this.createRow({
|
|
11
|
+
findIn(parent) {
|
|
12
|
+
return parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
rowNumber(rowNumber) {
|
|
17
|
+
return this.createRow({
|
|
18
|
+
findIn(parent) {
|
|
19
|
+
return parent.dom().find(AupAbstractTable.cssSelectorForNthTableRow(rowNumber));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
column(columnId) {
|
|
24
|
+
return new AupTableColumn(this, columnId);
|
|
25
|
+
}
|
|
26
|
+
get selectionColumn() {
|
|
27
|
+
return new AupTableSelectionColumn(this, 'selection-column');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
__decorate([
|
|
31
|
+
Memoize(),
|
|
32
|
+
__metadata("design:type", AupTableSelectionColumn),
|
|
33
|
+
__metadata("design:paramtypes", [])
|
|
34
|
+
], AupAbstractTable.prototype, "selectionColumn", null);
|
|
35
|
+
(function (AupAbstractTable) {
|
|
36
|
+
function cssSelectorForTableRowById(rowId) {
|
|
37
|
+
return `tbody tr[aup-row-id=${rowId}]`;
|
|
38
|
+
}
|
|
39
|
+
AupAbstractTable.cssSelectorForTableRowById = cssSelectorForTableRowById;
|
|
40
|
+
function cssSelectorForNthTableRow(rowNumber) {
|
|
41
|
+
return `tbody tr:nth-child(${rowNumber})`;
|
|
42
|
+
}
|
|
43
|
+
AupAbstractTable.cssSelectorForNthTableRow = cssSelectorForNthTableRow;
|
|
44
|
+
function cssSelectorForColumnCellRendererById(columnOrId) {
|
|
45
|
+
const columnId = _.isString(columnOrId) ? columnOrId : columnOrId.columnId;
|
|
46
|
+
return `aup-table-cell-renderer[column-id=${columnId}]`;
|
|
47
|
+
}
|
|
48
|
+
AupAbstractTable.cssSelectorForColumnCellRendererById = cssSelectorForColumnCellRendererById;
|
|
49
|
+
function cssSelectorForCell(rowId, columnOrId) {
|
|
50
|
+
return `${cssSelectorForTableRowById(rowId)} ${cssSelectorForColumnCellRendererById(columnOrId)}`;
|
|
51
|
+
}
|
|
52
|
+
AupAbstractTable.cssSelectorForCell = cssSelectorForCell;
|
|
53
|
+
})(AupAbstractTable || (AupAbstractTable = {}));
|
|
54
|
+
//# sourceMappingURL=aup-abstract-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aup-abstract-table.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/cypress/src/components/aup-abstract-table.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,kDAAkD,CAAC;AAC3E,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAE7E,MAAM,OAAgB,gBAAyC,SAAQ,WAAW;IAEhF,GAAG,CAAC,KAAU;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,MAAM,CAAC,MAAmB;gBACxB,OAAO,MAAM,CAAC,GAAG,EAAE,C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C;IAFe,mCAAkB,qBAEjC,CAAA;AAEH,CAAC,EApBgB,gBAAgB,KAAhB,gBAAgB,QAoBhC","sourcesContent":["/* tslint:disable:unified-signatures */\nimport { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';\nimport * as _ from 'lodash';\nimport { ElementLocator } from '../element-locator';\nimport { PageElement } from '../page-element';\nimport { AupTableColumn } from './table/aup-table-column';\nimport { AupTableRow } from './table/aup-table-row';\nimport { AupTableSelectionColumn } from './table/aup-table-selection-column';\n\nexport abstract class AupAbstractTable<TR extends AupTableRow> extends PageElement {\n\n row(rowId: any): TR {\n return this.createRow({\n findIn(parent: PageElement): Cypress.Chainable<JQuery> {\n return parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId));\n }\n });\n }\n\n rowNumber(rowNumber: number): TR {\n return this.createRow({\n findIn(parent: PageElement): Cypress.Chainable<JQuery> {\n return parent.dom().find(AupAbstractTable.cssSelectorForNthTableRow(rowNumber));\n }\n });\n }\n\n column(columnId: string): AupTableColumn<TR> {\n return new AupTableColumn(this, columnId);\n }\n\n @Memoize()\n get selectionColumn(): AupTableSelectionColumn<TR> {\n return new AupTableSelectionColumn(this, 'selection-column');\n }\n\n abstract createRow(locator: ElementLocator): TR\n\n}\n\nexport namespace AupAbstractTable {\n\n\n export function cssSelectorForTableRowById(rowId: string) {\n return `tbody tr[aup-row-id=${rowId}]`;\n }\n\n export function cssSelectorForNthTableRow(rowNumber: number) {\n return `tbody tr:nth-child(${rowNumber})`;\n }\n\n export function cssSelectorForColumnCellRendererById(columnOrId: AupTableColumn<any> | string) {\n const columnId = _.isString(columnOrId) ? columnOrId : columnOrId.columnId;\n return `aup-table-cell-renderer[column-id=${columnId}]`;\n }\n\n export function cssSelectorForCell(rowId: string, columnOrId: string | AupTableColumn<any>) {\n return `${cssSelectorForTableRowById(rowId)} ${cssSelectorForColumnCellRendererById(columnOrId)}`;\n }\n\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"AupAbstractTable":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../page-element","name":"PageElement","line":9,"character":71},"arity":1,"members":{"row":[{"__symbolic":"method"}],"rowNumber":[{"__symbolic":"method"}],"column":[{"__symbolic":"method"}],"selectionColumn":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@typescript-plus/fast-memoize-decorator/dist/src","name":"Memoize","line":31,"character":3}}]}],"createRow":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,114 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return new AupTable.Row(this, AupTable.cssSelectorForTableRowById(rowId));
|
|
7
|
-
}
|
|
8
|
-
rowNumber(rowNumber) {
|
|
9
|
-
return new AupTable.Row(this, AupTable.cssSelectorForNthTableRow(rowNumber));
|
|
10
|
-
}
|
|
11
|
-
column(columnId) {
|
|
12
|
-
return new AupTable.Column(this, columnId);
|
|
13
|
-
}
|
|
14
|
-
selectionColumn() {
|
|
15
|
-
return new AupTable.SelectionColumn(this, 'selection-column');
|
|
1
|
+
import { AupAbstractTable } from './aup-abstract-table';
|
|
2
|
+
import { AupTableRow } from './table/aup-table-row';
|
|
3
|
+
export class AupTable extends AupAbstractTable {
|
|
4
|
+
createRow(locator) {
|
|
5
|
+
return new AupTableRow(this, locator);
|
|
16
6
|
}
|
|
17
7
|
}
|
|
18
|
-
(function (AupTable) {
|
|
19
|
-
function cssSelectorForTableRowById(rowId) {
|
|
20
|
-
return `tbody tr[aup-row-id=${rowId}]`;
|
|
21
|
-
}
|
|
22
|
-
AupTable.cssSelectorForTableRowById = cssSelectorForTableRowById;
|
|
23
|
-
function cssSelectorForNthTableRow(rowNumber) {
|
|
24
|
-
return `tbody tr:nth-child(${rowNumber})`;
|
|
25
|
-
}
|
|
26
|
-
AupTable.cssSelectorForNthTableRow = cssSelectorForNthTableRow;
|
|
27
|
-
function cssSelectorForColumnCellRendererById(columnId) {
|
|
28
|
-
return `aup-table-cell-renderer[column-id=${columnId}]`;
|
|
29
|
-
}
|
|
30
|
-
AupTable.cssSelectorForColumnCellRendererById = cssSelectorForColumnCellRendererById;
|
|
31
|
-
function cssSelectorForCell(rowId, columnId) {
|
|
32
|
-
return `${cssSelectorForTableRowById(rowId)} ${cssSelectorForColumnCellRendererById(columnId)}`;
|
|
33
|
-
}
|
|
34
|
-
AupTable.cssSelectorForCell = cssSelectorForCell;
|
|
35
|
-
class Row extends PageElement {
|
|
36
|
-
constructor(table, selectorOrLocator) {
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
super(table, selectorOrLocator);
|
|
39
|
-
this.table = table;
|
|
40
|
-
}
|
|
41
|
-
rowId() {
|
|
42
|
-
return this.dom()
|
|
43
|
-
.invoke('attr', 'aup-row-id');
|
|
44
|
-
}
|
|
45
|
-
shouldHaveRowId(rowId) {
|
|
46
|
-
this.rowId().should("eq", rowId);
|
|
47
|
-
}
|
|
48
|
-
cell(columnOrId) {
|
|
49
|
-
const self = this;
|
|
50
|
-
const columnId = _.isString(columnOrId) ? columnOrId : columnOrId.columnId;
|
|
51
|
-
return new Cell(this.table, {
|
|
52
|
-
findIn(parent) {
|
|
53
|
-
return self.rowId()
|
|
54
|
-
.then(rowId => AupTable.cssSelectorForCell(rowId, columnId))
|
|
55
|
-
.then(selector => parent.dom().find(selector));
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
shouldBeSelected() {
|
|
60
|
-
this.dom().should('have.class', 'aup-row-selected');
|
|
61
|
-
}
|
|
62
|
-
shouldNotBeSelected() {
|
|
63
|
-
this.dom().should('not.have.class', 'aup-row-selected');
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
AupTable.Row = Row;
|
|
67
|
-
class Column extends PageElement {
|
|
68
|
-
constructor(table, columnId) {
|
|
69
|
-
super(table, `aup-table-header-cell-renderer[column-id="${columnId}"]`);
|
|
70
|
-
this.table = table;
|
|
71
|
-
this.columnId = columnId;
|
|
72
|
-
}
|
|
73
|
-
cellContaining(content) {
|
|
74
|
-
const self = this;
|
|
75
|
-
return new Cell(this.table, {
|
|
76
|
-
findIn(parent) {
|
|
77
|
-
return parent.dom().contains(cssSelectorForColumnCellRendererById(self.columnId), content);
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
rowContaining(content) {
|
|
82
|
-
return this.cellContaining(content).row();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
AupTable.Column = Column;
|
|
86
|
-
class SelectionColumn extends Column {
|
|
87
|
-
selectAll() {
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
AupTable.SelectionColumn = SelectionColumn;
|
|
91
|
-
class Cell extends PageElement {
|
|
92
|
-
constructor(table, elementLocator) {
|
|
93
|
-
super(table, elementLocator);
|
|
94
|
-
this.table = table;
|
|
95
|
-
}
|
|
96
|
-
rowId() {
|
|
97
|
-
return this.dom().closest('tr').invoke('attr', 'aup-row-id');
|
|
98
|
-
}
|
|
99
|
-
row() {
|
|
100
|
-
const self = this;
|
|
101
|
-
return new Row(this.table, {
|
|
102
|
-
findIn(parent) {
|
|
103
|
-
return self.rowId()
|
|
104
|
-
.then(rowId => parent.dom().find(AupTable.cssSelectorForTableRowById(rowId)));
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
AupTable.Cell = Cell;
|
|
110
|
-
class SelectionColumnCell extends Cell {
|
|
111
|
-
}
|
|
112
|
-
AupTable.SelectionColumnCell = SelectionColumnCell;
|
|
113
|
-
})(AupTable || (AupTable = {}));
|
|
114
8
|
//# sourceMappingURL=aup-table.js.map
|