@skyux/forms 12.22.0 → 13.0.0-alpha.0
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/skyux-forms-testing.mjs.map +1 -1
- package/fesm2022/skyux-forms.mjs +163 -163
- package/fesm2022/skyux-forms.mjs.map +1 -1
- package/index.d.ts +1800 -61
- package/package.json +14 -14
- package/testing/index.d.ts +1117 -3
- package/lib/modules/character-counter/character-counter-indicator.component.d.ts +0 -12
- package/lib/modules/character-counter/character-counter-screen-reader.pipe.d.ts +0 -8
- package/lib/modules/character-counter/character-counter.directive.d.ts +0 -29
- package/lib/modules/character-counter/character-counter.module.d.ts +0 -12
- package/lib/modules/checkbox/checkbox-change.d.ts +0 -9
- package/lib/modules/checkbox/checkbox-group-heading-level.d.ts +0 -1
- package/lib/modules/checkbox/checkbox-group-heading-style.d.ts +0 -1
- package/lib/modules/checkbox/checkbox-group.component.d.ts +0 -76
- package/lib/modules/checkbox/checkbox-label-text-label.component.d.ts +0 -12
- package/lib/modules/checkbox/checkbox-label.component.d.ts +0 -11
- package/lib/modules/checkbox/checkbox.component.d.ts +0 -195
- package/lib/modules/checkbox/checkbox.module.d.ts +0 -19
- package/lib/modules/field-group/field-group-heading-level.d.ts +0 -1
- package/lib/modules/field-group/field-group-heading-style.d.ts +0 -1
- package/lib/modules/field-group/field-group.component.d.ts +0 -61
- package/lib/modules/field-group/field-group.module.d.ts +0 -7
- package/lib/modules/file-attachment/file-attachment/file-attachment-change.d.ts +0 -7
- package/lib/modules/file-attachment/file-attachment/file-attachment-click.d.ts +0 -7
- package/lib/modules/file-attachment/file-attachment/file-attachment-join-ids.pipe.d.ts +0 -11
- package/lib/modules/file-attachment/file-attachment/file-attachment-label.component.d.ts +0 -17
- package/lib/modules/file-attachment/file-attachment/file-attachment.component.d.ts +0 -153
- package/lib/modules/file-attachment/file-attachment/file-attachment.module.d.ts +0 -9
- package/lib/modules/file-attachment/file-attachment/file-attachment.service.d.ts +0 -17
- package/lib/modules/file-attachment/file-attachments.module.d.ts +0 -11
- package/lib/modules/file-attachment/file-drop/file-drop-change.d.ts +0 -11
- package/lib/modules/file-attachment/file-drop/file-drop.component.d.ts +0 -162
- package/lib/modules/file-attachment/file-drop/file-drop.module.d.ts +0 -9
- package/lib/modules/file-attachment/file-drop/file-item.component.d.ts +0 -33
- package/lib/modules/file-attachment/file-drop/file-link.d.ts +0 -6
- package/lib/modules/file-attachment/shared/file-item-error-type.d.ts +0 -4
- package/lib/modules/file-attachment/shared/file-item.d.ts +0 -20
- package/lib/modules/file-attachment/shared/file-item.service.d.ts +0 -13
- package/lib/modules/file-attachment/shared/file-size.pipe.d.ts +0 -13
- package/lib/modules/file-attachment/shared/file-validate-function.d.ts +0 -5
- package/lib/modules/form-error/form-error.component.d.ts +0 -25
- package/lib/modules/form-error/form-error.module.d.ts +0 -7
- package/lib/modules/form-error/form-errors-enabled-token.d.ts +0 -5
- package/lib/modules/form-error/form-errors.component.d.ts +0 -30
- package/lib/modules/form-error/form-errors.module.d.ts +0 -11
- package/lib/modules/input-box/input-box-adapter.service.d.ts +0 -28
- package/lib/modules/input-box/input-box-control.directive.d.ts +0 -11
- package/lib/modules/input-box/input-box-hint-text.pipe.d.ts +0 -10
- package/lib/modules/input-box/input-box-host.service.d.ts +0 -40
- package/lib/modules/input-box/input-box-populate-args.d.ts +0 -12
- package/lib/modules/input-box/input-box.component.d.ts +0 -118
- package/lib/modules/input-box/input-box.module.d.ts +0 -16
- package/lib/modules/radio/radio-group-id.service.d.ts +0 -24
- package/lib/modules/radio/radio-group.component.d.ts +0 -157
- package/lib/modules/radio/radio-label.component.d.ts +0 -13
- package/lib/modules/radio/radio.component.d.ts +0 -169
- package/lib/modules/radio/radio.module.d.ts +0 -18
- package/lib/modules/radio/types/radio-change.d.ts +0 -9
- package/lib/modules/radio/types/radio-group-heading-level.d.ts +0 -1
- package/lib/modules/radio/types/radio-group-heading-style.d.ts +0 -1
- package/lib/modules/radio/types/radio-type.d.ts +0 -4
- package/lib/modules/required-state/required-state.directive.d.ts +0 -17
- package/lib/modules/selection-box/selection-box-adapter.service.d.ts +0 -46
- package/lib/modules/selection-box/selection-box-description.component.d.ts +0 -8
- package/lib/modules/selection-box/selection-box-grid.component.d.ts +0 -29
- package/lib/modules/selection-box/selection-box-header.component.d.ts +0 -8
- package/lib/modules/selection-box/selection-box.component.d.ts +0 -29
- package/lib/modules/selection-box/selection-box.module.d.ts +0 -12
- package/lib/modules/selection-box/types/selection-box-grid-align-items-type.d.ts +0 -4
- package/lib/modules/selection-box/types/selection-box-grid-align-items.d.ts +0 -14
- package/lib/modules/shared/sky-forms-resources.module.d.ts +0 -10
- package/lib/modules/toggle-switch/toggle-switch-label.component.d.ts +0 -12
- package/lib/modules/toggle-switch/toggle-switch.component.d.ts +0 -81
- package/lib/modules/toggle-switch/toggle-switch.module.d.ts +0 -12
- package/lib/modules/toggle-switch/types/toggle-switch-change.d.ts +0 -6
- package/testing/legacy/checkbox-fixture.d.ts +0 -38
- package/testing/legacy/radio-fixture.d.ts +0 -26
- package/testing/modules/character-counter/character-counter-indicator-harness-filters.d.ts +0 -6
- package/testing/modules/character-counter/character-counter-indicator-harness.d.ts +0 -31
- package/testing/modules/checkbox/checkbox-group-harness-filters.d.ts +0 -6
- package/testing/modules/checkbox/checkbox-group-harness.d.ts +0 -73
- package/testing/modules/checkbox/checkbox-harness-filters.d.ts +0 -6
- package/testing/modules/checkbox/checkbox-harness.d.ts +0 -103
- package/testing/modules/checkbox/checkbox-label-harness.d.ts +0 -16
- package/testing/modules/checkbox/checkbox-label-text-label.harness.d.ts +0 -16
- package/testing/modules/field-group/field-group-harness-filters.d.ts +0 -6
- package/testing/modules/field-group/field-group-harness.d.ts +0 -56
- package/testing/modules/file-attachment/file-attachment/file-attachment-harness-filters.d.ts +0 -6
- package/testing/modules/file-attachment/file-attachment/file-attachment-harness.d.ts +0 -101
- package/testing/modules/file-attachment/file-drop/file-drop-harness-filters.d.ts +0 -6
- package/testing/modules/file-attachment/file-drop/file-drop-harness.d.ts +0 -124
- package/testing/modules/file-attachment/file-drop/file-drop-link-upload-harness.d.ts +0 -28
- package/testing/modules/file-attachment/file-drop/file-drop-link-upload-input-harness.d.ts +0 -14
- package/testing/modules/file-attachment/file-drop/file-item-harness-filters.d.ts +0 -10
- package/testing/modules/file-attachment/file-drop/file-item-harness.d.ts +0 -28
- package/testing/modules/file-attachment/shared/provide-file-attachment-testing.d.ts +0 -11
- package/testing/modules/form-error/form-error-harness.d.ts +0 -23
- package/testing/modules/form-error/form-error-harness.filters.d.ts +0 -6
- package/testing/modules/form-error/form-errors-harness.d.ts +0 -24
- package/testing/modules/form-error/form-errors-harness.filters.d.ts +0 -6
- package/testing/modules/input-box/input-box-harness-filters.d.ts +0 -6
- package/testing/modules/input-box/input-box-harness.d.ts +0 -108
- package/testing/modules/radio/radio-group-harness-filters.d.ts +0 -6
- package/testing/modules/radio/radio-group-harness.d.ts +0 -69
- package/testing/modules/radio/radio-harness-filters.d.ts +0 -6
- package/testing/modules/radio/radio-harness.d.ts +0 -79
- package/testing/modules/radio/radio-label-harness.d.ts +0 -16
- package/testing/modules/selection-box/selection-box-description-harness.d.ts +0 -15
- package/testing/modules/selection-box/selection-box-grid-harness-filters.d.ts +0 -6
- package/testing/modules/selection-box/selection-box-grid-harness.d.ts +0 -27
- package/testing/modules/selection-box/selection-box-harness-filters.d.ts +0 -6
- package/testing/modules/selection-box/selection-box-harness.d.ts +0 -36
- package/testing/modules/selection-box/selection-box-header-harness.d.ts +0 -15
- package/testing/modules/toggle-switch/toggle-switch-harness-filters.d.ts +0 -6
- package/testing/modules/toggle-switch/toggle-switch-harness.d.ts +0 -67
- package/testing/modules/toggle-switch/toggle-switch-label-harness.d.ts +0 -16
- package/testing/public-api.d.ts +0 -35
package/testing/index.d.ts
CHANGED
|
@@ -1,5 +1,1119 @@
|
|
|
1
|
+
import { HarnessPredicate, ComponentHarness } from '@angular/cdk/testing';
|
|
2
|
+
import { SkyHarnessFilters, SkyComponentHarness, SkyQueryableComponentHarness } from '@skyux/core/testing';
|
|
3
|
+
import { SkyStatusIndicatorHarness } from '@skyux/indicators/testing';
|
|
4
|
+
import { SkyPopoverHarness } from '@skyux/popovers/testing';
|
|
5
|
+
import { ComponentFixture } from '@angular/core/testing';
|
|
6
|
+
import { SkyCheckboxGroupHeadingLevel, SkyCheckboxGroupHeadingStyle, SkyFieldGroupHeadingLevel, SkyFieldGroupHeadingStyle, SkyRadioGroupHeadingLevel, SkyRadioGroupHeadingStyle } from '@skyux/forms';
|
|
7
|
+
import { Provider } from '@angular/core';
|
|
8
|
+
import { SkyIconHarness } from '@skyux/icon/testing';
|
|
9
|
+
|
|
1
10
|
/**
|
|
2
|
-
*
|
|
11
|
+
* A set of criteria that can be used to filter a list of SkyCharacterCounterIndicatorHarness instances.
|
|
3
12
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
13
|
+
interface SkyCharacterCounterIndicatorHarnessFilters extends SkyHarnessFilters {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Harness for interacting with a character counter indicator component in tests.
|
|
18
|
+
*/
|
|
19
|
+
declare class SkyCharacterCounterIndicatorHarness extends SkyComponentHarness {
|
|
20
|
+
#private;
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
static hostSelector: string;
|
|
25
|
+
/**
|
|
26
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
27
|
+
* `SkyCharacterCounterIndicatorHarness` that meets certain criteria.
|
|
28
|
+
*/
|
|
29
|
+
static with(filters: SkyCharacterCounterIndicatorHarnessFilters): HarnessPredicate<SkyCharacterCounterIndicatorHarness>;
|
|
30
|
+
/**
|
|
31
|
+
* Gets the current character count.
|
|
32
|
+
*/
|
|
33
|
+
getCharacterCount(): Promise<number>;
|
|
34
|
+
/**
|
|
35
|
+
* Gets the character counter limit.
|
|
36
|
+
*/
|
|
37
|
+
getCharacterCountLimit(): Promise<number>;
|
|
38
|
+
/**
|
|
39
|
+
* Indicates whether the character counter is in an error state because the current character
|
|
40
|
+
* count is greater than the limit.
|
|
41
|
+
*/
|
|
42
|
+
isOverLimit(): Promise<boolean>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A set of criteria that can be used to filter a list of SkyInputBoxHarness instances.
|
|
47
|
+
*/
|
|
48
|
+
interface SkyInputBoxHarnessFilters extends SkyHarnessFilters {
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Harness for interacting with an input box component in tests.
|
|
53
|
+
*/
|
|
54
|
+
declare class SkyInputBoxHarness extends SkyQueryableComponentHarness {
|
|
55
|
+
#private;
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
static hostSelector: string;
|
|
60
|
+
/**
|
|
61
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
62
|
+
* `SkyInputBoxHarness` that meets certain criteria.
|
|
63
|
+
*/
|
|
64
|
+
static with(filters: SkyInputBoxHarnessFilters): HarnessPredicate<SkyInputBoxHarness>;
|
|
65
|
+
/**
|
|
66
|
+
* Clicks the help inline button.
|
|
67
|
+
*/
|
|
68
|
+
clickHelpInline(): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Gets the character counter indicator for the input box or throws an error if
|
|
71
|
+
* a character limit is not specified.
|
|
72
|
+
*/
|
|
73
|
+
getCharacterCounter(): Promise<SkyCharacterCounterIndicatorHarness>;
|
|
74
|
+
/**
|
|
75
|
+
* Gets a list of status indicator harnesses for errors not automatically
|
|
76
|
+
* handled by input box.
|
|
77
|
+
*/
|
|
78
|
+
getCustomErrors(): Promise<SkyStatusIndicatorHarness[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Whether the custom error is triggered.
|
|
81
|
+
*/
|
|
82
|
+
hasCustomFormError(errorName: string): Promise<boolean>;
|
|
83
|
+
/**
|
|
84
|
+
* Whether the required field is empty.
|
|
85
|
+
*/
|
|
86
|
+
hasRequiredError(): Promise<boolean>;
|
|
87
|
+
/**
|
|
88
|
+
* Whether the field has more characters than allowed.
|
|
89
|
+
*/
|
|
90
|
+
hasMaxLengthError(): Promise<boolean>;
|
|
91
|
+
/**
|
|
92
|
+
* Whether the field has fewer characters than allowed.
|
|
93
|
+
*/
|
|
94
|
+
hasMinLengthError(): Promise<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* Whether the field is set to an invalid email address.
|
|
97
|
+
*/
|
|
98
|
+
hasEmailError(): Promise<boolean>;
|
|
99
|
+
/**
|
|
100
|
+
* Whether the field is set to an invalid URL.
|
|
101
|
+
*/
|
|
102
|
+
hasUrlError(): Promise<boolean>;
|
|
103
|
+
/**
|
|
104
|
+
* Whether the field is set to an invalid date.
|
|
105
|
+
*/
|
|
106
|
+
hasInvalidDateError(): Promise<boolean>;
|
|
107
|
+
/**
|
|
108
|
+
* Whether the field is set to an invalid minimum date.
|
|
109
|
+
*/
|
|
110
|
+
hasMinDateError(): Promise<boolean>;
|
|
111
|
+
/**
|
|
112
|
+
* Whether the field is set to an invalid maximum date.
|
|
113
|
+
*/
|
|
114
|
+
hasMaxDateError(): Promise<boolean>;
|
|
115
|
+
/**
|
|
116
|
+
* Whether the field is set to an invalid phone number.
|
|
117
|
+
*/
|
|
118
|
+
hasPhoneFieldError(): Promise<boolean>;
|
|
119
|
+
/**
|
|
120
|
+
* Whether the field is set to an invalid time.
|
|
121
|
+
*/
|
|
122
|
+
hasTimeError(): Promise<boolean>;
|
|
123
|
+
/**
|
|
124
|
+
* Indicates whether the input box has disabled styles applied.
|
|
125
|
+
*/
|
|
126
|
+
getDisabled(): Promise<boolean>;
|
|
127
|
+
/**
|
|
128
|
+
* Gets the text for the input box label.
|
|
129
|
+
*/
|
|
130
|
+
getLabelText(): Promise<string>;
|
|
131
|
+
/**
|
|
132
|
+
* Gets the help popover for the input box or throws an error if
|
|
133
|
+
* the help popover is not configured.
|
|
134
|
+
*/
|
|
135
|
+
getHelpPopover(): Promise<SkyPopoverHarness>;
|
|
136
|
+
/**2
|
|
137
|
+
* Gets the help popover content.
|
|
138
|
+
*/
|
|
139
|
+
getHelpPopoverContent(): Promise<string | undefined>;
|
|
140
|
+
/**
|
|
141
|
+
* Gets the help popover title.
|
|
142
|
+
*/
|
|
143
|
+
getHelpPopoverTitle(): Promise<string | undefined>;
|
|
144
|
+
/**
|
|
145
|
+
* Gets the hint text for the input box.
|
|
146
|
+
*/
|
|
147
|
+
getHintText(): Promise<string>;
|
|
148
|
+
/**
|
|
149
|
+
* Indicates whether the input box has stacked styles applied.
|
|
150
|
+
*/
|
|
151
|
+
getStacked(): Promise<boolean>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Allows interaction with a SKY UX checkbox component.
|
|
156
|
+
* @internal
|
|
157
|
+
* @deprecated Use `SkyCheckboxHarness` instead.
|
|
158
|
+
*/
|
|
159
|
+
declare class SkyCheckboxFixture {
|
|
160
|
+
#private;
|
|
161
|
+
constructor(fixture: ComponentFixture<any>, skyTestId: string);
|
|
162
|
+
/**
|
|
163
|
+
* A flag indicating whether the checkbox is currently selected.
|
|
164
|
+
*/
|
|
165
|
+
get selected(): boolean;
|
|
166
|
+
/**
|
|
167
|
+
* The checkbox's label
|
|
168
|
+
*/
|
|
169
|
+
get labelText(): string | undefined;
|
|
170
|
+
/**
|
|
171
|
+
* The checkbox's icon type
|
|
172
|
+
*/
|
|
173
|
+
get iconType(): string | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* The checkbox's type.
|
|
176
|
+
*/
|
|
177
|
+
get checkboxType(): string | undefined;
|
|
178
|
+
/**
|
|
179
|
+
* A flag indicating whether the checkbox is currently disabled.
|
|
180
|
+
*/
|
|
181
|
+
get disabled(): boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Selects the checkbox.
|
|
184
|
+
*/
|
|
185
|
+
select(): void;
|
|
186
|
+
/**
|
|
187
|
+
* Deselects the checkbox.
|
|
188
|
+
*/
|
|
189
|
+
deselect(): void;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* A set of criteria that can be used to filter a list of `SkyCheckboxGroupHarness` instances.
|
|
194
|
+
*/
|
|
195
|
+
interface SkyCheckboxGroupHarnessFilters extends SkyHarnessFilters {
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* A set of criteria that can be used to filter a list of `SkyCheckboxHarness` instances.
|
|
200
|
+
*/
|
|
201
|
+
interface SkyCheckboxHarnessFilters extends SkyHarnessFilters {
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Harness for interacting with a checkbox component in tests.
|
|
206
|
+
*/
|
|
207
|
+
declare class SkyCheckboxHarness extends SkyComponentHarness {
|
|
208
|
+
#private;
|
|
209
|
+
/**
|
|
210
|
+
* @internal
|
|
211
|
+
*/
|
|
212
|
+
static hostSelector: string;
|
|
213
|
+
/**
|
|
214
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
215
|
+
* `SkyCheckboxHarness` that meets certain criteria.
|
|
216
|
+
*/
|
|
217
|
+
static with(filters: SkyCheckboxHarnessFilters): HarnessPredicate<SkyCheckboxHarness>;
|
|
218
|
+
/**
|
|
219
|
+
* Blurs the checkbox.
|
|
220
|
+
*/
|
|
221
|
+
blur(): Promise<void>;
|
|
222
|
+
/**
|
|
223
|
+
* Clicks the help inline button.
|
|
224
|
+
*/
|
|
225
|
+
clickHelpInline(): Promise<void>;
|
|
226
|
+
/**
|
|
227
|
+
* Puts the checkbox in a checked state by toggling it if it is currently unchecked, or doing nothing if it is already checked.
|
|
228
|
+
*/
|
|
229
|
+
check(): Promise<void>;
|
|
230
|
+
/**
|
|
231
|
+
* Focuses the checkbox.
|
|
232
|
+
*/
|
|
233
|
+
focus(): Promise<void>;
|
|
234
|
+
/**
|
|
235
|
+
* Gets the checkbox's aria-label.
|
|
236
|
+
*/
|
|
237
|
+
getAriaLabel(): Promise<string | null>;
|
|
238
|
+
/**
|
|
239
|
+
* Gets the checkbox's aria-labelledby.
|
|
240
|
+
*/
|
|
241
|
+
getAriaLabelledby(): Promise<string | null>;
|
|
242
|
+
/**
|
|
243
|
+
* Gets the help popover content.
|
|
244
|
+
*/
|
|
245
|
+
getHelpPopoverContent(): Promise<string | undefined>;
|
|
246
|
+
/**
|
|
247
|
+
* Gets the help popover title.
|
|
248
|
+
*/
|
|
249
|
+
getHelpPopoverTitle(): Promise<string | undefined>;
|
|
250
|
+
/**
|
|
251
|
+
* Gets the checkbox's label text. If the label is set via `labelText` and `labelHidden` is true,
|
|
252
|
+
* the text will still be returned.
|
|
253
|
+
*/
|
|
254
|
+
getLabelText(): Promise<string | undefined>;
|
|
255
|
+
/**
|
|
256
|
+
* Whether the label is hidden. Only supported when using the `labelText` input to set the label.
|
|
257
|
+
*/
|
|
258
|
+
getLabelHidden(): Promise<boolean>;
|
|
259
|
+
/**
|
|
260
|
+
* Gets the checkbox's hint text.
|
|
261
|
+
*/
|
|
262
|
+
getHintText(): Promise<string>;
|
|
263
|
+
/**
|
|
264
|
+
* Gets the checkbox's name.
|
|
265
|
+
*/
|
|
266
|
+
getName(): Promise<string | null>;
|
|
267
|
+
/**
|
|
268
|
+
* Gets the checkbox's value.
|
|
269
|
+
*/
|
|
270
|
+
getValue(): Promise<string | null>;
|
|
271
|
+
/**
|
|
272
|
+
* Whether the checkbox displays custom error.
|
|
273
|
+
*/
|
|
274
|
+
hasCustomError(errorName: string): Promise<boolean>;
|
|
275
|
+
/**
|
|
276
|
+
* Whether the checkbox displays an error that it is required.
|
|
277
|
+
*/
|
|
278
|
+
hasRequiredError(): Promise<boolean>;
|
|
279
|
+
/**
|
|
280
|
+
* Whether the checkbox is checked.
|
|
281
|
+
*/
|
|
282
|
+
isChecked(): Promise<boolean>;
|
|
283
|
+
/**
|
|
284
|
+
* Whether the checkbox is disabled.
|
|
285
|
+
*/
|
|
286
|
+
isDisabled(): Promise<boolean>;
|
|
287
|
+
/**
|
|
288
|
+
* Whether the checkbox is focused.
|
|
289
|
+
*/
|
|
290
|
+
isFocused(): Promise<boolean>;
|
|
291
|
+
/**
|
|
292
|
+
* Whether the checkbox is required.
|
|
293
|
+
*/
|
|
294
|
+
isRequired(): Promise<boolean>;
|
|
295
|
+
/**
|
|
296
|
+
* Whether the checkbox is stacked.
|
|
297
|
+
*/
|
|
298
|
+
isStacked(): Promise<boolean>;
|
|
299
|
+
/**
|
|
300
|
+
* Puts the checkbox in an unchecked state by toggling it if it is currently checked, or doing nothing if it is already unchecked.
|
|
301
|
+
*/
|
|
302
|
+
uncheck(): Promise<void>;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Harness for interacting with a checkbox group component in tests.
|
|
307
|
+
*/
|
|
308
|
+
declare class SkyCheckboxGroupHarness extends SkyComponentHarness {
|
|
309
|
+
#private;
|
|
310
|
+
/**
|
|
311
|
+
* @internal
|
|
312
|
+
*/
|
|
313
|
+
static hostSelector: string;
|
|
314
|
+
/**
|
|
315
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
316
|
+
* `SkyCheckboxGroupHarness` that meets certain criteria.
|
|
317
|
+
*/
|
|
318
|
+
static with(filters: SkyCheckboxGroupHarnessFilters): HarnessPredicate<SkyCheckboxGroupHarness>;
|
|
319
|
+
/**
|
|
320
|
+
* Clicks the help inline button.
|
|
321
|
+
*/
|
|
322
|
+
clickHelpInline(): Promise<void>;
|
|
323
|
+
/**
|
|
324
|
+
* Gets an array of harnesses for the checkboxes in the checkbox group.
|
|
325
|
+
*/
|
|
326
|
+
getCheckboxes(): Promise<SkyCheckboxHarness[]>;
|
|
327
|
+
/**
|
|
328
|
+
* Gets the help popover content.
|
|
329
|
+
*/
|
|
330
|
+
getHelpPopoverContent(): Promise<string | undefined>;
|
|
331
|
+
/**
|
|
332
|
+
* Gets the help popover title.
|
|
333
|
+
*/
|
|
334
|
+
getHelpPopoverTitle(): Promise<string | undefined>;
|
|
335
|
+
/**
|
|
336
|
+
* Gets the checkbox group's heading text. If `headingHidden` is true,
|
|
337
|
+
* the text will still be returned.
|
|
338
|
+
*/
|
|
339
|
+
getHeadingText(): Promise<string | undefined>;
|
|
340
|
+
/**
|
|
341
|
+
* Gets the checkbox group's hint text.
|
|
342
|
+
*/
|
|
343
|
+
getHintText(): Promise<string>;
|
|
344
|
+
/**
|
|
345
|
+
* Whether the heading is hidden.
|
|
346
|
+
*/
|
|
347
|
+
getHeadingHidden(): Promise<boolean>;
|
|
348
|
+
/**
|
|
349
|
+
* The semantic heading level used for the checkbox group. Returns undefined if heading level is not set.
|
|
350
|
+
*/
|
|
351
|
+
getHeadingLevel(): Promise<SkyCheckboxGroupHeadingLevel | undefined>;
|
|
352
|
+
/**
|
|
353
|
+
* The heading style used for the checkbox group.
|
|
354
|
+
*/
|
|
355
|
+
getHeadingStyle(): Promise<SkyCheckboxGroupHeadingStyle>;
|
|
356
|
+
/**
|
|
357
|
+
* Whether the checkbox group is required.
|
|
358
|
+
*/
|
|
359
|
+
getRequired(): Promise<boolean>;
|
|
360
|
+
/**
|
|
361
|
+
* Whether the checkbox group is stacked.
|
|
362
|
+
*/
|
|
363
|
+
getStacked(): Promise<boolean>;
|
|
364
|
+
/**
|
|
365
|
+
* Whether all the checkboxes in a required group are unchecked.
|
|
366
|
+
*/
|
|
367
|
+
hasRequiredError(): Promise<boolean>;
|
|
368
|
+
/**
|
|
369
|
+
* Whether the checkbox group has errors.
|
|
370
|
+
*/
|
|
371
|
+
hasError(errorName: string): Promise<boolean>;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Harness for interacting with a checkbox label component in tests.
|
|
376
|
+
* @internal
|
|
377
|
+
*/
|
|
378
|
+
declare class SkyCheckboxLabelHarness extends ComponentHarness {
|
|
379
|
+
#private;
|
|
380
|
+
/**
|
|
381
|
+
* @internal
|
|
382
|
+
*/
|
|
383
|
+
static hostSelector: string;
|
|
384
|
+
/**
|
|
385
|
+
* Gets the text content of the checkbox label.
|
|
386
|
+
*/
|
|
387
|
+
getText(): Promise<string>;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* A set of criteria that can be used to filter a list of `SkyFileAttachmentHarness` instances.
|
|
392
|
+
*/
|
|
393
|
+
interface SkyFileAttachmentHarnessFilters extends SkyHarnessFilters {
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Harness for interacting with a file attachment component in tests.
|
|
398
|
+
*/
|
|
399
|
+
declare class SkyFileAttachmentHarness extends SkyComponentHarness {
|
|
400
|
+
#private;
|
|
401
|
+
/**
|
|
402
|
+
* @internal
|
|
403
|
+
*/
|
|
404
|
+
static hostSelector: string;
|
|
405
|
+
/**
|
|
406
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
407
|
+
* `SkyFileAttachmentHarness` that meets certain criteria.
|
|
408
|
+
*/
|
|
409
|
+
static with(filters: SkyFileAttachmentHarnessFilters): HarnessPredicate<SkyFileAttachmentHarness>;
|
|
410
|
+
/**
|
|
411
|
+
* Clicks the attach file button if it is visible.
|
|
412
|
+
*/
|
|
413
|
+
clickAttachFileButton(): Promise<void>;
|
|
414
|
+
/**
|
|
415
|
+
* Clicks the help inline button.
|
|
416
|
+
*/
|
|
417
|
+
clickHelpInline(): Promise<void>;
|
|
418
|
+
/**
|
|
419
|
+
* Clicks the replace file button in default theme.
|
|
420
|
+
*/
|
|
421
|
+
clickReplaceFileButton(): Promise<void>;
|
|
422
|
+
/**
|
|
423
|
+
* Clicks the attached file to download it.
|
|
424
|
+
*/
|
|
425
|
+
clickAttachedFile(): Promise<void>;
|
|
426
|
+
/**
|
|
427
|
+
* Clicks the attached file's delete button.
|
|
428
|
+
*/
|
|
429
|
+
clickAttachedFileDeleteButton(): Promise<void>;
|
|
430
|
+
/**
|
|
431
|
+
* Gets the accepted file types.
|
|
432
|
+
*/
|
|
433
|
+
getAcceptedTypes(): Promise<string | null>;
|
|
434
|
+
/**
|
|
435
|
+
* Gets the help inline popover content.
|
|
436
|
+
*/
|
|
437
|
+
getHelpPopoverContent(): Promise<string | undefined>;
|
|
438
|
+
/**
|
|
439
|
+
* Gets the help inline popover title.
|
|
440
|
+
*/
|
|
441
|
+
getHelpPopoverTitle(): Promise<string | undefined>;
|
|
442
|
+
/**
|
|
443
|
+
* Gets the hint text.
|
|
444
|
+
*/
|
|
445
|
+
getHintText(): Promise<string>;
|
|
446
|
+
/**
|
|
447
|
+
* Gets the file attachment label.
|
|
448
|
+
*/
|
|
449
|
+
getLabelText(): Promise<string>;
|
|
450
|
+
/**
|
|
451
|
+
* Whether a custom error has fired.
|
|
452
|
+
*/
|
|
453
|
+
hasCustomError(errorName: string): Promise<boolean>;
|
|
454
|
+
/**
|
|
455
|
+
* Whether the wrong file type error has fired.
|
|
456
|
+
*/
|
|
457
|
+
hasFileTypeError(): Promise<boolean>;
|
|
458
|
+
/**
|
|
459
|
+
* Whether the max file size error has fired.
|
|
460
|
+
*/
|
|
461
|
+
hasMaxFileSizeError(): Promise<boolean>;
|
|
462
|
+
/**
|
|
463
|
+
* Whether the min file size error has fired.
|
|
464
|
+
*/
|
|
465
|
+
hasMinFileSizeError(): Promise<boolean>;
|
|
466
|
+
/**
|
|
467
|
+
* Whether the required error has fired.
|
|
468
|
+
*/
|
|
469
|
+
hasRequiredError(): Promise<boolean>;
|
|
470
|
+
/**
|
|
471
|
+
* Whether file attachment is disabled.
|
|
472
|
+
*/
|
|
473
|
+
isDisabled(): Promise<boolean>;
|
|
474
|
+
/**
|
|
475
|
+
* Whether file attachment is required.
|
|
476
|
+
*/
|
|
477
|
+
isRequired(): Promise<boolean>;
|
|
478
|
+
/**
|
|
479
|
+
* Whether file attachment has stacked enabled.
|
|
480
|
+
*/
|
|
481
|
+
isStacked(): Promise<boolean>;
|
|
482
|
+
/**
|
|
483
|
+
* Attaches a file.
|
|
484
|
+
* Be sure to include `provideSkyFileReaderTesting` as a provider when calling this function in tests.
|
|
485
|
+
* @example
|
|
486
|
+
* ```typescript
|
|
487
|
+
* TestBed.configureTestingModule({
|
|
488
|
+
* providers: [provideSkyFileReaderTesting()]
|
|
489
|
+
* });
|
|
490
|
+
* ```
|
|
491
|
+
*/
|
|
492
|
+
attachFile(file: File): Promise<void>;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* A set of criteria that can be used to filter a list of `SkyFileDropHarness` instances.
|
|
497
|
+
*/
|
|
498
|
+
interface SkyFileDropHarnessFilters extends SkyHarnessFilters {
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Harness for interacting with a file drop component in tests.
|
|
503
|
+
*/
|
|
504
|
+
declare class SkyFileDropHarness extends SkyComponentHarness {
|
|
505
|
+
#private;
|
|
506
|
+
/**
|
|
507
|
+
* @internal
|
|
508
|
+
*/
|
|
509
|
+
static hostSelector: string;
|
|
510
|
+
/**
|
|
511
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
512
|
+
* `SkyFileDropHarness` that meets certain criteria.
|
|
513
|
+
*/
|
|
514
|
+
static with(filters: SkyFileDropHarnessFilters): HarnessPredicate<SkyFileDropHarness>;
|
|
515
|
+
/**
|
|
516
|
+
* Clicks the file drop target.
|
|
517
|
+
*/
|
|
518
|
+
clickFileDropTarget(): Promise<void>;
|
|
519
|
+
/**
|
|
520
|
+
* Clicks the help inline button.
|
|
521
|
+
*/
|
|
522
|
+
clickHelpInline(): Promise<void>;
|
|
523
|
+
/**
|
|
524
|
+
* Clicks the link upload `Done` button'.
|
|
525
|
+
*/
|
|
526
|
+
clickLinkUploadDoneButton(): Promise<void>;
|
|
527
|
+
/**
|
|
528
|
+
* Enters text into the link upload input.
|
|
529
|
+
*/
|
|
530
|
+
enterLinkUploadText(link: string): Promise<void>;
|
|
531
|
+
/**
|
|
532
|
+
* Gets the accepted file types.
|
|
533
|
+
*/
|
|
534
|
+
getAcceptedTypes(): Promise<string | null>;
|
|
535
|
+
/**
|
|
536
|
+
* Gets the aria-label for the file upload button.
|
|
537
|
+
*/
|
|
538
|
+
getFileUploadAriaLabel(): Promise<string | null>;
|
|
539
|
+
/**
|
|
540
|
+
* Gets the help inline popover content.
|
|
541
|
+
*/
|
|
542
|
+
getHelpPopoverContent(): Promise<string | undefined>;
|
|
543
|
+
/**
|
|
544
|
+
* Gets the help inline popover title.
|
|
545
|
+
*/
|
|
546
|
+
getHelpPopoverTitle(): Promise<string | undefined>;
|
|
547
|
+
/**
|
|
548
|
+
* Gets the hint text.
|
|
549
|
+
*/
|
|
550
|
+
getHintText(): Promise<string>;
|
|
551
|
+
/**
|
|
552
|
+
* Gets the label text.
|
|
553
|
+
*/
|
|
554
|
+
getLabelText(): Promise<string>;
|
|
555
|
+
/**
|
|
556
|
+
* Gets the link upload aria-label.
|
|
557
|
+
*/
|
|
558
|
+
getLinkUploadAriaLabel(): Promise<string | null>;
|
|
559
|
+
/**
|
|
560
|
+
* Gets the link upload hint text.
|
|
561
|
+
*/
|
|
562
|
+
getLinkUploadHintText(): Promise<string | undefined>;
|
|
563
|
+
/**
|
|
564
|
+
* Whether a custom form error has fired.
|
|
565
|
+
*/
|
|
566
|
+
hasCustomError(errorName: string): Promise<boolean>;
|
|
567
|
+
/**
|
|
568
|
+
* Whether the file type error has fired.
|
|
569
|
+
*/
|
|
570
|
+
hasFileTypeError(): Promise<boolean>;
|
|
571
|
+
/**
|
|
572
|
+
* Whether the max file size error has fired.
|
|
573
|
+
*/
|
|
574
|
+
hasMaxFileSizeError(): Promise<boolean>;
|
|
575
|
+
/**
|
|
576
|
+
* Whether the min file size error has fired.
|
|
577
|
+
*/
|
|
578
|
+
hasMinFileSizeError(): Promise<boolean>;
|
|
579
|
+
/**
|
|
580
|
+
* Whether the required error has fired.
|
|
581
|
+
*/
|
|
582
|
+
hasRequiredError(): Promise<boolean>;
|
|
583
|
+
/**
|
|
584
|
+
* Whether the validate error from the customer validation has fired.
|
|
585
|
+
*/
|
|
586
|
+
hasValidateFnError(): Promise<boolean>;
|
|
587
|
+
/**
|
|
588
|
+
* Whether label text is hidden.
|
|
589
|
+
*/
|
|
590
|
+
isLabelHidden(): Promise<boolean>;
|
|
591
|
+
/**
|
|
592
|
+
* Whether file drop is required.
|
|
593
|
+
*/
|
|
594
|
+
isRequired(): Promise<boolean>;
|
|
595
|
+
/**
|
|
596
|
+
* Whether file drop has stacked enabled.
|
|
597
|
+
*/
|
|
598
|
+
isStacked(): Promise<boolean>;
|
|
599
|
+
/**
|
|
600
|
+
* Loads a single file.
|
|
601
|
+
* Be sure to include `provideSkyFileReaderTesting` as a provider when calling this function in tests.
|
|
602
|
+
* @example
|
|
603
|
+
* ```typescript
|
|
604
|
+
* TestBed.configureTestingModule({
|
|
605
|
+
* providers: [provideSkyFileReaderTesting()]
|
|
606
|
+
* });
|
|
607
|
+
* ``
|
|
608
|
+
*/
|
|
609
|
+
loadFile(file: File): Promise<void>;
|
|
610
|
+
/**
|
|
611
|
+
* Loads multiple files.
|
|
612
|
+
* Be sure to include `provideSkyFileReaderTesting` as a provider when calling this function in tests.
|
|
613
|
+
* @example
|
|
614
|
+
* ```typescript
|
|
615
|
+
* TestBed.configureTestingModule({
|
|
616
|
+
* providers: [provideSkyFileReaderTesting()]
|
|
617
|
+
* });
|
|
618
|
+
* ``
|
|
619
|
+
*/
|
|
620
|
+
loadFiles(files: File[] | null): Promise<void>;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Provides mocks for file attachment testing.
|
|
625
|
+
* @example
|
|
626
|
+
* ```typescript
|
|
627
|
+
* TestBed.configureTestingModule({
|
|
628
|
+
* providers: [provideSkyFileAttachmentTesting()]
|
|
629
|
+
* });
|
|
630
|
+
* ```
|
|
631
|
+
*/
|
|
632
|
+
declare function provideSkyFileAttachmentTesting(): Provider[];
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* A set of criteria that can be used to filter a list of `SkyFileItemHarness` instances.
|
|
636
|
+
*/
|
|
637
|
+
interface SkyFileItemHarnessFilters extends SkyHarnessFilters {
|
|
638
|
+
/**
|
|
639
|
+
* Finds files whose file name matches this value.
|
|
640
|
+
*/
|
|
641
|
+
fileName: string;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* Harness for interacting with a file item component in tests.
|
|
646
|
+
*/
|
|
647
|
+
declare class SkyFileItemHarness extends ComponentHarness {
|
|
648
|
+
/**
|
|
649
|
+
* @internal
|
|
650
|
+
*/
|
|
651
|
+
static hostSelector: string;
|
|
652
|
+
/**
|
|
653
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
654
|
+
* `SkyFileItemHarness` that meets certain criteria.
|
|
655
|
+
*/
|
|
656
|
+
static with(filters: SkyFileItemHarnessFilters): HarnessPredicate<SkyFileItemHarness>;
|
|
657
|
+
/**
|
|
658
|
+
* Clicks the delete button.
|
|
659
|
+
*/
|
|
660
|
+
clickDeleteButton(): Promise<void>;
|
|
661
|
+
/**
|
|
662
|
+
* Gets the file name.
|
|
663
|
+
*/
|
|
664
|
+
getFileName(): Promise<string>;
|
|
665
|
+
/**
|
|
666
|
+
* Gets the file size.
|
|
667
|
+
*/
|
|
668
|
+
getFileSize(): Promise<string>;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* A set of criteria that can be used to filter a list of `SkyFormErrorHarness` instances.
|
|
673
|
+
*/
|
|
674
|
+
interface SkyFormErrorsHarnessFilters extends SkyHarnessFilters {
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
declare class SkyFormErrorsHarness extends SkyComponentHarness {
|
|
678
|
+
/**
|
|
679
|
+
* @internal
|
|
680
|
+
*/
|
|
681
|
+
static hostSelector: string;
|
|
682
|
+
/**
|
|
683
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
684
|
+
* `SkyFormErrorsHarness` that meets certain criteria
|
|
685
|
+
*/
|
|
686
|
+
static with(filters: SkyFormErrorsHarnessFilters): HarnessPredicate<SkyFormErrorsHarness>;
|
|
687
|
+
/**
|
|
688
|
+
* Gets a list of all errors fired.
|
|
689
|
+
*/
|
|
690
|
+
getFormErrors(): Promise<{
|
|
691
|
+
errorName: string | null;
|
|
692
|
+
}[]>;
|
|
693
|
+
/**
|
|
694
|
+
* Whether an error with the given name has fired.
|
|
695
|
+
*/
|
|
696
|
+
hasError(errorName: string): Promise<boolean>;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* A set of criteria that can be used to filter a list of `SkyFormErrorHarness` instances.
|
|
701
|
+
*/
|
|
702
|
+
interface SkyFormErrorHarnessFilters extends SkyHarnessFilters {
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
declare class SkyFormErrorHarness extends SkyComponentHarness {
|
|
706
|
+
#private;
|
|
707
|
+
/**
|
|
708
|
+
* @internal
|
|
709
|
+
*/
|
|
710
|
+
static hostSelector: string;
|
|
711
|
+
/**
|
|
712
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
713
|
+
* `SkyFormErrorHarness` that meets certain criteria
|
|
714
|
+
*/
|
|
715
|
+
static with(filters: SkyFormErrorHarnessFilters): HarnessPredicate<SkyFormErrorHarness>;
|
|
716
|
+
/**
|
|
717
|
+
* Gets the error name.
|
|
718
|
+
*/
|
|
719
|
+
getErrorName(): Promise<string | null>;
|
|
720
|
+
/**
|
|
721
|
+
* Gets the error text.
|
|
722
|
+
*/
|
|
723
|
+
getErrorText(): Promise<string | null>;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* A set of criteria that can be used to filter a list of `SkyFieldGroupHarness` instances.
|
|
728
|
+
*/
|
|
729
|
+
interface SkyFieldGroupHarnessFilters extends SkyHarnessFilters {
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Harness for interacting with a field group component in tests.
|
|
734
|
+
*/
|
|
735
|
+
declare class SkyFieldGroupHarness extends SkyComponentHarness {
|
|
736
|
+
#private;
|
|
737
|
+
/**
|
|
738
|
+
* @internal
|
|
739
|
+
*/
|
|
740
|
+
static hostSelector: string;
|
|
741
|
+
/**
|
|
742
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
743
|
+
* `SkyFieldGroupHarness` that meets certain criteria.
|
|
744
|
+
*/
|
|
745
|
+
static with(filters: SkyFieldGroupHarnessFilters): HarnessPredicate<SkyFieldGroupHarness>;
|
|
746
|
+
/**
|
|
747
|
+
* Gets the field group's heading text. If `headingHidden` is true,
|
|
748
|
+
* the text will still be returned.
|
|
749
|
+
*/
|
|
750
|
+
getHeadingText(): Promise<string | undefined>;
|
|
751
|
+
/**
|
|
752
|
+
* Gets the field group's hint text.
|
|
753
|
+
*/
|
|
754
|
+
getHintText(): Promise<string>;
|
|
755
|
+
/**
|
|
756
|
+
* Whether the heading is hidden.
|
|
757
|
+
*/
|
|
758
|
+
getHeadingHidden(): Promise<boolean>;
|
|
759
|
+
/**
|
|
760
|
+
* Whether the field group is stacked.
|
|
761
|
+
*/
|
|
762
|
+
getStacked(): Promise<boolean>;
|
|
763
|
+
/**
|
|
764
|
+
* The semantic heading level used for the field group.
|
|
765
|
+
*/
|
|
766
|
+
getHeadingLevel(): Promise<SkyFieldGroupHeadingLevel>;
|
|
767
|
+
/**
|
|
768
|
+
* The heading style used for the field group.
|
|
769
|
+
*/
|
|
770
|
+
getHeadingStyle(): Promise<SkyFieldGroupHeadingStyle>;
|
|
771
|
+
/**
|
|
772
|
+
* Clicks the help inline button.
|
|
773
|
+
*/
|
|
774
|
+
clickHelpInline(): Promise<void>;
|
|
775
|
+
/**
|
|
776
|
+
* Gets the help popover content.
|
|
777
|
+
*/
|
|
778
|
+
getHelpPopoverContent(): Promise<string | undefined>;
|
|
779
|
+
/**
|
|
780
|
+
* Gets the help popover title.
|
|
781
|
+
*/
|
|
782
|
+
getHelpPopoverTitle(): Promise<string | undefined>;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* Allows interaction with a SKY UX radio buttons within a radio group.
|
|
787
|
+
* @deprecated Use `SkyRadioHarness` instead.
|
|
788
|
+
* @internal
|
|
789
|
+
*/
|
|
790
|
+
declare class SkyRadioFixture {
|
|
791
|
+
#private;
|
|
792
|
+
constructor(fixture: ComponentFixture<any>, skyTestId: string);
|
|
793
|
+
/**
|
|
794
|
+
* The selected radio button value.
|
|
795
|
+
*/
|
|
796
|
+
get value(): string;
|
|
797
|
+
/**
|
|
798
|
+
* Set the selected radio button value.
|
|
799
|
+
*/
|
|
800
|
+
set value(value: string);
|
|
801
|
+
/**
|
|
802
|
+
* A flag indicating if every radio button in the radio group is disabled.
|
|
803
|
+
*/
|
|
804
|
+
get disabled(): boolean;
|
|
805
|
+
/**
|
|
806
|
+
* Set the disabled value for all radio buttons.
|
|
807
|
+
*/
|
|
808
|
+
set disabled(value: boolean);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* A set of criteria that can be used to filter a list of `SkyRadioGroupHarness` instances.
|
|
813
|
+
*/
|
|
814
|
+
interface SkyRadioGroupHarnessFilters extends SkyHarnessFilters {
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* A set of criteria that can be used to filter a list of `SkyRadioHarness` instances.
|
|
819
|
+
*/
|
|
820
|
+
interface SkyRadioHarnessFilters extends SkyHarnessFilters {
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* Harness for interacting with a radio button component in tests.
|
|
825
|
+
*/
|
|
826
|
+
declare class SkyRadioHarness extends SkyComponentHarness {
|
|
827
|
+
#private;
|
|
828
|
+
/**
|
|
829
|
+
* @internal
|
|
830
|
+
*/
|
|
831
|
+
static hostSelector: string;
|
|
832
|
+
/**
|
|
833
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
834
|
+
* `SkyRadioHarness` that meets certain criteria.
|
|
835
|
+
*/
|
|
836
|
+
static with(filters: SkyRadioHarnessFilters): HarnessPredicate<SkyRadioHarness>;
|
|
837
|
+
/**
|
|
838
|
+
* Blurs the radio button.
|
|
839
|
+
*/
|
|
840
|
+
blur(): Promise<void>;
|
|
841
|
+
/**
|
|
842
|
+
* Puts the radio button in a checked state if it is currently unchecked.
|
|
843
|
+
*/
|
|
844
|
+
check(): Promise<void>;
|
|
845
|
+
/**
|
|
846
|
+
* Clicks the help inline button.
|
|
847
|
+
*/
|
|
848
|
+
clickHelpInline(): Promise<void>;
|
|
849
|
+
/**
|
|
850
|
+
* Focuses the radio button.
|
|
851
|
+
*/
|
|
852
|
+
focus(): Promise<void>;
|
|
853
|
+
/**
|
|
854
|
+
* Gets the radio button's aria-label.
|
|
855
|
+
*/
|
|
856
|
+
getAriaLabel(): Promise<string | null>;
|
|
857
|
+
/**
|
|
858
|
+
* Gets the radio button's aria-labelledby.
|
|
859
|
+
*/
|
|
860
|
+
getAriaLabelledby(): Promise<string | null>;
|
|
861
|
+
/**
|
|
862
|
+
* Gets the help popover content.
|
|
863
|
+
*/
|
|
864
|
+
getHelpPopoverContent(): Promise<string | undefined>;
|
|
865
|
+
/**
|
|
866
|
+
* Gets the help popover title.
|
|
867
|
+
*/
|
|
868
|
+
getHelpPopoverTitle(): Promise<string | undefined>;
|
|
869
|
+
/**
|
|
870
|
+
* Gets the radio button's hint text.
|
|
871
|
+
*/
|
|
872
|
+
getHintText(): Promise<string>;
|
|
873
|
+
/**
|
|
874
|
+
* Whether the label is hidden. Only supported when using the `labelText` input to set the label.
|
|
875
|
+
*/
|
|
876
|
+
getLabelHidden(): Promise<boolean>;
|
|
877
|
+
/**
|
|
878
|
+
* Gets the radio button's label text. If the label is set via `labelText` and `labelHidden` is true,
|
|
879
|
+
* the text will still be returned.
|
|
880
|
+
*/
|
|
881
|
+
getLabelText(): Promise<string | undefined>;
|
|
882
|
+
/**
|
|
883
|
+
* Gets the radio button's name.
|
|
884
|
+
*/
|
|
885
|
+
getName(): Promise<string | null>;
|
|
886
|
+
/**
|
|
887
|
+
* Whether the radio button is checked.
|
|
888
|
+
*/
|
|
889
|
+
isChecked(): Promise<boolean>;
|
|
890
|
+
/**
|
|
891
|
+
* Whether the radio button is disabled.
|
|
892
|
+
*/
|
|
893
|
+
isDisabled(): Promise<boolean>;
|
|
894
|
+
/**
|
|
895
|
+
* Whether the radio button is focused.
|
|
896
|
+
*/
|
|
897
|
+
isFocused(): Promise<boolean>;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Harness for interacting with a radio group component in tests.
|
|
902
|
+
*/
|
|
903
|
+
declare class SkyRadioGroupHarness extends SkyComponentHarness {
|
|
904
|
+
#private;
|
|
905
|
+
/**
|
|
906
|
+
* @internal
|
|
907
|
+
*/
|
|
908
|
+
static hostSelector: string;
|
|
909
|
+
/**
|
|
910
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
911
|
+
* `SkyRadioGroupHarness` that meets certain criteria.
|
|
912
|
+
*/
|
|
913
|
+
static with(filters: SkyRadioGroupHarnessFilters): HarnessPredicate<SkyRadioGroupHarness>;
|
|
914
|
+
/**
|
|
915
|
+
* Clicks the help inline button.
|
|
916
|
+
*/
|
|
917
|
+
clickHelpInline(): Promise<void>;
|
|
918
|
+
/**
|
|
919
|
+
* Whether the heading is hidden.
|
|
920
|
+
*/
|
|
921
|
+
getHeadingHidden(): Promise<boolean>;
|
|
922
|
+
/**
|
|
923
|
+
* The semantic heading level used for the radio group. Returns undefined if heading level is not set.
|
|
924
|
+
*/
|
|
925
|
+
getHeadingLevel(): Promise<SkyRadioGroupHeadingLevel | undefined>;
|
|
926
|
+
/**
|
|
927
|
+
* The heading style used for the radio group.
|
|
928
|
+
*/
|
|
929
|
+
getHeadingStyle(): Promise<SkyRadioGroupHeadingStyle>;
|
|
930
|
+
/**
|
|
931
|
+
* Gets the radio group's heading text. If `headingHidden` is true,
|
|
932
|
+
* the text will still be returned.
|
|
933
|
+
*/
|
|
934
|
+
getHeadingText(): Promise<string | undefined>;
|
|
935
|
+
/**
|
|
936
|
+
* Gets the help popover content.
|
|
937
|
+
*/
|
|
938
|
+
getHelpPopoverContent(): Promise<string | undefined>;
|
|
939
|
+
/**
|
|
940
|
+
* Gets the help popover title.
|
|
941
|
+
*/
|
|
942
|
+
getHelpPopoverTitle(): Promise<string | undefined>;
|
|
943
|
+
/**
|
|
944
|
+
* Gets the radio group's hint text.
|
|
945
|
+
*/
|
|
946
|
+
getHintText(): Promise<string>;
|
|
947
|
+
/**
|
|
948
|
+
* Gets an array of harnesses for the radio buttons in the radio group.
|
|
949
|
+
*/
|
|
950
|
+
getRadioButtons(): Promise<SkyRadioHarness[]>;
|
|
951
|
+
/**
|
|
952
|
+
* Whether the radio group is required.
|
|
953
|
+
*/
|
|
954
|
+
getRequired(): Promise<boolean>;
|
|
955
|
+
/**
|
|
956
|
+
* Whether the radio group is stacked.
|
|
957
|
+
*/
|
|
958
|
+
getStacked(): Promise<boolean>;
|
|
959
|
+
/**
|
|
960
|
+
* Whether the radio group has errors.
|
|
961
|
+
*/
|
|
962
|
+
hasError(errorName: string): Promise<boolean>;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Harness for interacting with a radio label component in tests.
|
|
967
|
+
* @internal
|
|
968
|
+
*/
|
|
969
|
+
declare class SkyRadioLabelHarness extends ComponentHarness {
|
|
970
|
+
#private;
|
|
971
|
+
/**
|
|
972
|
+
* @internal
|
|
973
|
+
*/
|
|
974
|
+
static hostSelector: string;
|
|
975
|
+
/**
|
|
976
|
+
* Gets the text content of the radio label.
|
|
977
|
+
*/
|
|
978
|
+
getText(): Promise<string>;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* A set of criteria that can be used to filter a list of `SkySelectionBoxGridHarness` instances.
|
|
983
|
+
*/
|
|
984
|
+
interface SkySelectionBoxGridHarnessFilters extends SkyHarnessFilters {
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* A set of criteria that can be used to filter a list of `SkySelectionBoxHarness` instances.
|
|
989
|
+
*/
|
|
990
|
+
interface SkySelectionBoxHarnessFilters extends SkyHarnessFilters {
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* Harness to interact with a selection box component in tests.
|
|
995
|
+
*/
|
|
996
|
+
declare class SkySelectionBoxHarness extends SkyComponentHarness {
|
|
997
|
+
/**
|
|
998
|
+
* @internal
|
|
999
|
+
*/
|
|
1000
|
+
static hostSelector: string;
|
|
1001
|
+
/**
|
|
1002
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
1003
|
+
* `SkySelectionBoxHarness` that meets certain criteria.
|
|
1004
|
+
*/
|
|
1005
|
+
static with(filters: SkySelectionBoxHarnessFilters): HarnessPredicate<SkySelectionBoxHarness>;
|
|
1006
|
+
/**
|
|
1007
|
+
* Gets the checkbox or radio harness for the selection box form control.
|
|
1008
|
+
*/
|
|
1009
|
+
getControl(): Promise<SkyCheckboxHarness | SkyRadioHarness>;
|
|
1010
|
+
/**
|
|
1011
|
+
* Gets the selection box description text.
|
|
1012
|
+
*/
|
|
1013
|
+
getDescriptionText(): Promise<string>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Gets the selection box header text.
|
|
1016
|
+
*/
|
|
1017
|
+
getHeaderText(): Promise<string>;
|
|
1018
|
+
/**
|
|
1019
|
+
* Gets the selection box icon, if it exists.
|
|
1020
|
+
*/
|
|
1021
|
+
getIcon(): Promise<SkyIconHarness | null>;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* Harness for interacting with a selection box grid component in tests.
|
|
1026
|
+
*/
|
|
1027
|
+
declare class SkySelectionBoxGridHarness extends SkyComponentHarness {
|
|
1028
|
+
/**
|
|
1029
|
+
* @internal
|
|
1030
|
+
*/
|
|
1031
|
+
static hostSelector: string;
|
|
1032
|
+
/**
|
|
1033
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
1034
|
+
* `SkySelectionBoxGridHarness` that meets certain criteria.
|
|
1035
|
+
*/
|
|
1036
|
+
static with(filters: SkySelectionBoxGridHarnessFilters): HarnessPredicate<SkySelectionBoxGridHarness>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Gets a harness for a specific selection box that meets certain criteria.
|
|
1039
|
+
*/
|
|
1040
|
+
getSelectionBox(filter: SkySelectionBoxHarnessFilters): Promise<SkySelectionBoxHarness>;
|
|
1041
|
+
/**
|
|
1042
|
+
* Gets an array of selection boxes.
|
|
1043
|
+
*/
|
|
1044
|
+
getSelectionBoxes(filters?: SkySelectionBoxHarnessFilters): Promise<SkySelectionBoxHarness[]>;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* A set of criteria that can be used to filter a list of `SkyToggleSwitchHarness` instances.
|
|
1049
|
+
*/
|
|
1050
|
+
interface SkyToggleSwitchHarnessFilters extends SkyHarnessFilters {
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* Harness for interacting with a toggle switch component in tests.
|
|
1055
|
+
*/
|
|
1056
|
+
declare class SkyToggleSwitchHarness extends SkyComponentHarness {
|
|
1057
|
+
#private;
|
|
1058
|
+
/**
|
|
1059
|
+
* @internal
|
|
1060
|
+
*/
|
|
1061
|
+
static hostSelector: string;
|
|
1062
|
+
/**
|
|
1063
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
1064
|
+
* `SkyToggleSwitchHarness` that meets certain criteria.
|
|
1065
|
+
*/
|
|
1066
|
+
static with(filters: SkyToggleSwitchHarnessFilters): HarnessPredicate<SkyToggleSwitchHarness>;
|
|
1067
|
+
/**
|
|
1068
|
+
* Blurs the toggle switch.
|
|
1069
|
+
*/
|
|
1070
|
+
blur(): Promise<void>;
|
|
1071
|
+
/**
|
|
1072
|
+
* Clicks the help inline button.
|
|
1073
|
+
*/
|
|
1074
|
+
clickHelpInline(): Promise<void>;
|
|
1075
|
+
/**
|
|
1076
|
+
* Puts the toggle switch in a checked state.
|
|
1077
|
+
*/
|
|
1078
|
+
check(): Promise<void>;
|
|
1079
|
+
/**
|
|
1080
|
+
* Focuses the toggle switch.
|
|
1081
|
+
*/
|
|
1082
|
+
focus(): Promise<void>;
|
|
1083
|
+
/**
|
|
1084
|
+
* Gets the help popover content.
|
|
1085
|
+
*/
|
|
1086
|
+
getHelpPopoverContent(): Promise<string | undefined>;
|
|
1087
|
+
/**
|
|
1088
|
+
* Gets the help popover title.
|
|
1089
|
+
*/
|
|
1090
|
+
getHelpPopoverTitle(): Promise<string | undefined>;
|
|
1091
|
+
/**
|
|
1092
|
+
* Whether the label is hidden. Only supported when using the `labelText` input to set the label.
|
|
1093
|
+
*/
|
|
1094
|
+
getLabelHidden(): Promise<boolean>;
|
|
1095
|
+
/**
|
|
1096
|
+
* Gets the toggle switch's label text. If the label is set via `labelText` and `labelHidden` is true,
|
|
1097
|
+
* the text will still be returned.
|
|
1098
|
+
*/
|
|
1099
|
+
getLabelText(): Promise<string | undefined>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Whether the toggle switch is checked.
|
|
1102
|
+
*/
|
|
1103
|
+
isChecked(): Promise<boolean>;
|
|
1104
|
+
/**
|
|
1105
|
+
* Whether the toggle switch is disabled.
|
|
1106
|
+
*/
|
|
1107
|
+
isDisabled(): Promise<boolean>;
|
|
1108
|
+
/**
|
|
1109
|
+
* Whether the toggle switch is focused.
|
|
1110
|
+
*/
|
|
1111
|
+
isFocused(): Promise<boolean>;
|
|
1112
|
+
/**
|
|
1113
|
+
* Puts the toggle switch in an unchecked state.
|
|
1114
|
+
*/
|
|
1115
|
+
uncheck(): Promise<void>;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
export { SkyCharacterCounterIndicatorHarness, SkyCheckboxFixture, SkyCheckboxGroupHarness, SkyCheckboxHarness, SkyCheckboxLabelHarness, SkyFieldGroupHarness, SkyFileAttachmentHarness, SkyFileDropHarness, SkyFileItemHarness, SkyFormErrorHarness, SkyFormErrorsHarness, SkyInputBoxHarness, SkyRadioFixture, SkyRadioGroupHarness, SkyRadioHarness, SkyRadioLabelHarness, SkySelectionBoxGridHarness, SkySelectionBoxHarness, SkyToggleSwitchHarness, provideSkyFileAttachmentTesting };
|
|
1119
|
+
export type { SkyCharacterCounterIndicatorHarnessFilters, SkyCheckboxGroupHarnessFilters, SkyCheckboxHarnessFilters, SkyFieldGroupHarnessFilters, SkyFileAttachmentHarnessFilters, SkyFileDropHarnessFilters, SkyFileItemHarnessFilters, SkyFormErrorHarnessFilters, SkyFormErrorsHarnessFilters, SkyInputBoxHarnessFilters, SkyRadioGroupHarnessFilters, SkyRadioHarnessFilters, SkySelectionBoxGridHarnessFilters, SkySelectionBoxHarnessFilters, SkyToggleSwitchHarnessFilters };
|