@onecx/angular-testing 7.0.0-rc.9 → 7.0.1
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/fesm2022/onecx-angular-testing.mjs +37 -5
- package/fesm2022/onecx-angular-testing.mjs.map +1 -1
- package/index.d.ts +422 -37
- package/package.json +11 -5
- package/lib/harnesses/button.harness.d.ts +0 -15
- package/lib/harnesses/div.harness.d.ts +0 -15
- package/lib/harnesses/input.harness.d.ts +0 -14
- package/lib/harnesses/list-item.harness.d.ts +0 -11
- package/lib/harnesses/menu-item-with-icon.harness.d.ts +0 -4
- package/lib/harnesses/menu-item.harness.d.ts +0 -11
- package/lib/harnesses/p.harness.d.ts +0 -14
- package/lib/harnesses/primeng/p-accordion-tab.harness.d.ts +0 -6
- package/lib/harnesses/primeng/p-accordion.harness.d.ts +0 -6
- package/lib/harnesses/primeng/p-breadcrumb.harness.d.ts +0 -7
- package/lib/harnesses/primeng/p-button-directive.harness.d.ts +0 -13
- package/lib/harnesses/primeng/p-button.harness.d.ts +0 -20
- package/lib/harnesses/primeng/p-chart.harness.d.ts +0 -6
- package/lib/harnesses/primeng/p-checkbox.harness.d.ts +0 -14
- package/lib/harnesses/primeng/p-chip.harness.d.ts +0 -8
- package/lib/harnesses/primeng/p-dialog.harness.d.ts +0 -13
- package/lib/harnesses/primeng/p-menu-item.harness.d.ts +0 -12
- package/lib/harnesses/primeng/p-menu.harness.d.ts +0 -9
- package/lib/harnesses/primeng/p-menubar.harness.d.ts +0 -6
- package/lib/harnesses/primeng/p-multiSelect.harness.d.ts +0 -19
- package/lib/harnesses/primeng/p-multiSelectListItem.harness.d.ts +0 -7
- package/lib/harnesses/primeng/p-paginator.harness.d.ts +0 -12
- package/lib/harnesses/primeng/p-panelmenu-item.harness.d.ts +0 -13
- package/lib/harnesses/primeng/p-panelmenu.harness.d.ts +0 -6
- package/lib/harnesses/primeng/p-password.harness.d.ts +0 -17
- package/lib/harnesses/primeng/p-picklist.harness.d.ts +0 -38
- package/lib/harnesses/primeng/p-select.harness.d.ts +0 -24
- package/lib/harnesses/primeng/p-selectButton.harness.d.ts +0 -5
- package/lib/harnesses/primeng/p-tableCheckbox.harness.d.ts +0 -10
- package/lib/harnesses/primeng/p-togglebutton.harness.d.ts +0 -10
- package/lib/harnesses/span.harness.d.ts +0 -16
- package/lib/harnesses/table-header-column.harness.d.ts +0 -9
- package/lib/harnesses/table-row.harness.d.ts +0 -10
- package/lib/harnesses/utils/primeicon.utils.d.ts +0 -2
- package/lib/mocks/IntersectionObserverMock.d.ts +0 -13
- package/lib/mocks/OriginMock.d.ts +0 -1
- package/lib/utils/waitForDeferredViewsToBeRendered.d.ts +0 -2
package/index.d.ts
CHANGED
|
@@ -1,39 +1,424 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './lib/harnesses/primeng/p-accordion-tab.harness';
|
|
3
|
-
export * from './lib/harnesses/primeng/p-breadcrumb.harness';
|
|
4
|
-
export * from './lib/harnesses/primeng/p-button-directive.harness';
|
|
5
|
-
export * from './lib/harnesses/primeng/p-button.harness';
|
|
6
|
-
export * from './lib/harnesses/primeng/p-chart.harness';
|
|
7
|
-
export * from './lib/harnesses/primeng/p-checkbox.harness';
|
|
8
|
-
export * from './lib/harnesses/primeng/p-chip.harness';
|
|
9
|
-
export * from './lib/harnesses/primeng/p-dialog.harness';
|
|
10
|
-
export * from './lib/harnesses/primeng/p-select.harness';
|
|
11
|
-
export * from './lib/harnesses/primeng/p-menu-item.harness';
|
|
12
|
-
export * from './lib/harnesses/primeng/p-menu.harness';
|
|
13
|
-
export * from './lib/harnesses/primeng/p-menubar.harness';
|
|
14
|
-
export * from './lib/harnesses/primeng/p-multiSelect.harness';
|
|
15
|
-
export * from './lib/harnesses/primeng/p-multiSelectListItem.harness';
|
|
16
|
-
export * from './lib/harnesses/primeng/p-panelmenu-item.harness';
|
|
17
|
-
export * from './lib/harnesses/primeng/p-panelmenu.harness';
|
|
18
|
-
export * from './lib/harnesses/primeng/p-paginator.harness';
|
|
19
|
-
export * from './lib/harnesses/primeng/p-password.harness';
|
|
20
|
-
export * from './lib/harnesses/primeng/p-picklist.harness';
|
|
21
|
-
export * from './lib/harnesses/primeng/p-selectButton.harness';
|
|
22
|
-
export * from './lib/harnesses/primeng/p-togglebutton.harness';
|
|
23
|
-
export * from './lib/harnesses/utils/primeicon.utils';
|
|
24
|
-
export * from './lib/harnesses/button.harness';
|
|
25
|
-
export * from './lib/harnesses/div.harness';
|
|
26
|
-
export * from './lib/harnesses/input.harness';
|
|
27
|
-
export * from './lib/harnesses/list-item.harness';
|
|
28
|
-
export * from './lib/harnesses/menu-item.harness';
|
|
29
|
-
export * from './lib/harnesses/menu-item-with-icon.harness';
|
|
30
|
-
export * from './lib/harnesses/primeng/p-tableCheckbox.harness';
|
|
31
|
-
export * from './lib/harnesses/p.harness';
|
|
32
|
-
export * from './lib/harnesses/span.harness';
|
|
33
|
-
export * from './lib/harnesses/table-header-column.harness';
|
|
34
|
-
export * from './lib/harnesses/table-row.harness';
|
|
1
|
+
import { ComponentHarness, BaseHarnessFilters, HarnessPredicate, ContentContainerComponentHarness, HarnessLoader, TestElement, ComponentHarnessConstructor } from '@angular/cdk/testing';
|
|
35
2
|
export * from '@angular/cdk/testing';
|
|
3
|
+
import * as _angular_cdk_harness_environment_d from '@angular/cdk/harness-environment.d';
|
|
4
|
+
import { PrimeIcons } from 'primeng/api';
|
|
36
5
|
export * from '@angular/cdk/testing/testbed';
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
6
|
+
import * as _angular_core from '@angular/core';
|
|
7
|
+
import { TranslateLoader, TranslationObject } from '@ngx-translate/core';
|
|
8
|
+
import { Observable } from 'rxjs';
|
|
9
|
+
|
|
10
|
+
declare class PAccordionTabHarness extends ComponentHarness {
|
|
11
|
+
static hostSelector: string;
|
|
12
|
+
getButton: () => Promise<_angular_cdk_harness_environment_d.TestElement>;
|
|
13
|
+
expand(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare class PAccordionHarness extends ComponentHarness {
|
|
17
|
+
static hostSelector: string;
|
|
18
|
+
getAllAccordionTabs: () => Promise<PAccordionTabHarness[]>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface ListItemHarnessFilters extends BaseHarnessFilters {
|
|
22
|
+
text?: string;
|
|
23
|
+
}
|
|
24
|
+
declare class ListItemHarness extends ComponentHarness {
|
|
25
|
+
static hostSelector: string;
|
|
26
|
+
static with(options: ListItemHarnessFilters): HarnessPredicate<ListItemHarness>;
|
|
27
|
+
getText(): Promise<string>;
|
|
28
|
+
isSelected(): Promise<boolean>;
|
|
29
|
+
selectItem(): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare class PBreadcrumbHarness extends ComponentHarness {
|
|
33
|
+
static hostSelector: string;
|
|
34
|
+
getBreadcrumbItems: () => Promise<ListItemHarness[]>;
|
|
35
|
+
getBreadcrumbItem(itemText: string): Promise<ListItemHarness | null>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface PButtonDirectiveHarnessFilters extends BaseHarnessFilters {
|
|
39
|
+
id?: string;
|
|
40
|
+
}
|
|
41
|
+
declare class PButtonDirectiveHarness extends ComponentHarness {
|
|
42
|
+
static hostSelector: string;
|
|
43
|
+
static with(options: PButtonDirectiveHarnessFilters): HarnessPredicate<PButtonDirectiveHarness>;
|
|
44
|
+
getId(): Promise<string | null>;
|
|
45
|
+
click(): Promise<void>;
|
|
46
|
+
getLabel(): Promise<string | null>;
|
|
47
|
+
getIcon(): Promise<string | null>;
|
|
48
|
+
getDisabled(): Promise<boolean>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface SpanHarnessFilters extends BaseHarnessFilters {
|
|
52
|
+
id?: string;
|
|
53
|
+
class?: string;
|
|
54
|
+
classes?: Array<string>;
|
|
55
|
+
}
|
|
56
|
+
declare class SpanHarness extends ComponentHarness {
|
|
57
|
+
static hostSelector: string;
|
|
58
|
+
static with(options: SpanHarnessFilters): HarnessPredicate<SpanHarness>;
|
|
59
|
+
static without(options: SpanHarnessFilters): HarnessPredicate<SpanHarness>;
|
|
60
|
+
getId(): Promise<string | null>;
|
|
61
|
+
getByClass(c: string): Promise<string>;
|
|
62
|
+
checkHasClass(value: string): Promise<boolean>;
|
|
63
|
+
hasAnyClass(classes: Array<string>): Promise<"true" | "false">;
|
|
64
|
+
getText(): Promise<string>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface PButtonHarnessFilters extends BaseHarnessFilters {
|
|
68
|
+
id?: string;
|
|
69
|
+
name?: string;
|
|
70
|
+
label?: string;
|
|
71
|
+
icon?: string;
|
|
72
|
+
}
|
|
73
|
+
declare class PButtonHarness extends ComponentHarness {
|
|
74
|
+
static hostSelector: string;
|
|
75
|
+
getLabelSpan: () => Promise<SpanHarness | null>;
|
|
76
|
+
getIconSpan: () => Promise<SpanHarness | null>;
|
|
77
|
+
static with(options: PButtonHarnessFilters): HarnessPredicate<PButtonHarness>;
|
|
78
|
+
getId(): Promise<string | null>;
|
|
79
|
+
getName(): Promise<string | null>;
|
|
80
|
+
getLabel(): Promise<string | null>;
|
|
81
|
+
getIcon(): Promise<string | null>;
|
|
82
|
+
click(): Promise<void>;
|
|
83
|
+
getBadgeValue(): Promise<string | null>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
declare class PChartHarness extends ComponentHarness {
|
|
87
|
+
static hostSelector: string;
|
|
88
|
+
getType(): Promise<string | null>;
|
|
89
|
+
getOptions(): Promise<string | null>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
interface DivHarnessFilters extends BaseHarnessFilters {
|
|
93
|
+
class?: string;
|
|
94
|
+
id?: string;
|
|
95
|
+
}
|
|
96
|
+
declare class DivHarness extends ComponentHarness {
|
|
97
|
+
static hostSelector: string;
|
|
98
|
+
static with(options: DivHarnessFilters): HarnessPredicate<DivHarness>;
|
|
99
|
+
getByClass(c: string): Promise<string>;
|
|
100
|
+
getId(): Promise<string | null>;
|
|
101
|
+
checkHasClass(value: string): Promise<boolean>;
|
|
102
|
+
getText(): Promise<string>;
|
|
103
|
+
getClassList(): Promise<string[]>;
|
|
104
|
+
click(): Promise<void>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
interface PCheckBoxHarnessFilters extends BaseHarnessFilters {
|
|
108
|
+
inputid?: string;
|
|
109
|
+
}
|
|
110
|
+
declare class PCheckboxHarness extends ComponentHarness {
|
|
111
|
+
static hostSelector: string;
|
|
112
|
+
getCheckBoxDiv: () => Promise<DivHarness | null>;
|
|
113
|
+
static with(options: PCheckBoxHarnessFilters): HarnessPredicate<PCheckboxHarness>;
|
|
114
|
+
isChecked(): Promise<boolean>;
|
|
115
|
+
getId(): Promise<string | null>;
|
|
116
|
+
isHidden(): Promise<boolean>;
|
|
117
|
+
click(): Promise<void>;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare class PChipHarness extends ComponentHarness {
|
|
121
|
+
static hostSelector: string;
|
|
122
|
+
getRemoveButton: () => Promise<_angular_cdk_harness_environment_d.TestElement | null>;
|
|
123
|
+
getContent(): Promise<string>;
|
|
124
|
+
clickRemove(): Promise<void>;
|
|
125
|
+
click(): Promise<void>;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
interface PDialogHarnessFilters extends BaseHarnessFilters {
|
|
129
|
+
id?: string;
|
|
130
|
+
}
|
|
131
|
+
declare class PDialogHarness extends ContentContainerComponentHarness {
|
|
132
|
+
static hostSelector: string;
|
|
133
|
+
getHeader: () => Promise<DivHarness | null>;
|
|
134
|
+
getFooter: () => Promise<DivHarness | null>;
|
|
135
|
+
getDialogTitle(): Promise<string | undefined>;
|
|
136
|
+
close(): Promise<void>;
|
|
137
|
+
isVisible(): Promise<boolean>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
interface PSelectHarnessFilters extends BaseHarnessFilters {
|
|
141
|
+
id?: string;
|
|
142
|
+
inputId?: string;
|
|
143
|
+
}
|
|
144
|
+
declare class PSelectHarness extends ContentContainerComponentHarness {
|
|
145
|
+
static hostSelector: string;
|
|
146
|
+
static with(options: PSelectHarnessFilters): HarnessPredicate<PSelectHarness>;
|
|
147
|
+
getInputId(): Promise<string | null>;
|
|
148
|
+
getAriaLabel(): Promise<string | null | undefined>;
|
|
149
|
+
getId(): Promise<string | null>;
|
|
150
|
+
getDefaultText(): Promise<string | undefined>;
|
|
151
|
+
getSelectedText(): Promise<string | undefined>;
|
|
152
|
+
isOpen(): Promise<boolean>;
|
|
153
|
+
open(): Promise<void>;
|
|
154
|
+
close(): Promise<void>;
|
|
155
|
+
getSelectItems(): Promise<ListItemHarness[]>;
|
|
156
|
+
getSelectItem(itemText: string): Promise<ListItemHarness | null>;
|
|
157
|
+
selectedSelectItem(position: number): Promise<ListItemHarness>;
|
|
158
|
+
selectedSelectItemText(position: number): Promise<string>;
|
|
159
|
+
hasClearOption(): Promise<boolean>;
|
|
160
|
+
clear(): Promise<void>;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
declare class PMenuItemHarness extends ComponentHarness {
|
|
164
|
+
static hostSelector: string;
|
|
165
|
+
getAnchor: () => Promise<_angular_cdk_harness_environment_d.TestElement>;
|
|
166
|
+
getChildren: () => Promise<PMenuItemHarness[]>;
|
|
167
|
+
getIconSpan: () => Promise<SpanHarness | null>;
|
|
168
|
+
getText(): Promise<string>;
|
|
169
|
+
hasIcon(icon: string): Promise<boolean | undefined>;
|
|
170
|
+
click(): Promise<void>;
|
|
171
|
+
getLink(): Promise<string | null>;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
interface MenuItemHarnessFilters extends BaseHarnessFilters {
|
|
175
|
+
text?: string;
|
|
176
|
+
}
|
|
177
|
+
declare class MenuItemHarness extends ComponentHarness {
|
|
178
|
+
static hostSelector: string;
|
|
179
|
+
static with(options: MenuItemHarnessFilters): HarnessPredicate<MenuItemHarness>;
|
|
180
|
+
getText(): Promise<string>;
|
|
181
|
+
selectItem(): Promise<void>;
|
|
182
|
+
getLink(): Promise<string | null>;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
declare class PMenuHarness extends ContentContainerComponentHarness {
|
|
186
|
+
static hostSelector: string;
|
|
187
|
+
getHarnessLoaderForPMenuOverlay(): Promise<HarnessLoader | null>;
|
|
188
|
+
isOpen(): Promise<boolean>;
|
|
189
|
+
getAllMenuItems(): Promise<MenuItemHarness[] | undefined>;
|
|
190
|
+
getMenuItem(itemText: string): Promise<MenuItemHarness | undefined | null>;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
declare class PMenuBarHarness extends ComponentHarness {
|
|
194
|
+
static hostSelector: string;
|
|
195
|
+
getAllMenuItems: () => Promise<PMenuItemHarness[]>;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
declare class PMultiSelectListItemHarness extends ComponentHarness {
|
|
199
|
+
static hostSelector: string;
|
|
200
|
+
getTestElement(): Promise<TestElement>;
|
|
201
|
+
click(): Promise<void>;
|
|
202
|
+
getText(): Promise<string>;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
interface PMultiSelectHarnessFilters extends BaseHarnessFilters {
|
|
206
|
+
id?: string;
|
|
207
|
+
class?: string;
|
|
208
|
+
}
|
|
209
|
+
declare class PMultiSelectHarness extends ComponentHarness {
|
|
210
|
+
static hostSelector: string;
|
|
211
|
+
static with(options: PMultiSelectHarnessFilters): HarnessPredicate<PMultiSelectHarness>;
|
|
212
|
+
getId(): Promise<string | null>;
|
|
213
|
+
getByClass(c: string): Promise<string | null>;
|
|
214
|
+
getHarnessLoaderForPMultiSelectPanel(): Promise<HarnessLoader | null>;
|
|
215
|
+
getAllOptions(): Promise<PMultiSelectListItemHarness[]>;
|
|
216
|
+
isOpen(): Promise<boolean>;
|
|
217
|
+
open(): Promise<void>;
|
|
218
|
+
close(): Promise<void>;
|
|
219
|
+
isHighlighted(PMultiSelectListItem: PMultiSelectListItemHarness): Promise<boolean>;
|
|
220
|
+
getSelectedOptions(): Promise<string[] | null>;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
declare class PanelMenuItemHarness extends ComponentHarness {
|
|
224
|
+
static hostSelector: string;
|
|
225
|
+
getAnchor: () => Promise<_angular_cdk_harness_environment_d.TestElement>;
|
|
226
|
+
getChildren: () => Promise<PMenuItemHarness[]>;
|
|
227
|
+
getIconSpan: () => Promise<SpanHarness | null>;
|
|
228
|
+
getText(): Promise<string>;
|
|
229
|
+
hasIcon(icon: string): Promise<boolean | undefined>;
|
|
230
|
+
click(): Promise<void>;
|
|
231
|
+
getLink(): Promise<string | null>;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
declare class PPanelMenuHarness extends ComponentHarness {
|
|
235
|
+
static hostSelector: string;
|
|
236
|
+
getAllPanels: () => Promise<PanelMenuItemHarness[]>;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
interface ButtonHarnessFilters extends BaseHarnessFilters {
|
|
240
|
+
id?: string;
|
|
241
|
+
icon?: string;
|
|
242
|
+
class?: string;
|
|
243
|
+
}
|
|
244
|
+
declare class ButtonHarness extends ComponentHarness {
|
|
245
|
+
static hostSelector: string;
|
|
246
|
+
static with(options: ButtonHarnessFilters): HarnessPredicate<ButtonHarness>;
|
|
247
|
+
getId(): Promise<string | null>;
|
|
248
|
+
getIcon(): Promise<string | null>;
|
|
249
|
+
getByClass(c: string): Promise<string | null>;
|
|
250
|
+
click(): Promise<void>;
|
|
251
|
+
isDisabled(): Promise<boolean>;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
declare class PPaginatorHarness extends ContentContainerComponentHarness {
|
|
255
|
+
static hostSelector: string;
|
|
256
|
+
getCurrentPageReport: () => Promise<SpanHarness>;
|
|
257
|
+
getRowsPerPageOptions: () => Promise<PSelectHarness>;
|
|
258
|
+
getNextPageButton: () => Promise<ButtonHarness>;
|
|
259
|
+
getCurrentPageReportText(): Promise<string | undefined>;
|
|
260
|
+
clickNextPage(): Promise<void>;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
interface InputHarnessFilters extends BaseHarnessFilters {
|
|
264
|
+
id?: string;
|
|
265
|
+
}
|
|
266
|
+
declare class InputHarness extends ComponentHarness {
|
|
267
|
+
static hostSelector: string;
|
|
268
|
+
static with(options: InputHarnessFilters): HarnessPredicate<InputHarness>;
|
|
269
|
+
getId(): Promise<string | null>;
|
|
270
|
+
getValue(): Promise<string | null>;
|
|
271
|
+
getChecked(): Promise<boolean>;
|
|
272
|
+
setValue(value: string | Date): Promise<void>;
|
|
273
|
+
getTestElement(): Promise<TestElement>;
|
|
274
|
+
click(): Promise<void>;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
interface PPasswordHarnessFilters extends BaseHarnessFilters {
|
|
278
|
+
id?: string;
|
|
279
|
+
}
|
|
280
|
+
declare class PPasswordHarness extends ComponentHarness {
|
|
281
|
+
static hostSelector: string;
|
|
282
|
+
getInput: () => Promise<InputHarness>;
|
|
283
|
+
static with(options: PPasswordHarnessFilters): HarnessPredicate<PPasswordHarness>;
|
|
284
|
+
getId(): Promise<string | null>;
|
|
285
|
+
getPromptLabel(): Promise<string | null>;
|
|
286
|
+
getWeakLabel(): Promise<string | null>;
|
|
287
|
+
getMediumLabel(): Promise<string | null>;
|
|
288
|
+
getStrongLabel(): Promise<string | null>;
|
|
289
|
+
getValue(): Promise<string | null>;
|
|
290
|
+
setValue(value: string): Promise<void>;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
interface PPicklistControlsButtonsFilters extends BaseHarnessFilters {
|
|
294
|
+
class?: string;
|
|
295
|
+
}
|
|
296
|
+
interface PPicklistListWrapperFilters extends BaseHarnessFilters {
|
|
297
|
+
class?: string;
|
|
298
|
+
}
|
|
299
|
+
declare class PPicklistControlsButtonsHarness extends ContentContainerComponentHarness {
|
|
300
|
+
static hostSelector: string;
|
|
301
|
+
getButtons: () => Promise<ButtonHarness[]>;
|
|
302
|
+
static with(options: PPicklistControlsButtonsFilters): HarnessPredicate<PPicklistControlsButtonsHarness>;
|
|
303
|
+
getByClass(c: string): Promise<string>;
|
|
304
|
+
}
|
|
305
|
+
declare class PPicklistListWrapperHarness extends ContentContainerComponentHarness {
|
|
306
|
+
static hostSelector: string;
|
|
307
|
+
getHeader: () => Promise<DivHarness>;
|
|
308
|
+
getAllListItems: () => Promise<ListItemHarness[]>;
|
|
309
|
+
static with(options: PPicklistListWrapperFilters): HarnessPredicate<PPicklistListWrapperHarness>;
|
|
310
|
+
getByClass(c: string): Promise<string>;
|
|
311
|
+
}
|
|
312
|
+
declare class PPicklistHarness extends ContentContainerComponentHarness {
|
|
313
|
+
static hostSelector: string;
|
|
314
|
+
private getPicklistSourceControls;
|
|
315
|
+
private getPicklistTransferControls;
|
|
316
|
+
private getPicklistTargetControls;
|
|
317
|
+
private getPicklistSource;
|
|
318
|
+
private getPicklistTarget;
|
|
319
|
+
getSourceControlsButtons(): Promise<ButtonHarness[]>;
|
|
320
|
+
getTransferControlsButtons(): Promise<ButtonHarness[]>;
|
|
321
|
+
getTargetControlsButtons(): Promise<ButtonHarness[]>;
|
|
322
|
+
getSourceHeader(): Promise<string>;
|
|
323
|
+
getTargetHeader(): Promise<string>;
|
|
324
|
+
getSourceListItems(): Promise<ListItemHarness[]>;
|
|
325
|
+
getTargetListItems(): Promise<ListItemHarness[]>;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
declare class PSelectButtonHarness extends ContentContainerComponentHarness {
|
|
329
|
+
static hostSelector: string;
|
|
330
|
+
getAllButtons: () => Promise<_angular_cdk_harness_environment_d.TestElement[]>;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
interface PToggleButtonHarnessFilters extends BaseHarnessFilters {
|
|
334
|
+
onLabel?: string;
|
|
335
|
+
}
|
|
336
|
+
declare class PToggleButtonHarness extends ContentContainerComponentHarness {
|
|
337
|
+
static hostSelector: string;
|
|
338
|
+
static with(options: PToggleButtonHarnessFilters): HarnessPredicate<PToggleButtonHarness>;
|
|
339
|
+
getOnLabel(): Promise<string | null>;
|
|
340
|
+
click(): Promise<void>;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
type PrimeIcon = (typeof PrimeIcons)[keyof Omit<typeof PrimeIcons, 'prototype'>];
|
|
344
|
+
|
|
345
|
+
declare class MenuItemWithIconHarness extends MenuItemHarness {
|
|
346
|
+
hasIcon(icon: string): Promise<boolean | undefined>;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
interface PTableCheckboxHarnessFilter extends BaseHarnessFilters {
|
|
350
|
+
isSelected?: boolean;
|
|
351
|
+
}
|
|
352
|
+
declare class PTableCheckboxHarness extends ComponentHarness {
|
|
353
|
+
static hostSelector: string;
|
|
354
|
+
static with<T extends PTableCheckboxHarness>(this: ComponentHarnessConstructor<T>, options?: PTableCheckboxHarnessFilter): HarnessPredicate<T>;
|
|
355
|
+
isChecked(): Promise<boolean>;
|
|
356
|
+
checkBox(): Promise<void>;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
interface PHarnessFilters extends BaseHarnessFilters {
|
|
360
|
+
class?: string;
|
|
361
|
+
id?: string;
|
|
362
|
+
}
|
|
363
|
+
declare class PHarness extends ComponentHarness {
|
|
364
|
+
static hostSelector: string;
|
|
365
|
+
static with(options: PHarnessFilters): HarnessPredicate<PHarness>;
|
|
366
|
+
getByClass(c: string): Promise<string>;
|
|
367
|
+
hasId(id: string): Promise<string>;
|
|
368
|
+
checkHasClass(value: string): Promise<boolean>;
|
|
369
|
+
getText(): Promise<string>;
|
|
370
|
+
getClassList(): Promise<string[]>;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
declare class TableHeaderColumnHarness extends ContentContainerComponentHarness {
|
|
374
|
+
static hostSelector: string;
|
|
375
|
+
getSortButton: () => Promise<ButtonHarness>;
|
|
376
|
+
getFilterMultiSelect: () => Promise<PMultiSelectHarness>;
|
|
377
|
+
getText(): Promise<string>;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
declare class TableRowHarness extends ContentContainerComponentHarness {
|
|
381
|
+
static hostSelector: string;
|
|
382
|
+
getAllActionButtons: () => Promise<_angular_cdk_harness_environment_d.TestElement[]>;
|
|
383
|
+
getViewButton: () => Promise<ButtonHarness | null>;
|
|
384
|
+
getEditButton: () => Promise<ButtonHarness | null>;
|
|
385
|
+
getDeleteButton: () => Promise<ButtonHarness | null>;
|
|
386
|
+
getData(): Promise<string[]>;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
declare class IntersectionObserverMock {
|
|
390
|
+
private callback;
|
|
391
|
+
private entries;
|
|
392
|
+
root: any;
|
|
393
|
+
rootMargin: any;
|
|
394
|
+
thresholds: any;
|
|
395
|
+
constructor(callback: any, _options: any);
|
|
396
|
+
observe(target: Element): void;
|
|
397
|
+
takeRecords(): any[];
|
|
398
|
+
unobserve(target: any): void;
|
|
399
|
+
disconnect(): void;
|
|
400
|
+
}
|
|
401
|
+
declare function ensureIntersectionObserverMockExists(): void;
|
|
402
|
+
|
|
403
|
+
declare function ensureOriginMockExists(): void;
|
|
404
|
+
|
|
405
|
+
declare function waitForDeferredViewsToBeRendered(harness: ComponentHarness | ContentContainerComponentHarness): Promise<void>;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* This is a workaround for the compatibility issue with ngx-translate-testing v7
|
|
409
|
+
* which uses the deprecated TranslateFakeCompiler that doesn't exist in ngx-translate v17 anymore.
|
|
410
|
+
*
|
|
411
|
+
* @see https://ngx-translate.org/getting-started/migration-guide/#5-renamed-internal-classes
|
|
412
|
+
* @see https://github.com/mwootendev/ngx-translate-plugins/issues/87
|
|
413
|
+
*/
|
|
414
|
+
declare class FakeTranslateLoader implements TranslateLoader {
|
|
415
|
+
private readonly translations;
|
|
416
|
+
constructor(translations?: {
|
|
417
|
+
[lang: string]: TranslationObject;
|
|
418
|
+
});
|
|
419
|
+
getTranslation(lang: string): Observable<TranslationObject>;
|
|
420
|
+
}
|
|
421
|
+
declare function provideTranslateTestingService(translates: Record<string, TranslationObject>): _angular_core.Provider[];
|
|
422
|
+
|
|
423
|
+
export { ButtonHarness, DivHarness, FakeTranslateLoader, InputHarness, IntersectionObserverMock, ListItemHarness, MenuItemHarness, MenuItemWithIconHarness, PAccordionHarness, PAccordionTabHarness, PBreadcrumbHarness, PButtonDirectiveHarness, PButtonHarness, PChartHarness, PCheckboxHarness, PChipHarness, PDialogHarness, PHarness, PMenuBarHarness, PMenuHarness, PMenuItemHarness, PMultiSelectHarness, PMultiSelectListItemHarness, PPaginatorHarness, PPanelMenuHarness, PPasswordHarness, PPicklistControlsButtonsHarness, PPicklistHarness, PPicklistListWrapperHarness, PSelectButtonHarness, PSelectHarness, PTableCheckboxHarness, PToggleButtonHarness, PanelMenuItemHarness, SpanHarness, TableHeaderColumnHarness, TableRowHarness, ensureIntersectionObserverMockExists, ensureOriginMockExists, provideTranslateTestingService, waitForDeferredViewsToBeRendered };
|
|
424
|
+
export type { ButtonHarnessFilters, DivHarnessFilters, InputHarnessFilters, ListItemHarnessFilters, MenuItemHarnessFilters, PButtonDirectiveHarnessFilters, PButtonHarnessFilters, PCheckBoxHarnessFilters, PDialogHarnessFilters, PHarnessFilters, PMultiSelectHarnessFilters, PPasswordHarnessFilters, PPicklistControlsButtonsFilters, PPicklistListWrapperFilters, PSelectHarnessFilters, PTableCheckboxHarnessFilter, PToggleButtonHarnessFilters, PrimeIcon, SpanHarnessFilters };
|
package/package.json
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onecx/angular-testing",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/onecx/onecx-portal-ui-libs"
|
|
8
|
+
},
|
|
5
9
|
"peerDependencies": {
|
|
6
|
-
"@angular/cdk": "^
|
|
7
|
-
"primeng": "^
|
|
8
|
-
"@nx/devkit": "^
|
|
9
|
-
"@
|
|
10
|
+
"@angular/cdk": "^20.0.0",
|
|
11
|
+
"primeng": "^20.3.0",
|
|
12
|
+
"@nx/devkit": "^22.0.2",
|
|
13
|
+
"@ngx-translate/core": "^17.0.0",
|
|
14
|
+
"@onecx/nx-migration-utils": "^7.0.1",
|
|
15
|
+
"rxjs": "^7.8.2"
|
|
10
16
|
},
|
|
11
17
|
"dependencies": {
|
|
12
18
|
"tslib": "^2.3.0"
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
-
export interface ButtonHarnessFilters extends BaseHarnessFilters {
|
|
3
|
-
id?: string;
|
|
4
|
-
icon?: string;
|
|
5
|
-
class?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare class ButtonHarness extends ComponentHarness {
|
|
8
|
-
static hostSelector: string;
|
|
9
|
-
static with(options: ButtonHarnessFilters): HarnessPredicate<ButtonHarness>;
|
|
10
|
-
getId(): Promise<string | null>;
|
|
11
|
-
getIcon(): Promise<string | null>;
|
|
12
|
-
getByClass(c: string): Promise<string | null>;
|
|
13
|
-
click(): Promise<void>;
|
|
14
|
-
isDisabled(): Promise<boolean>;
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
-
export interface DivHarnessFilters extends BaseHarnessFilters {
|
|
3
|
-
class?: string;
|
|
4
|
-
id?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class DivHarness extends ComponentHarness {
|
|
7
|
-
static hostSelector: string;
|
|
8
|
-
static with(options: DivHarnessFilters): HarnessPredicate<DivHarness>;
|
|
9
|
-
getByClass(c: string): Promise<string>;
|
|
10
|
-
getId(): Promise<string | null>;
|
|
11
|
-
checkHasClass(value: string): Promise<boolean>;
|
|
12
|
-
getText(): Promise<string>;
|
|
13
|
-
getClassList(): Promise<string[]>;
|
|
14
|
-
click(): Promise<void>;
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate, TestElement } from '@angular/cdk/testing';
|
|
2
|
-
export interface InputHarnessFilters extends BaseHarnessFilters {
|
|
3
|
-
id?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare class InputHarness extends ComponentHarness {
|
|
6
|
-
static hostSelector: string;
|
|
7
|
-
static with(options: InputHarnessFilters): HarnessPredicate<InputHarness>;
|
|
8
|
-
getId(): Promise<string | null>;
|
|
9
|
-
getValue(): Promise<string | null>;
|
|
10
|
-
getChecked(): Promise<boolean>;
|
|
11
|
-
setValue(value: string | Date): Promise<void>;
|
|
12
|
-
getTestElement(): Promise<TestElement>;
|
|
13
|
-
click(): Promise<void>;
|
|
14
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
-
export interface ListItemHarnessFilters extends BaseHarnessFilters {
|
|
3
|
-
text?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare class ListItemHarness extends ComponentHarness {
|
|
6
|
-
static hostSelector: string;
|
|
7
|
-
static with(options: ListItemHarnessFilters): HarnessPredicate<ListItemHarness>;
|
|
8
|
-
getText(): Promise<string>;
|
|
9
|
-
isSelected(): Promise<boolean>;
|
|
10
|
-
selectItem(): Promise<void>;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
-
export interface MenuItemHarnessFilters extends BaseHarnessFilters {
|
|
3
|
-
text?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare class MenuItemHarness extends ComponentHarness {
|
|
6
|
-
static hostSelector: string;
|
|
7
|
-
static with(options: MenuItemHarnessFilters): HarnessPredicate<MenuItemHarness>;
|
|
8
|
-
getText(): Promise<string>;
|
|
9
|
-
selectItem(): Promise<void>;
|
|
10
|
-
getLink(): Promise<string | null>;
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
-
export interface PHarnessFilters extends BaseHarnessFilters {
|
|
3
|
-
class?: string;
|
|
4
|
-
id?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class PHarness extends ComponentHarness {
|
|
7
|
-
static hostSelector: string;
|
|
8
|
-
static with(options: PHarnessFilters): HarnessPredicate<PHarness>;
|
|
9
|
-
getByClass(c: string): Promise<string>;
|
|
10
|
-
hasId(id: string): Promise<string>;
|
|
11
|
-
checkHasClass(value: string): Promise<boolean>;
|
|
12
|
-
getText(): Promise<string>;
|
|
13
|
-
getClassList(): Promise<string[]>;
|
|
14
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ComponentHarness } from '@angular/cdk/testing';
|
|
2
|
-
export declare class PAccordionTabHarness extends ComponentHarness {
|
|
3
|
-
static hostSelector: string;
|
|
4
|
-
getButton: () => Promise<import("@angular/cdk/harness-environment.d-BbFzIFDE").T>;
|
|
5
|
-
expand(): Promise<void>;
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ComponentHarness } from '@angular/cdk/testing';
|
|
2
|
-
import { PAccordionTabHarness } from './p-accordion-tab.harness';
|
|
3
|
-
export declare class PAccordionHarness extends ComponentHarness {
|
|
4
|
-
static hostSelector: string;
|
|
5
|
-
getAllAccordionTabs: () => Promise<PAccordionTabHarness[]>;
|
|
6
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ComponentHarness } from '@angular/cdk/testing';
|
|
2
|
-
import { ListItemHarness } from '../list-item.harness';
|
|
3
|
-
export declare class PBreadcrumbHarness extends ComponentHarness {
|
|
4
|
-
static hostSelector: string;
|
|
5
|
-
getBreadcrumbItems: () => Promise<ListItemHarness[]>;
|
|
6
|
-
getBreadcrumbItem(itemText: string): Promise<ListItemHarness | null>;
|
|
7
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
-
export interface PButtonDirectiveHarnessFilters extends BaseHarnessFilters {
|
|
3
|
-
id?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare class PButtonDirectiveHarness extends ComponentHarness {
|
|
6
|
-
static hostSelector: string;
|
|
7
|
-
static with(options: PButtonDirectiveHarnessFilters): HarnessPredicate<PButtonDirectiveHarness>;
|
|
8
|
-
getId(): Promise<string | null>;
|
|
9
|
-
click(): Promise<void>;
|
|
10
|
-
getLabel(): Promise<string | null>;
|
|
11
|
-
getIcon(): Promise<string | null>;
|
|
12
|
-
getDisabled(): Promise<boolean>;
|
|
13
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
-
import { SpanHarness } from '../span.harness';
|
|
3
|
-
export interface PButtonHarnessFilters extends BaseHarnessFilters {
|
|
4
|
-
id?: string;
|
|
5
|
-
name?: string;
|
|
6
|
-
label?: string;
|
|
7
|
-
icon?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare class PButtonHarness extends ComponentHarness {
|
|
10
|
-
static hostSelector: string;
|
|
11
|
-
getLabelSpan: () => Promise<SpanHarness | null>;
|
|
12
|
-
getIconSpan: () => Promise<SpanHarness | null>;
|
|
13
|
-
static with(options: PButtonHarnessFilters): HarnessPredicate<PButtonHarness>;
|
|
14
|
-
getId(): Promise<string | null>;
|
|
15
|
-
getName(): Promise<string | null>;
|
|
16
|
-
getLabel(): Promise<string | null>;
|
|
17
|
-
getIcon(): Promise<string | null>;
|
|
18
|
-
click(): Promise<void>;
|
|
19
|
-
getBadgeValue(): Promise<string | null>;
|
|
20
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
-
import { DivHarness } from '../div.harness';
|
|
3
|
-
export interface PCheckBoxHarnessFilters extends BaseHarnessFilters {
|
|
4
|
-
inputid?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class PCheckboxHarness extends ComponentHarness {
|
|
7
|
-
static hostSelector: string;
|
|
8
|
-
getCheckBoxDiv: () => Promise<DivHarness | null>;
|
|
9
|
-
static with(options: PCheckBoxHarnessFilters): HarnessPredicate<PCheckboxHarness>;
|
|
10
|
-
isChecked(): Promise<boolean>;
|
|
11
|
-
getId(): Promise<string | null>;
|
|
12
|
-
isHidden(): Promise<boolean>;
|
|
13
|
-
click(): Promise<void>;
|
|
14
|
-
}
|