@ngneers/controls-playwright 0.0.1-pre1
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/README.md +20 -0
- package/awesome-publish.config.ts +6 -0
- package/dist/components/accordion.d.ts +21 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +42 -0
- package/dist/components/avatar.d.ts +9 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +16 -0
- package/dist/components/breadcrumb.d.ts +20 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +15 -0
- package/dist/components/button-group.d.ts +10 -0
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +16 -0
- package/dist/components/button.d.ts +6 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +6 -0
- package/dist/components/calendar.d.ts +101 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +56 -0
- package/dist/components/chip.d.ts +15 -0
- package/dist/components/chip.d.ts.map +1 -0
- package/dist/components/chip.js +38 -0
- package/dist/components/edit-inplace.d.ts +18 -0
- package/dist/components/edit-inplace.d.ts.map +1 -0
- package/dist/components/edit-inplace.js +29 -0
- package/dist/components/filter.d.ts +186 -0
- package/dist/components/filter.d.ts.map +1 -0
- package/dist/components/filter.js +55 -0
- package/dist/components/hint.d.ts +10 -0
- package/dist/components/hint.d.ts.map +1 -0
- package/dist/components/hint.js +22 -0
- package/dist/components/index.d.ts +38 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +37 -0
- package/dist/components/inplace.d.ts +12 -0
- package/dist/components/inplace.d.ts.map +1 -0
- package/dist/components/inplace.js +29 -0
- package/dist/components/input-field.d.ts +12 -0
- package/dist/components/input-field.d.ts.map +1 -0
- package/dist/components/input-field.js +11 -0
- package/dist/components/input.d.ts +12 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +25 -0
- package/dist/components/item-view.d.ts +18 -0
- package/dist/components/item-view.d.ts.map +1 -0
- package/dist/components/item-view.js +39 -0
- package/dist/components/list-box.d.ts +20 -0
- package/dist/components/list-box.d.ts.map +1 -0
- package/dist/components/list-box.js +24 -0
- package/dist/components/mask-input.d.ts +62 -0
- package/dist/components/mask-input.d.ts.map +1 -0
- package/dist/components/mask-input.js +109 -0
- package/dist/components/menu.d.ts +16 -0
- package/dist/components/menu.d.ts.map +1 -0
- package/dist/components/menu.js +26 -0
- package/dist/components/message.d.ts +10 -0
- package/dist/components/message.d.ts.map +1 -0
- package/dist/components/message.js +22 -0
- package/dist/components/popover.d.ts +12 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +33 -0
- package/dist/components/progress.d.ts +17 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +46 -0
- package/dist/components/radio.d.ts +16 -0
- package/dist/components/radio.d.ts.map +1 -0
- package/dist/components/radio.js +35 -0
- package/dist/components/scroller.d.ts +20 -0
- package/dist/components/scroller.d.ts.map +1 -0
- package/dist/components/scroller.js +58 -0
- package/dist/components/select-button.d.ts +30 -0
- package/dist/components/select-button.d.ts.map +1 -0
- package/dist/components/select-button.js +46 -0
- package/dist/components/select.d.ts +46 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +74 -0
- package/dist/components/slider.d.ts +26 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +73 -0
- package/dist/components/snackbar.d.ts +27 -0
- package/dist/components/snackbar.d.ts.map +1 -0
- package/dist/components/snackbar.js +70 -0
- package/dist/components/spinner.d.ts +11 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +22 -0
- package/dist/components/state.d.ts +31 -0
- package/dist/components/state.d.ts.map +1 -0
- package/dist/components/state.js +31 -0
- package/dist/components/switch.d.ts +12 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +39 -0
- package/dist/components/tabs.d.ts +22 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +42 -0
- package/dist/components/tag.d.ts +10 -0
- package/dist/components/tag.d.ts.map +1 -0
- package/dist/components/tag.js +22 -0
- package/dist/components/toast.d.ts +27 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +68 -0
- package/dist/components/toggle-button.d.ts +10 -0
- package/dist/components/toggle-button.d.ts.map +1 -0
- package/dist/components/toggle-button.js +29 -0
- package/dist/components/tooltip.d.ts +12 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +32 -0
- package/dist/components/tree.d.ts +47 -0
- package/dist/components/tree.d.ts.map +1 -0
- package/dist/components/tree.js +85 -0
- package/dist/components/upload.d.ts +27 -0
- package/dist/components/upload.d.ts.map +1 -0
- package/dist/components/upload.js +47 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/classes.d.ts +119 -0
- package/dist/utils/classes.d.ts.map +1 -0
- package/dist/utils/classes.js +31 -0
- package/dist/utils/theme.d.ts +3 -0
- package/dist/utils/theme.d.ts.map +1 -0
- package/dist/utils/theme.js +41 -0
- package/package.json +38 -0
- package/src/components/accordion.ts +50 -0
- package/src/components/avatar.ts +17 -0
- package/src/components/breadcrumb.ts +17 -0
- package/src/components/button-group.ts +18 -0
- package/src/components/button.ts +5 -0
- package/src/components/calendar.ts +67 -0
- package/src/components/chip.ts +43 -0
- package/src/components/edit-inplace.ts +34 -0
- package/src/components/filter.ts +70 -0
- package/src/components/hint.ts +25 -0
- package/src/components/index.ts +37 -0
- package/src/components/inplace.ts +33 -0
- package/src/components/input-field.ts +16 -0
- package/src/components/input.ts +32 -0
- package/src/components/item-view.ts +48 -0
- package/src/components/list-box.ts +25 -0
- package/src/components/mask-input.ts +119 -0
- package/src/components/menu.ts +29 -0
- package/src/components/message.ts +25 -0
- package/src/components/popover.ts +39 -0
- package/src/components/progress.ts +53 -0
- package/src/components/radio.ts +42 -0
- package/src/components/scroller.ts +68 -0
- package/src/components/select-button.ts +57 -0
- package/src/components/select.ts +81 -0
- package/src/components/slider.ts +84 -0
- package/src/components/snackbar.ts +84 -0
- package/src/components/spinner.ts +27 -0
- package/src/components/state.ts +37 -0
- package/src/components/switch.ts +43 -0
- package/src/components/tabs.ts +50 -0
- package/src/components/tag.ts +25 -0
- package/src/components/toast.ts +82 -0
- package/src/components/toggle-button.ts +33 -0
- package/src/components/tooltip.ts +38 -0
- package/src/components/tree.ts +98 -0
- package/src/components/upload.ts +63 -0
- package/src/index.ts +1 -0
- package/src/utils/classes.ts +32 -0
- package/src/utils/theme.ts +44 -0
- package/tsconfig.lib.json +20 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { type Locator } from '@playwright/test';
|
|
2
|
+
import { NgnInputHarness } from './input';
|
|
3
|
+
import { NgnSelectHarness } from './select';
|
|
4
|
+
export declare class NgnFilterHarness {
|
|
5
|
+
locator: Locator;
|
|
6
|
+
readonly classes: import("@ngneers/controls-themes").ThemeClasses<import("@ngneers/controls-themes").ControlTemplate<"filter", ["root", "inline", "summary", "icon", "popover-content", "rows", "row", "condition-divider", "footer", "footer-actions", "active-indicator"], readonly [{
|
|
7
|
+
readonly class: "popover";
|
|
8
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"popover", ["root", "content", "content-closing"], readonly []>;
|
|
9
|
+
}, {
|
|
10
|
+
readonly class: "input-field";
|
|
11
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
12
|
+
readonly class: "input";
|
|
13
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
14
|
+
readonly projected: true;
|
|
15
|
+
}]>;
|
|
16
|
+
}, {
|
|
17
|
+
readonly class: "value";
|
|
18
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
19
|
+
readonly class: "input";
|
|
20
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
21
|
+
readonly projected: true;
|
|
22
|
+
}]>;
|
|
23
|
+
}, {
|
|
24
|
+
readonly class: "operator";
|
|
25
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
26
|
+
readonly class: "input";
|
|
27
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
28
|
+
readonly projected: true;
|
|
29
|
+
}]>;
|
|
30
|
+
}, {
|
|
31
|
+
readonly class: "list-select";
|
|
32
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"select", ["root", "combobox", "input", "icon", "input-editable", "popover-content", "filter-icon", "list-box-empty"], readonly [{
|
|
33
|
+
readonly class: "popover";
|
|
34
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"popover", ["root", "content", "content-closing"], readonly []>;
|
|
35
|
+
}, {
|
|
36
|
+
readonly class: "list-box";
|
|
37
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"list-box", ["root", "empty", "invalid", "item", "group", "default-item", "default-group", "item-selected", "item-highlighted", "item-disabled"], readonly [{
|
|
38
|
+
readonly class: "checkbox";
|
|
39
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"checkbox", ["root", "input", "box", "box-checked", "box-indeterminate", "box-icon", "box-icon-visible", "invalid"], readonly []>;
|
|
40
|
+
}, {
|
|
41
|
+
readonly class: "scroller";
|
|
42
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"scroller", ["root", "virtual", "item", "item-sticky"], readonly []>;
|
|
43
|
+
}]>;
|
|
44
|
+
}, {
|
|
45
|
+
readonly class: "filter";
|
|
46
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
47
|
+
readonly class: "input";
|
|
48
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
49
|
+
readonly projected: true;
|
|
50
|
+
}]>;
|
|
51
|
+
}]>;
|
|
52
|
+
}, {
|
|
53
|
+
readonly class: "operator-select";
|
|
54
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"select", ["root", "combobox", "input", "icon", "input-editable", "popover-content", "filter-icon", "list-box-empty"], readonly [{
|
|
55
|
+
readonly class: "popover";
|
|
56
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"popover", ["root", "content", "content-closing"], readonly []>;
|
|
57
|
+
}, {
|
|
58
|
+
readonly class: "list-box";
|
|
59
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"list-box", ["root", "empty", "invalid", "item", "group", "default-item", "default-group", "item-selected", "item-highlighted", "item-disabled"], readonly [{
|
|
60
|
+
readonly class: "checkbox";
|
|
61
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"checkbox", ["root", "input", "box", "box-checked", "box-indeterminate", "box-icon", "box-icon-visible", "invalid"], readonly []>;
|
|
62
|
+
}, {
|
|
63
|
+
readonly class: "scroller";
|
|
64
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"scroller", ["root", "virtual", "item", "item-sticky"], readonly []>;
|
|
65
|
+
}]>;
|
|
66
|
+
}, {
|
|
67
|
+
readonly class: "filter";
|
|
68
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
69
|
+
readonly class: "input";
|
|
70
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
71
|
+
readonly projected: true;
|
|
72
|
+
}]>;
|
|
73
|
+
}]>;
|
|
74
|
+
}, {
|
|
75
|
+
readonly class: "calendar";
|
|
76
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"calendar", ["root", "inline", "invalid", "details", "header", "navigation", "days", "week-day", "day", "day-selected", "day-today", "day-other-month", "months", "month", "time", "input-field"], readonly [{
|
|
77
|
+
readonly class: "input";
|
|
78
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"mask-input", ["root", "section", "section-active", "section-placeholder", "separator", "proxy", "sr-only"], readonly []>;
|
|
79
|
+
}, {
|
|
80
|
+
readonly class: "trigger-icon";
|
|
81
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"icon", ["root", "default"], readonly []>;
|
|
82
|
+
}, {
|
|
83
|
+
readonly class: "popover";
|
|
84
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"popover", ["root", "content", "content-closing"], readonly []>;
|
|
85
|
+
}, {
|
|
86
|
+
readonly class: "previous";
|
|
87
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"button", ["root", "inline", "loading", `kind-${string}`, `color-${string}`], readonly []>;
|
|
88
|
+
}, {
|
|
89
|
+
readonly class: "next";
|
|
90
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"button", ["root", "inline", "loading", `kind-${string}`, `color-${string}`], readonly []>;
|
|
91
|
+
}, {
|
|
92
|
+
readonly class: "current-month";
|
|
93
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"select", ["root", "combobox", "input", "icon", "input-editable", "popover-content", "filter-icon", "list-box-empty"], readonly [{
|
|
94
|
+
readonly class: "popover";
|
|
95
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"popover", ["root", "content", "content-closing"], readonly []>;
|
|
96
|
+
}, {
|
|
97
|
+
readonly class: "list-box";
|
|
98
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"list-box", ["root", "empty", "invalid", "item", "group", "default-item", "default-group", "item-selected", "item-highlighted", "item-disabled"], readonly [{
|
|
99
|
+
readonly class: "checkbox";
|
|
100
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"checkbox", ["root", "input", "box", "box-checked", "box-indeterminate", "box-icon", "box-icon-visible", "invalid"], readonly []>;
|
|
101
|
+
}, {
|
|
102
|
+
readonly class: "scroller";
|
|
103
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"scroller", ["root", "virtual", "item", "item-sticky"], readonly []>;
|
|
104
|
+
}]>;
|
|
105
|
+
}, {
|
|
106
|
+
readonly class: "filter";
|
|
107
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
108
|
+
readonly class: "input";
|
|
109
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
110
|
+
readonly projected: true;
|
|
111
|
+
}]>;
|
|
112
|
+
}]>;
|
|
113
|
+
}, {
|
|
114
|
+
readonly class: "current-year";
|
|
115
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"select", ["root", "combobox", "input", "icon", "input-editable", "popover-content", "filter-icon", "list-box-empty"], readonly [{
|
|
116
|
+
readonly class: "popover";
|
|
117
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"popover", ["root", "content", "content-closing"], readonly []>;
|
|
118
|
+
}, {
|
|
119
|
+
readonly class: "list-box";
|
|
120
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"list-box", ["root", "empty", "invalid", "item", "group", "default-item", "default-group", "item-selected", "item-highlighted", "item-disabled"], readonly [{
|
|
121
|
+
readonly class: "checkbox";
|
|
122
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"checkbox", ["root", "input", "box", "box-checked", "box-indeterminate", "box-icon", "box-icon-visible", "invalid"], readonly []>;
|
|
123
|
+
}, {
|
|
124
|
+
readonly class: "scroller";
|
|
125
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"scroller", ["root", "virtual", "item", "item-sticky"], readonly []>;
|
|
126
|
+
}]>;
|
|
127
|
+
}, {
|
|
128
|
+
readonly class: "filter";
|
|
129
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
130
|
+
readonly class: "input";
|
|
131
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
132
|
+
readonly projected: true;
|
|
133
|
+
}]>;
|
|
134
|
+
}]>;
|
|
135
|
+
}, {
|
|
136
|
+
readonly class: "current-month-field";
|
|
137
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
138
|
+
readonly class: "input";
|
|
139
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
140
|
+
readonly projected: true;
|
|
141
|
+
}]>;
|
|
142
|
+
}, {
|
|
143
|
+
readonly class: "current-year-field";
|
|
144
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
145
|
+
readonly class: "input";
|
|
146
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
147
|
+
readonly projected: true;
|
|
148
|
+
}]>;
|
|
149
|
+
}]>;
|
|
150
|
+
}, {
|
|
151
|
+
readonly class: "input";
|
|
152
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
153
|
+
}, {
|
|
154
|
+
readonly class: "remove-btn";
|
|
155
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"button", ["root", "inline", "loading", `kind-${string}`, `color-${string}`], readonly []>;
|
|
156
|
+
}, {
|
|
157
|
+
readonly class: "add-button";
|
|
158
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"button", ["root", "inline", "loading", `kind-${string}`, `color-${string}`], readonly []>;
|
|
159
|
+
}, {
|
|
160
|
+
readonly class: "cancel-button";
|
|
161
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"button", ["root", "inline", "loading", `kind-${string}`, `color-${string}`], readonly []>;
|
|
162
|
+
}, {
|
|
163
|
+
readonly class: "apply-button";
|
|
164
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"button", ["root", "inline", "loading", `kind-${string}`, `color-${string}`], readonly []>;
|
|
165
|
+
}, {
|
|
166
|
+
readonly class: "clear-button";
|
|
167
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"button", ["root", "inline", "loading", `kind-${string}`, `color-${string}`], readonly []>;
|
|
168
|
+
}]>>;
|
|
169
|
+
readonly trigger: Locator;
|
|
170
|
+
readonly popoverContent: Locator;
|
|
171
|
+
constructor(locator: Locator);
|
|
172
|
+
expectOpened(opened?: boolean): Promise<void>;
|
|
173
|
+
open(): Promise<void>;
|
|
174
|
+
row(index: number): Locator;
|
|
175
|
+
operatorSelect(index: number): NgnSelectHarness;
|
|
176
|
+
/** Select inside row using the 'value' ptClass (e.g. boolean operator or list select). */
|
|
177
|
+
valueSelect(index: number): NgnSelectHarness;
|
|
178
|
+
valueInput(index: number): NgnInputHarness;
|
|
179
|
+
removeButton(index: number): Locator;
|
|
180
|
+
addConditionButton(): Locator;
|
|
181
|
+
matchModeDivider(): Locator;
|
|
182
|
+
clearButton(): Locator;
|
|
183
|
+
applyButton(): Locator;
|
|
184
|
+
cancelButton(): Locator;
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/components/filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIxD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,qBAAa,gBAAgB;IAMR,OAAO,EAAE,OAAO;IALnC,SAAgB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAuC;IAE9D,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,SAAgB,cAAc,EAAE,OAAO,CAAC;gBAErB,OAAO,EAAE,OAAO;IAKtB,YAAY,CAAC,MAAM,UAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAI3B,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB;IAItD,0FAA0F;IACnF,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB;IAI5C,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe;IAM1C,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIpC,kBAAkB,IAAI,OAAO;IAI7B,gBAAgB,IAAI,OAAO;IAI3B,WAAW,IAAI,OAAO;IAItB,WAAW,IAAI,OAAO;IAItB,YAAY,IAAI,OAAO;CAG/B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { expect } from '@playwright/test';
|
|
2
|
+
import { filterControlTemplate } from '@ngneers/controls-themes/templates/filter';
|
|
3
|
+
import { themeClasses } from '../utils/theme';
|
|
4
|
+
import { NGN_CLASSES } from '../utils/classes';
|
|
5
|
+
import { NgnInputHarness } from './input';
|
|
6
|
+
import { NgnSelectHarness } from './select';
|
|
7
|
+
export class NgnFilterHarness {
|
|
8
|
+
locator;
|
|
9
|
+
classes = themeClasses(filterControlTemplate);
|
|
10
|
+
trigger;
|
|
11
|
+
popoverContent;
|
|
12
|
+
constructor(locator) {
|
|
13
|
+
this.locator = locator;
|
|
14
|
+
this.trigger = locator.locator(this.classes['input-field']['root']);
|
|
15
|
+
this.popoverContent = locator.locator(this.classes['popover-content']);
|
|
16
|
+
}
|
|
17
|
+
async expectOpened(opened = true) {
|
|
18
|
+
await expect(this.popoverContent).toBeVisible({ visible: opened });
|
|
19
|
+
}
|
|
20
|
+
async open() {
|
|
21
|
+
await this.trigger.click();
|
|
22
|
+
await this.expectOpened(true);
|
|
23
|
+
}
|
|
24
|
+
row(index) {
|
|
25
|
+
return this.locator.locator(this.classes['row']).nth(index);
|
|
26
|
+
}
|
|
27
|
+
operatorSelect(index) {
|
|
28
|
+
return new NgnSelectHarness(this.row(index).locator(this.classes['operator']['root']));
|
|
29
|
+
}
|
|
30
|
+
/** Select inside row using the 'value' ptClass (e.g. boolean operator or list select). */
|
|
31
|
+
valueSelect(index) {
|
|
32
|
+
return new NgnSelectHarness(this.row(index).locator(this.classes['value']['root']));
|
|
33
|
+
}
|
|
34
|
+
valueInput(index) {
|
|
35
|
+
return new NgnInputHarness(this.row(index).locator(`${this.classes['value']['root']} ${NGN_CLASSES.input['root']}`));
|
|
36
|
+
}
|
|
37
|
+
removeButton(index) {
|
|
38
|
+
return this.row(index).locator(this.classes['remove-btn']['root']);
|
|
39
|
+
}
|
|
40
|
+
addConditionButton() {
|
|
41
|
+
return this.locator.locator('[data-testid="filter-add-rule"]');
|
|
42
|
+
}
|
|
43
|
+
matchModeDivider() {
|
|
44
|
+
return this.locator.locator('[data-testid="filter-match-mode"]');
|
|
45
|
+
}
|
|
46
|
+
clearButton() {
|
|
47
|
+
return this.locator.locator('[data-testid="filter-clear"]');
|
|
48
|
+
}
|
|
49
|
+
applyButton() {
|
|
50
|
+
return this.locator.locator('[data-testid="filter-apply"]');
|
|
51
|
+
}
|
|
52
|
+
cancelButton() {
|
|
53
|
+
return this.locator.locator('[data-testid="filter-cancel"]');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Locator } from '@playwright/test';
|
|
2
|
+
export declare class NgnHintHarness {
|
|
3
|
+
readonly classes: import("@ngneers/controls-themes").ThemeClasses<import("@ngneers/controls-themes").ControlTemplate<"hint", ["root", "content", "icon", `kind-${string}`, `color-${string}`], readonly []>>;
|
|
4
|
+
readonly locator: Locator;
|
|
5
|
+
readonly content: Locator;
|
|
6
|
+
readonly icon: Locator;
|
|
7
|
+
constructor(locator: Locator);
|
|
8
|
+
expectIcon(hasIcon: boolean): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=hint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hint.d.ts","sourceRoot":"","sources":["../../src/components/hint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAExD,qBAAa,cAAc;IACzB,SAAgB,OAAO,6LAAqC;IAE5D,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,SAAgB,IAAI,EAAE,OAAO,CAAC;gBAElB,OAAO,EAAE,OAAO;IAMf,UAAU,CAAC,OAAO,EAAE,OAAO;CAOzC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { hintControlTemplate } from '@ngneers/controls-themes/templates/hint';
|
|
2
|
+
import { themeClasses } from '../utils/theme';
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
4
|
+
export class NgnHintHarness {
|
|
5
|
+
classes = themeClasses(hintControlTemplate);
|
|
6
|
+
locator;
|
|
7
|
+
content;
|
|
8
|
+
icon;
|
|
9
|
+
constructor(locator) {
|
|
10
|
+
this.locator = locator;
|
|
11
|
+
this.content = locator.locator(this.classes.content);
|
|
12
|
+
this.icon = locator.locator(this.classes.icon);
|
|
13
|
+
}
|
|
14
|
+
async expectIcon(hasIcon) {
|
|
15
|
+
if (hasIcon) {
|
|
16
|
+
await expect(this.icon).toBeVisible();
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
await expect(this.icon).not.toBeVisible();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export * from './accordion';
|
|
2
|
+
export * from './avatar';
|
|
3
|
+
export * from './breadcrumb';
|
|
4
|
+
export * from './button-group';
|
|
5
|
+
export * from './button';
|
|
6
|
+
export * from './calendar';
|
|
7
|
+
export * from './chip';
|
|
8
|
+
export * from './edit-inplace';
|
|
9
|
+
export * from './inplace';
|
|
10
|
+
export * from './filter';
|
|
11
|
+
export * from './hint';
|
|
12
|
+
export * from './input';
|
|
13
|
+
export * from './input-field';
|
|
14
|
+
export * from './mask-input';
|
|
15
|
+
export * from './item-view';
|
|
16
|
+
export * from './list-box';
|
|
17
|
+
export * from './menu';
|
|
18
|
+
export * from './message';
|
|
19
|
+
export * from './popover';
|
|
20
|
+
export * from './progress';
|
|
21
|
+
export * from './radio';
|
|
22
|
+
export * from './scroller';
|
|
23
|
+
export * from './filter';
|
|
24
|
+
export * from './select';
|
|
25
|
+
export * from './select-button';
|
|
26
|
+
export * from './slider';
|
|
27
|
+
export * from './snackbar';
|
|
28
|
+
export * from './spinner';
|
|
29
|
+
export * from './state';
|
|
30
|
+
export * from './switch';
|
|
31
|
+
export * from './tabs';
|
|
32
|
+
export * from './tag';
|
|
33
|
+
export * from './toast';
|
|
34
|
+
export * from './toggle-button';
|
|
35
|
+
export * from './tooltip';
|
|
36
|
+
export * from './tree';
|
|
37
|
+
export * from './upload';
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export * from './accordion';
|
|
2
|
+
export * from './avatar';
|
|
3
|
+
export * from './breadcrumb';
|
|
4
|
+
export * from './button-group';
|
|
5
|
+
export * from './button';
|
|
6
|
+
export * from './calendar';
|
|
7
|
+
export * from './chip';
|
|
8
|
+
export * from './edit-inplace';
|
|
9
|
+
export * from './inplace';
|
|
10
|
+
export * from './filter';
|
|
11
|
+
export * from './hint';
|
|
12
|
+
export * from './input';
|
|
13
|
+
export * from './input-field';
|
|
14
|
+
export * from './mask-input';
|
|
15
|
+
export * from './item-view';
|
|
16
|
+
export * from './list-box';
|
|
17
|
+
export * from './menu';
|
|
18
|
+
export * from './message';
|
|
19
|
+
export * from './popover';
|
|
20
|
+
export * from './progress';
|
|
21
|
+
export * from './radio';
|
|
22
|
+
export * from './scroller';
|
|
23
|
+
export * from './filter';
|
|
24
|
+
export * from './select';
|
|
25
|
+
export * from './select-button';
|
|
26
|
+
export * from './slider';
|
|
27
|
+
export * from './snackbar';
|
|
28
|
+
export * from './spinner';
|
|
29
|
+
export * from './state';
|
|
30
|
+
export * from './switch';
|
|
31
|
+
export * from './tabs';
|
|
32
|
+
export * from './tag';
|
|
33
|
+
export * from './toast';
|
|
34
|
+
export * from './toggle-button';
|
|
35
|
+
export * from './tooltip';
|
|
36
|
+
export * from './tree';
|
|
37
|
+
export * from './upload';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Locator } from '@playwright/test';
|
|
2
|
+
export declare class NgnInplaceHarness {
|
|
3
|
+
locator: Locator;
|
|
4
|
+
readonly classes: import("@ngneers/controls-themes").ThemeClasses<import("@ngneers/controls-themes").ControlTemplate<"inplace", ["root", "content", "display", "disabled"], readonly []>>;
|
|
5
|
+
readonly display: Locator;
|
|
6
|
+
readonly content: Locator;
|
|
7
|
+
constructor(locator: Locator);
|
|
8
|
+
expectDisplayVisible(visible?: boolean): Promise<void>;
|
|
9
|
+
expectContentVisible(visible?: boolean): Promise<void>;
|
|
10
|
+
clickDisplay(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=inplace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inplace.d.ts","sourceRoot":"","sources":["../../src/components/inplace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,kBAAkB,CAAC;AAIxD,qBAAa,iBAAiB;IAMT,OAAO,EAAE,OAAO;IALnC,SAAgB,OAAO,0KAAwC;IAE/D,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,SAAgB,OAAO,EAAE,OAAO,CAAC;gBAEd,OAAO,EAAE,OAAO;IAK5B,oBAAoB,CAAC,OAAO,UAAO;IAOnC,oBAAoB,CAAC,OAAO,UAAO;IAO7B,YAAY;CAG1B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { expect } from '@playwright/test';
|
|
2
|
+
import { themeClasses } from '../utils/theme';
|
|
3
|
+
import { inplaceControlTemplate } from '@ngneers/controls-themes/templates/inplace';
|
|
4
|
+
export class NgnInplaceHarness {
|
|
5
|
+
locator;
|
|
6
|
+
classes = themeClasses(inplaceControlTemplate);
|
|
7
|
+
display;
|
|
8
|
+
content;
|
|
9
|
+
constructor(locator) {
|
|
10
|
+
this.locator = locator;
|
|
11
|
+
this.display = this.locator.locator(this.classes['display']);
|
|
12
|
+
this.content = this.locator.locator(this.classes['content']);
|
|
13
|
+
}
|
|
14
|
+
expectDisplayVisible(visible = true) {
|
|
15
|
+
if (visible) {
|
|
16
|
+
return expect(this.display).toBeVisible();
|
|
17
|
+
}
|
|
18
|
+
return expect(this.display).not.toBeVisible();
|
|
19
|
+
}
|
|
20
|
+
expectContentVisible(visible = true) {
|
|
21
|
+
if (visible) {
|
|
22
|
+
return expect(this.content).toBeVisible();
|
|
23
|
+
}
|
|
24
|
+
return expect(this.content).not.toBeVisible();
|
|
25
|
+
}
|
|
26
|
+
async clickDisplay() {
|
|
27
|
+
await this.display.click();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Locator } from '@playwright/test';
|
|
2
|
+
export declare class NgnInputFieldHarness<T extends Record<string, any> = Record<string, any>> {
|
|
3
|
+
locator: Locator;
|
|
4
|
+
readonly classes: import("@ngneers/controls-themes").ThemeClasses<import("@ngneers/controls-themes").ControlTemplate<"input-field", ["root", "host", "disabled", "readonly", "invalid", "label", "clear-button", `labelKind-${string}`], readonly [{
|
|
5
|
+
readonly class: "input";
|
|
6
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>;
|
|
7
|
+
readonly projected: true;
|
|
8
|
+
}]>>;
|
|
9
|
+
readonly children: T;
|
|
10
|
+
constructor(locator: Locator, children?: (locator: Locator) => T);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=input-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-field.d.ts","sourceRoot":"","sources":["../../src/components/input-field.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,qBAAa,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAM1E,OAAO,EAAE,OAAO;IALzB,SAAgB,OAAO;;;;SAA2C;IAElE,SAAgB,QAAQ,EAAE,CAAC,CAAC;gBAGnB,OAAO,EAAE,OAAO,EACvB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,CAAC;CAIrC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { themeClasses } from '../utils/theme';
|
|
2
|
+
import { inputFieldControlTemplate } from '@ngneers/controls-themes/templates/input-field';
|
|
3
|
+
export class NgnInputFieldHarness {
|
|
4
|
+
locator;
|
|
5
|
+
classes = themeClasses(inputFieldControlTemplate);
|
|
6
|
+
children;
|
|
7
|
+
constructor(locator, children) {
|
|
8
|
+
this.locator = locator;
|
|
9
|
+
this.children = children?.(locator) ?? {};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Locator } from '@playwright/test';
|
|
2
|
+
export declare class NgnInputHarness {
|
|
3
|
+
readonly classes: import("@ngneers/controls-themes").ThemeClasses<import("@ngneers/controls-themes").ControlTemplate<"input", ["root", "invalid", "empty"], readonly []>>;
|
|
4
|
+
readonly locator: Locator;
|
|
5
|
+
constructor(locator: Locator);
|
|
6
|
+
expectValue(value: string): Promise<void>;
|
|
7
|
+
clear(): Promise<void>;
|
|
8
|
+
fill(value: string): Promise<void>;
|
|
9
|
+
pressSequentially(text: string): Promise<void>;
|
|
10
|
+
press(key: string): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,kBAAkB,CAAC;AAIxD,qBAAa,eAAe;IAC1B,SAAgB,OAAO,0JAAsC;IAE7D,SAAgB,OAAO,EAAE,OAAO,CAAC;gBAErB,OAAO,EAAE,OAAO;IAIrB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAGzC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9C,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { expect } from '@playwright/test';
|
|
2
|
+
import { themeClasses } from '../utils/theme';
|
|
3
|
+
import { inputControlTemplate } from '@ngneers/controls-themes/templates/input';
|
|
4
|
+
export class NgnInputHarness {
|
|
5
|
+
classes = themeClasses(inputControlTemplate);
|
|
6
|
+
locator;
|
|
7
|
+
constructor(locator) {
|
|
8
|
+
this.locator = locator;
|
|
9
|
+
}
|
|
10
|
+
expectValue(value) {
|
|
11
|
+
return expect(this.locator).toHaveValue(value);
|
|
12
|
+
}
|
|
13
|
+
clear() {
|
|
14
|
+
return this.locator.clear();
|
|
15
|
+
}
|
|
16
|
+
fill(value) {
|
|
17
|
+
return this.locator.fill(value);
|
|
18
|
+
}
|
|
19
|
+
pressSequentially(text) {
|
|
20
|
+
return this.locator.pressSequentially(text, { delay: 5 });
|
|
21
|
+
}
|
|
22
|
+
press(key) {
|
|
23
|
+
return this.locator.press(key);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Locator } from '@playwright/test';
|
|
2
|
+
export declare class NgnItemViewHarness {
|
|
3
|
+
locator: Locator;
|
|
4
|
+
readonly classes: import("@ngneers/controls-themes").ThemeClasses<import("@ngneers/controls-themes").ControlTemplate<"item-view", ["root", "item", "item-overflowing", "more-items", "more-items-hidden", "more-items-default", "hidden-separator"], readonly []>>;
|
|
5
|
+
readonly item: Locator;
|
|
6
|
+
readonly itemVisible: Locator;
|
|
7
|
+
readonly itemOverflowing: Locator;
|
|
8
|
+
readonly overflowItem: Locator;
|
|
9
|
+
constructor(locator: Locator);
|
|
10
|
+
expectItemCount(count: number): Promise<void>;
|
|
11
|
+
expectItemVisibleCount(count: number): Promise<void>;
|
|
12
|
+
expectItemOverflowingCount(count: number): Promise<void>;
|
|
13
|
+
expectItemTexts(texts: string[]): Promise<void>;
|
|
14
|
+
expectItemVisibleTexts(texts: string[]): Promise<void>;
|
|
15
|
+
expectItemOverflowingTexts(texts: string[]): Promise<void>;
|
|
16
|
+
getItemByIndex(index: number): Locator;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=item-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item-view.d.ts","sourceRoot":"","sources":["../../src/components/item-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIxD,qBAAa,kBAAkB;IAOV,OAAO,EAAE,OAAO;IANnC,SAAgB,OAAO,mPAAyC;IAChE,SAAgB,IAAI,EAAE,OAAO,CAAC;IAC9B,SAAgB,WAAW,EAAE,OAAO,CAAC;IACrC,SAAgB,eAAe,EAAE,OAAO,CAAC;IACzC,SAAgB,YAAY,EAAE,OAAO,CAAC;gBAEnB,OAAO,EAAE,OAAO;IAStB,eAAe,CAAC,KAAK,EAAE,MAAM;IAI7B,sBAAsB,CAAC,KAAK,EAAE,MAAM;IAIpC,0BAA0B,CAAC,KAAK,EAAE,MAAM;IAIxC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE;IAI/B,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE;IAItC,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE;IAIhD,cAAc,CAAC,KAAK,EAAE,MAAM;CAGpC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { expect } from '@playwright/test';
|
|
2
|
+
import { themeClasses } from '../utils/theme';
|
|
3
|
+
import { itemViewControlTemplate } from '@ngneers/controls-themes/templates/item-view';
|
|
4
|
+
export class NgnItemViewHarness {
|
|
5
|
+
locator;
|
|
6
|
+
classes = themeClasses(itemViewControlTemplate);
|
|
7
|
+
item;
|
|
8
|
+
itemVisible;
|
|
9
|
+
itemOverflowing;
|
|
10
|
+
overflowItem;
|
|
11
|
+
constructor(locator) {
|
|
12
|
+
this.locator = locator;
|
|
13
|
+
this.item = locator.locator(this.classes['item']);
|
|
14
|
+
this.itemVisible = locator.locator(`${this.classes['item']}:not(${this.classes['item-overflowing']})`);
|
|
15
|
+
this.itemOverflowing = locator.locator(this.classes['item-overflowing']);
|
|
16
|
+
this.overflowItem = locator.locator(this.classes['more-items']);
|
|
17
|
+
}
|
|
18
|
+
async expectItemCount(count) {
|
|
19
|
+
await expect(this.item).toHaveCount(count);
|
|
20
|
+
}
|
|
21
|
+
async expectItemVisibleCount(count) {
|
|
22
|
+
await expect(this.itemVisible).toHaveCount(count);
|
|
23
|
+
}
|
|
24
|
+
async expectItemOverflowingCount(count) {
|
|
25
|
+
await expect(this.itemOverflowing).toHaveCount(count);
|
|
26
|
+
}
|
|
27
|
+
async expectItemTexts(texts) {
|
|
28
|
+
await expect(this.item).toHaveText(texts);
|
|
29
|
+
}
|
|
30
|
+
async expectItemVisibleTexts(texts) {
|
|
31
|
+
await expect(this.itemVisible).toHaveText(texts);
|
|
32
|
+
}
|
|
33
|
+
async expectItemOverflowingTexts(texts) {
|
|
34
|
+
await expect(this.itemOverflowing).toHaveText(texts);
|
|
35
|
+
}
|
|
36
|
+
getItemByIndex(index) {
|
|
37
|
+
return this.itemVisible.nth(index);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Locator } from '@playwright/test';
|
|
2
|
+
import { NgnScrollerHarness } from './scroller';
|
|
3
|
+
export declare class NgnListBoxHarness {
|
|
4
|
+
locator: Locator;
|
|
5
|
+
readonly classes: import("@ngneers/controls-themes").ThemeClasses<import("@ngneers/controls-themes").ControlTemplate<"list-box", ["root", "empty", "invalid", "item", "group", "default-item", "default-group", "item-selected", "item-highlighted", "item-disabled"], readonly [{
|
|
6
|
+
readonly class: "checkbox";
|
|
7
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"checkbox", ["root", "input", "box", "box-checked", "box-indeterminate", "box-icon", "box-icon-visible", "invalid"], readonly []>;
|
|
8
|
+
}, {
|
|
9
|
+
readonly class: "scroller";
|
|
10
|
+
readonly template: import("@ngneers/controls-themes").ControlTemplate<"scroller", ["root", "virtual", "item", "item-sticky"], readonly []>;
|
|
11
|
+
}]>>;
|
|
12
|
+
readonly group: Locator;
|
|
13
|
+
readonly item: Locator;
|
|
14
|
+
readonly itemHighlighted: Locator;
|
|
15
|
+
readonly itemSelected: Locator;
|
|
16
|
+
readonly scroller: NgnScrollerHarness;
|
|
17
|
+
constructor(locator: Locator);
|
|
18
|
+
expectItemsCount(count: number): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=list-box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-box.d.ts","sourceRoot":"","sources":["../../src/components/list-box.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,qBAAa,iBAAiB;IAQT,OAAO,EAAE,OAAO;IAPnC,SAAgB,OAAO;;;;;;SAAwC;IAC/D,SAAgB,KAAK,EAAE,OAAO,CAAC;IAC/B,SAAgB,IAAI,EAAE,OAAO,CAAC;IAC9B,SAAgB,eAAe,EAAE,OAAO,CAAC;IACzC,SAAgB,YAAY,EAAE,OAAO,CAAC;IACtC,SAAgB,QAAQ,EAAE,kBAAkB,CAAC;gBAE1B,OAAO,EAAE,OAAO;IAQ5B,gBAAgB,CAAC,KAAK,EAAE,MAAM;CAGtC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { expect } from '@playwright/test';
|
|
2
|
+
import { themeClasses } from '../utils/theme';
|
|
3
|
+
import { listBoxControlTemplate } from '@ngneers/controls-themes/templates/list-box';
|
|
4
|
+
import { NgnScrollerHarness } from './scroller';
|
|
5
|
+
export class NgnListBoxHarness {
|
|
6
|
+
locator;
|
|
7
|
+
classes = themeClasses(listBoxControlTemplate);
|
|
8
|
+
group;
|
|
9
|
+
item;
|
|
10
|
+
itemHighlighted;
|
|
11
|
+
itemSelected;
|
|
12
|
+
scroller;
|
|
13
|
+
constructor(locator) {
|
|
14
|
+
this.locator = locator;
|
|
15
|
+
this.group = locator.locator(this.classes['group']);
|
|
16
|
+
this.item = locator.locator(this.classes['item']);
|
|
17
|
+
this.itemHighlighted = locator.locator(this.classes['item-highlighted']);
|
|
18
|
+
this.itemSelected = locator.locator(this.classes['item-selected']);
|
|
19
|
+
this.scroller = new NgnScrollerHarness(locator.locator(this.classes['scroller']['root']));
|
|
20
|
+
}
|
|
21
|
+
expectItemsCount(count) {
|
|
22
|
+
return expect(this.item).toHaveCount(count);
|
|
23
|
+
}
|
|
24
|
+
}
|