@skyux/forms 11.22.0 → 11.23.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/documentation.json +2925 -1719
- package/esm2022/lib/modules/checkbox/checkbox-group.component.mjs +2 -2
- package/esm2022/lib/modules/field-group/field-group.component.mjs +2 -2
- package/esm2022/lib/modules/file-attachment/file-attachment/file-attachment.component.mjs +3 -5
- package/esm2022/lib/modules/input-box/input-box.component.mjs +2 -2
- package/esm2022/lib/modules/radio/radio-group.component.mjs +2 -2
- package/esm2022/lib/modules/radio/radio.component.mjs +2 -2
- package/esm2022/lib/modules/toggle-switch/toggle-switch.component.mjs +3 -7
- package/esm2022/testing/legacy/checkbox-fixture.mjs +92 -0
- package/esm2022/testing/legacy/radio-fixture.mjs +85 -0
- package/esm2022/testing/modules/character-counter/character-counter-indicator-harness-filters.mjs +2 -0
- package/esm2022/testing/modules/character-counter/character-counter-indicator-harness.mjs +53 -0
- package/esm2022/testing/modules/checkbox/checkbox-group-harness-filters.mjs +2 -0
- package/esm2022/testing/modules/checkbox/checkbox-group-harness.mjs +158 -0
- package/esm2022/testing/modules/checkbox/checkbox-harness-filters.mjs +2 -0
- package/esm2022/testing/modules/checkbox/checkbox-harness.mjs +196 -0
- package/esm2022/testing/modules/checkbox/checkbox-label-harness.mjs +19 -0
- package/esm2022/testing/modules/checkbox/checkbox-label-text-label.harness.mjs +19 -0
- package/esm2022/testing/modules/field-group/field-group-harness-filters.mjs +2 -0
- package/esm2022/testing/modules/field-group/field-group-harness.mjs +92 -0
- package/esm2022/testing/modules/file-attachment/file-drop/file-drop-harness-filters.mjs +2 -0
- package/esm2022/testing/modules/file-attachment/file-drop/file-drop-harness.mjs +45 -0
- package/esm2022/testing/modules/form-error/form-error-harness.filters.mjs +2 -0
- package/esm2022/testing/modules/form-error/form-error-harness.mjs +21 -0
- package/esm2022/testing/modules/form-error/form-errors-harness.filters.mjs +2 -0
- package/esm2022/testing/modules/form-error/form-errors-harness.mjs +34 -0
- package/esm2022/testing/modules/input-box/input-box-harness-filters.mjs +2 -0
- package/esm2022/testing/modules/input-box/input-box-harness.mjs +188 -0
- package/esm2022/testing/modules/radio/radio-group-harness-filters.mjs +2 -0
- package/esm2022/testing/modules/radio/radio-group-harness.mjs +156 -0
- package/esm2022/testing/modules/radio/radio-harness-filters.mjs +2 -0
- package/esm2022/testing/modules/radio/radio-harness.mjs +147 -0
- package/esm2022/testing/modules/radio/radio-label-harness.mjs +19 -0
- package/esm2022/testing/public-api.mjs +15 -14
- package/fesm2022/skyux-forms-testing.mjs +144 -54
- package/fesm2022/skyux-forms-testing.mjs.map +1 -1
- package/fesm2022/skyux-forms.mjs +14 -20
- package/fesm2022/skyux-forms.mjs.map +1 -1
- package/package.json +9 -9
- package/testing/{radio-fixture.d.ts → legacy/radio-fixture.d.ts} +1 -0
- package/testing/modules/field-group/field-group-harness-filters.d.ts +7 -0
- package/testing/modules/field-group/field-group-harness.d.ts +57 -0
- package/testing/public-api.d.ts +24 -22
- package/esm2022/testing/character-counter/character-counter-indicator-harness-filters.mjs +0 -2
- package/esm2022/testing/character-counter/character-counter-indicator-harness.mjs +0 -53
- package/esm2022/testing/checkbox/checkbox-group-harness-filters.mjs +0 -2
- package/esm2022/testing/checkbox/checkbox-group-harness.mjs +0 -158
- package/esm2022/testing/checkbox/checkbox-harness-filters.mjs +0 -2
- package/esm2022/testing/checkbox/checkbox-harness.mjs +0 -196
- package/esm2022/testing/checkbox/checkbox-label-harness.mjs +0 -19
- package/esm2022/testing/checkbox/checkbox-label-text-label.harness.mjs +0 -19
- package/esm2022/testing/checkbox-fixture.mjs +0 -92
- package/esm2022/testing/file-drop/file-drop-harness-filters.mjs +0 -2
- package/esm2022/testing/file-drop/file-drop-harness.mjs +0 -45
- package/esm2022/testing/form-error/form-error-harness.filters.mjs +0 -2
- package/esm2022/testing/form-error/form-error-harness.mjs +0 -21
- package/esm2022/testing/form-error/form-errors-harness.filters.mjs +0 -2
- package/esm2022/testing/form-error/form-errors-harness.mjs +0 -34
- package/esm2022/testing/input-box/input-box-harness-filters.mjs +0 -2
- package/esm2022/testing/input-box/input-box-harness.mjs +0 -188
- package/esm2022/testing/radio/radio-group-harness-filters.mjs +0 -2
- package/esm2022/testing/radio/radio-group-harness.mjs +0 -157
- package/esm2022/testing/radio/radio-harness-filters.mjs +0 -2
- package/esm2022/testing/radio/radio-harness.mjs +0 -147
- package/esm2022/testing/radio/radio-label-harness.mjs +0 -19
- package/esm2022/testing/radio-fixture.mjs +0 -84
- /package/testing/{checkbox-fixture.d.ts → legacy/checkbox-fixture.d.ts} +0 -0
- /package/testing/{character-counter → modules/character-counter}/character-counter-indicator-harness-filters.d.ts +0 -0
- /package/testing/{character-counter → modules/character-counter}/character-counter-indicator-harness.d.ts +0 -0
- /package/testing/{checkbox → modules/checkbox}/checkbox-group-harness-filters.d.ts +0 -0
- /package/testing/{checkbox → modules/checkbox}/checkbox-group-harness.d.ts +0 -0
- /package/testing/{checkbox → modules/checkbox}/checkbox-harness-filters.d.ts +0 -0
- /package/testing/{checkbox → modules/checkbox}/checkbox-harness.d.ts +0 -0
- /package/testing/{checkbox → modules/checkbox}/checkbox-label-harness.d.ts +0 -0
- /package/testing/{checkbox → modules/checkbox}/checkbox-label-text-label.harness.d.ts +0 -0
- /package/testing/{file-drop → modules/file-attachment/file-drop}/file-drop-harness-filters.d.ts +0 -0
- /package/testing/{file-drop → modules/file-attachment/file-drop}/file-drop-harness.d.ts +0 -0
- /package/testing/{form-error → modules/form-error}/form-error-harness.d.ts +0 -0
- /package/testing/{form-error → modules/form-error}/form-error-harness.filters.d.ts +0 -0
- /package/testing/{form-error → modules/form-error}/form-errors-harness.d.ts +0 -0
- /package/testing/{form-error → modules/form-error}/form-errors-harness.filters.d.ts +0 -0
- /package/testing/{input-box → modules/input-box}/input-box-harness-filters.d.ts +0 -0
- /package/testing/{input-box → modules/input-box}/input-box-harness.d.ts +0 -0
- /package/testing/{radio → modules/radio}/radio-group-harness-filters.d.ts +0 -0
- /package/testing/{radio → modules/radio}/radio-group-harness.d.ts +0 -0
- /package/testing/{radio → modules/radio}/radio-harness-filters.d.ts +0 -0
- /package/testing/{radio → modules/radio}/radio-harness.d.ts +0 -0
- /package/testing/{radio → modules/radio}/radio-label-harness.d.ts +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentHarness } from '@angular/cdk/testing';
|
|
2
|
+
/**
|
|
3
|
+
* Harness for interacting with a radio label component in tests.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export class SkyRadioLabelHarness extends ComponentHarness {
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
static { this.hostSelector = 'sky-radio-label'; }
|
|
11
|
+
#getLabelContent = this.locatorFor('.sky-switch-label');
|
|
12
|
+
/**
|
|
13
|
+
* Gets the text content of the radio label.
|
|
14
|
+
*/
|
|
15
|
+
async getText() {
|
|
16
|
+
return await (await this.#getLabelContent()).text();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaW8tbGFiZWwtaGFybmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9mb3Jtcy90ZXN0aW5nL3NyYy9tb2R1bGVzL3JhZGlvL3JhZGlvLWxhYmVsLWhhcm5lc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFFeEQ7OztHQUdHO0FBQ0gsTUFBTSxPQUFPLG9CQUFxQixTQUFRLGdCQUFnQjtJQUN4RDs7T0FFRzthQUNXLGlCQUFZLEdBQUcsaUJBQWlCLENBQUM7SUFFL0MsZ0JBQWdCLEdBQUcsSUFBSSxDQUFDLFVBQVUsQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDO0lBRXhEOztPQUVHO0lBQ0ksS0FBSyxDQUFDLE9BQU87UUFDbEIsT0FBTyxNQUFNLENBQUMsTUFBTSxJQUFJLENBQUMsZ0JBQWdCLEVBQUUsQ0FBQyxDQUFDLElBQUksRUFBRSxDQUFDO0lBQ3RELENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnRIYXJuZXNzIH0gZnJvbSAnQGFuZ3VsYXIvY2RrL3Rlc3RpbmcnO1xuXG4vKipcbiAqIEhhcm5lc3MgZm9yIGludGVyYWN0aW5nIHdpdGggYSByYWRpbyBsYWJlbCBjb21wb25lbnQgaW4gdGVzdHMuXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNsYXNzIFNreVJhZGlvTGFiZWxIYXJuZXNzIGV4dGVuZHMgQ29tcG9uZW50SGFybmVzcyB7XG4gIC8qKlxuICAgKiBAaW50ZXJuYWxcbiAgICovXG4gIHB1YmxpYyBzdGF0aWMgaG9zdFNlbGVjdG9yID0gJ3NreS1yYWRpby1sYWJlbCc7XG5cbiAgI2dldExhYmVsQ29udGVudCA9IHRoaXMubG9jYXRvckZvcignLnNreS1zd2l0Y2gtbGFiZWwnKTtcblxuICAvKipcbiAgICogR2V0cyB0aGUgdGV4dCBjb250ZW50IG9mIHRoZSByYWRpbyBsYWJlbC5cbiAgICovXG4gIHB1YmxpYyBhc3luYyBnZXRUZXh0KCk6IFByb21pc2U8c3RyaW5nPiB7XG4gICAgcmV0dXJuIGF3YWl0IChhd2FpdCB0aGlzLiNnZXRMYWJlbENvbnRlbnQoKSkudGV4dCgpO1xuICB9XG59XG4iXX0=
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export { SkyInputBoxHarness } from './input-box/input-box-harness';
|
|
2
|
-
export { SkyCharacterCounterIndicatorHarness } from './character-counter/character-counter-indicator-harness';
|
|
3
|
-
export { SkyCheckboxFixture } from './checkbox-fixture';
|
|
4
|
-
export { SkyCheckboxGroupHarness } from './checkbox/checkbox-group-harness';
|
|
5
|
-
export { SkyCheckboxHarness } from './checkbox/checkbox-harness';
|
|
6
|
-
export { SkyCheckboxLabelHarness } from './checkbox/checkbox-label-harness';
|
|
7
|
-
export { SkyFileDropHarness } from './file-drop/file-drop-harness';
|
|
8
|
-
export { SkyFormErrorsHarness } from './form-error/form-errors-harness';
|
|
9
|
-
export { SkyFormErrorHarness } from './form-error/form-error-harness';
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
|
|
1
|
+
export { SkyInputBoxHarness } from './modules/input-box/input-box-harness';
|
|
2
|
+
export { SkyCharacterCounterIndicatorHarness } from './modules/character-counter/character-counter-indicator-harness';
|
|
3
|
+
export { SkyCheckboxFixture } from './legacy/checkbox-fixture';
|
|
4
|
+
export { SkyCheckboxGroupHarness } from './modules/checkbox/checkbox-group-harness';
|
|
5
|
+
export { SkyCheckboxHarness } from './modules/checkbox/checkbox-harness';
|
|
6
|
+
export { SkyCheckboxLabelHarness } from './modules/checkbox/checkbox-label-harness';
|
|
7
|
+
export { SkyFileDropHarness } from './modules/file-attachment/file-drop/file-drop-harness';
|
|
8
|
+
export { SkyFormErrorsHarness } from './modules/form-error/form-errors-harness';
|
|
9
|
+
export { SkyFormErrorHarness } from './modules/form-error/form-error-harness';
|
|
10
|
+
export { SkyFieldGroupHarness } from './modules/field-group/field-group-harness';
|
|
11
|
+
export { SkyRadioFixture } from './legacy/radio-fixture';
|
|
12
|
+
export { SkyRadioGroupHarness } from './modules/radio/radio-group-harness';
|
|
13
|
+
export { SkyRadioHarness } from './modules/radio/radio-harness';
|
|
14
|
+
export { SkyRadioLabelHarness } from './modules/radio/radio-label-harness';
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3Qi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WVsZC1ncm91cC9maWVsZC1ncm91cC1oYXJuZXNzLWZpbHRlcnMnO1xuXG5leHBvcnQgeyBTa3lSYWRpb0ZpeHR1cmUgfSBmcm9tICcuL2xlZ2FjeS9yYWRpby1maXh0dXJlJztcbmV4cG9ydCB7IFNreVJhZGlvR3JvdXBIYXJuZXNzIH0gZnJvbSAnLi9tb2R1bGVzL3JhZGlvL3JhZGlvLWdyb3VwLWhhcm5lc3MnO1xuZXhwb3J0IHsgU2t5UmFkaW9Hcm91cEhhcm5lc3NGaWx0ZXJzIH0gZnJvbSAnLi9tb2R1bGVzL3JhZGlvL3JhZGlvLWdyb3VwLWhhcm5lc3MtZmlsdGVycyc7XG5leHBvcnQgeyBTa3lSYWRpb0hhcm5lc3MgfSBmcm9tICcuL21vZHVsZXMvcmFkaW8vcmFkaW8taGFybmVzcyc7XG5leHBvcnQgeyBTa3lSYWRpb0hhcm5lc3NGaWx0ZXJzIH0gZnJvbSAnLi9tb2R1bGVzL3JhZGlvL3JhZGlvLWhhcm5lc3MtZmlsdGVycyc7XG5leHBvcnQgeyBTa3lSYWRpb0xhYmVsSGFybmVzcyB9IGZyb20gJy4vbW9kdWxlcy9yYWRpby9yYWRpby1sYWJlbC1oYXJuZXNzJztcbiJdfQ==
|
|
@@ -39,7 +39,7 @@ class SkyCharacterCounterIndicatorHarness extends SkyComponentHarness {
|
|
|
39
39
|
* count is greater than the limit.
|
|
40
40
|
*/
|
|
41
41
|
async isOverLimit() {
|
|
42
|
-
return (await this.#getLabel()).hasClass('sky-error-label');
|
|
42
|
+
return await (await this.#getLabel()).hasClass('sky-error-label');
|
|
43
43
|
}
|
|
44
44
|
async #getLabelParts() {
|
|
45
45
|
const label = await this.#getLabel();
|
|
@@ -74,7 +74,7 @@ class SkyFormErrorHarness extends SkyComponentHarness {
|
|
|
74
74
|
* Gets the error name.
|
|
75
75
|
*/
|
|
76
76
|
async getErrorName() {
|
|
77
|
-
return (await this.host()).getAttribute('errorName');
|
|
77
|
+
return await (await this.host()).getAttribute('errorName');
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -95,7 +95,7 @@ class SkyFormErrorsHarness extends SkyComponentHarness {
|
|
|
95
95
|
*/
|
|
96
96
|
async getFormErrors() {
|
|
97
97
|
const formErrorHarnesses = await this.locatorForAll(SkyFormErrorHarness.with({}))();
|
|
98
|
-
return Promise.all(formErrorHarnesses.map(async (formError) => {
|
|
98
|
+
return await Promise.all(formErrorHarnesses.map(async (formError) => {
|
|
99
99
|
return { errorName: await formError.getErrorName() };
|
|
100
100
|
}));
|
|
101
101
|
}
|
|
@@ -122,7 +122,7 @@ class SkyInputBoxHarness extends SkyQueryableComponentHarness {
|
|
|
122
122
|
#getLabel = this.locatorForOptional('.sky-control-label');
|
|
123
123
|
#getWrapper = this.locatorFor('.sky-input-box');
|
|
124
124
|
async #getFormError() {
|
|
125
|
-
return this.locatorFor(SkyFormErrorsHarness)();
|
|
125
|
+
return await this.locatorFor(SkyFormErrorsHarness)();
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
128
|
* Gets a `HarnessPredicate` that can be used to search for a
|
|
@@ -176,62 +176,62 @@ class SkyInputBoxHarness extends SkyQueryableComponentHarness {
|
|
|
176
176
|
* Whether the field has more characters than allowed.
|
|
177
177
|
*/
|
|
178
178
|
async hasMaxLengthError() {
|
|
179
|
-
return (await this.#getFormError()).hasError('maxlength');
|
|
179
|
+
return await (await this.#getFormError()).hasError('maxlength');
|
|
180
180
|
}
|
|
181
181
|
/**
|
|
182
182
|
* Whether the field has fewer characters than allowed.
|
|
183
183
|
*/
|
|
184
184
|
async hasMinLengthError() {
|
|
185
|
-
return (await this.#getFormError()).hasError('minlength');
|
|
185
|
+
return await (await this.#getFormError()).hasError('minlength');
|
|
186
186
|
}
|
|
187
187
|
/**
|
|
188
188
|
* Whether the field is set to an invalid email address.
|
|
189
189
|
*/
|
|
190
190
|
async hasEmailError() {
|
|
191
|
-
return (await this.#getFormError()).hasError('email');
|
|
191
|
+
return await (await this.#getFormError()).hasError('email');
|
|
192
192
|
}
|
|
193
193
|
/**
|
|
194
194
|
* Whether the field is set to an invalid URL.
|
|
195
195
|
*/
|
|
196
196
|
async hasUrlError() {
|
|
197
|
-
return (await this.#getFormError()).hasError('url');
|
|
197
|
+
return await (await this.#getFormError()).hasError('url');
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
200
|
* Whether the field is set to an invalid date.
|
|
201
201
|
*/
|
|
202
202
|
async hasInvalidDateError() {
|
|
203
|
-
return (await this.#getFormError()).hasError('invalidDate');
|
|
203
|
+
return await (await this.#getFormError()).hasError('invalidDate');
|
|
204
204
|
}
|
|
205
205
|
/**
|
|
206
206
|
* Whether the field is set to an invalid minimum date.
|
|
207
207
|
*/
|
|
208
208
|
async hasMinDateError() {
|
|
209
|
-
return (await this.#getFormError()).hasError('minDate');
|
|
209
|
+
return await (await this.#getFormError()).hasError('minDate');
|
|
210
210
|
}
|
|
211
211
|
/**
|
|
212
212
|
* Whether the field is set to an invalid maximum date.
|
|
213
213
|
*/
|
|
214
214
|
async hasMaxDateError() {
|
|
215
|
-
return (await this.#getFormError()).hasError('maxDate');
|
|
215
|
+
return await (await this.#getFormError()).hasError('maxDate');
|
|
216
216
|
}
|
|
217
217
|
/**
|
|
218
218
|
* Whether the field is set to an invalid phone number.
|
|
219
219
|
*/
|
|
220
220
|
async hasPhoneFieldError() {
|
|
221
|
-
return (await this.#getFormError()).hasError('phone');
|
|
221
|
+
return await (await this.#getFormError()).hasError('phone');
|
|
222
222
|
}
|
|
223
223
|
/**
|
|
224
224
|
* Whether the field is set to an invalid time.
|
|
225
225
|
*/
|
|
226
226
|
async hasTimeError() {
|
|
227
|
-
return (await this.#getFormError()).hasError('time');
|
|
227
|
+
return await (await this.#getFormError()).hasError('time');
|
|
228
228
|
}
|
|
229
229
|
/**
|
|
230
230
|
* Indicates whether the input box has disabled styles applied.
|
|
231
231
|
*/
|
|
232
232
|
async getDisabled() {
|
|
233
233
|
const wrapper = await this.#getWrapper();
|
|
234
|
-
return wrapper.hasClass('sky-input-box-disabled');
|
|
234
|
+
return await wrapper.hasClass('sky-input-box-disabled');
|
|
235
235
|
}
|
|
236
236
|
/**
|
|
237
237
|
* Gets the text for the input box label.
|
|
@@ -270,14 +270,14 @@ class SkyInputBoxHarness extends SkyQueryableComponentHarness {
|
|
|
270
270
|
*/
|
|
271
271
|
async getHintText() {
|
|
272
272
|
const hintText = await this.#getHintText();
|
|
273
|
-
return this.#getElementTextOrDefault(hintText);
|
|
273
|
+
return await this.#getElementTextOrDefault(hintText);
|
|
274
274
|
}
|
|
275
275
|
/**
|
|
276
276
|
* Indicates whether the input box has stacked styles applied.
|
|
277
277
|
*/
|
|
278
278
|
async getStacked() {
|
|
279
279
|
const host = await this.host();
|
|
280
|
-
return host.hasClass('sky-form-field-stacked');
|
|
280
|
+
return await host.hasClass('sky-form-field-stacked');
|
|
281
281
|
}
|
|
282
282
|
async #getElementTextOrDefault(el) {
|
|
283
283
|
return (await el?.text())?.trim() ?? '';
|
|
@@ -395,7 +395,7 @@ class SkyCheckboxLabelHarness extends ComponentHarness {
|
|
|
395
395
|
* Gets the text content of the checkbox label.
|
|
396
396
|
*/
|
|
397
397
|
async getText() {
|
|
398
|
-
return (await this.#getLabelContent()).text();
|
|
398
|
+
return await (await this.#getLabelContent()).text();
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
|
|
@@ -413,7 +413,7 @@ class SkyCheckboxLabelTextLabelHarness extends ComponentHarness {
|
|
|
413
413
|
* Gets the text content of the `labelText` checkbox label.
|
|
414
414
|
*/
|
|
415
415
|
async getText() {
|
|
416
|
-
return (await this.#getLabelContent())?.text();
|
|
416
|
+
return await (await this.#getLabelContent())?.text();
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
419
|
|
|
@@ -440,13 +440,13 @@ class SkyCheckboxHarness extends SkyComponentHarness {
|
|
|
440
440
|
* Blurs the checkbox.
|
|
441
441
|
*/
|
|
442
442
|
async blur() {
|
|
443
|
-
|
|
443
|
+
await (await this.#getInput()).blur();
|
|
444
444
|
}
|
|
445
445
|
/**
|
|
446
446
|
* Clicks the help inline button.
|
|
447
447
|
*/
|
|
448
448
|
async clickHelpInline() {
|
|
449
|
-
|
|
449
|
+
await (await this.#getHelpInline()).click();
|
|
450
450
|
}
|
|
451
451
|
/**
|
|
452
452
|
* Puts the checkbox in a checked state by toggling it if it is currently unchecked, or doing nothing if it is already checked.
|
|
@@ -460,19 +460,19 @@ class SkyCheckboxHarness extends SkyComponentHarness {
|
|
|
460
460
|
* Focuses the checkbox.
|
|
461
461
|
*/
|
|
462
462
|
async focus() {
|
|
463
|
-
|
|
463
|
+
await (await this.#getInput()).focus();
|
|
464
464
|
}
|
|
465
465
|
/**
|
|
466
466
|
* Gets the checkbox's aria-label.
|
|
467
467
|
*/
|
|
468
468
|
async getAriaLabel() {
|
|
469
|
-
return (await this.#getInput()).getAttribute('aria-label');
|
|
469
|
+
return await (await this.#getInput()).getAttribute('aria-label');
|
|
470
470
|
}
|
|
471
471
|
/**
|
|
472
472
|
* Gets the checkbox's aria-labelledby.
|
|
473
473
|
*/
|
|
474
474
|
async getAriaLabelledby() {
|
|
475
|
-
return (await this.#getInput()).getAttribute('aria-labelledby');
|
|
475
|
+
return await (await this.#getInput()).getAttribute('aria-labelledby');
|
|
476
476
|
}
|
|
477
477
|
/**
|
|
478
478
|
* Gets the help popover content.
|
|
@@ -501,7 +501,7 @@ class SkyCheckboxHarness extends SkyComponentHarness {
|
|
|
501
501
|
return text || ariaLabel;
|
|
502
502
|
}
|
|
503
503
|
else {
|
|
504
|
-
return label?.getText();
|
|
504
|
+
return await label?.getText();
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
/**
|
|
@@ -528,31 +528,31 @@ class SkyCheckboxHarness extends SkyComponentHarness {
|
|
|
528
528
|
* Gets the checkbox's name.
|
|
529
529
|
*/
|
|
530
530
|
async getName() {
|
|
531
|
-
return (await this.#getInput()).getAttribute('name');
|
|
531
|
+
return await (await this.#getInput()).getAttribute('name');
|
|
532
532
|
}
|
|
533
533
|
/**
|
|
534
534
|
* Gets the checkbox's value.
|
|
535
535
|
*/
|
|
536
536
|
async getValue() {
|
|
537
|
-
return (await this.#getInput()).getProperty('value');
|
|
537
|
+
return await (await this.#getInput()).getProperty('value');
|
|
538
538
|
}
|
|
539
539
|
/**
|
|
540
540
|
* Whether the checkbox displays custom error.
|
|
541
541
|
*/
|
|
542
542
|
async hasCustomError(errorName) {
|
|
543
|
-
return (await this.#getFormErrors()).hasError(errorName);
|
|
543
|
+
return await (await this.#getFormErrors()).hasError(errorName);
|
|
544
544
|
}
|
|
545
545
|
/**
|
|
546
546
|
* Whether the checkbox displays an error that it is required.
|
|
547
547
|
*/
|
|
548
548
|
async hasRequiredError() {
|
|
549
|
-
return (await this.#getFormErrors()).hasError('required');
|
|
549
|
+
return await (await this.#getFormErrors()).hasError('required');
|
|
550
550
|
}
|
|
551
551
|
/**
|
|
552
552
|
* Whether the checkbox is checked.
|
|
553
553
|
*/
|
|
554
554
|
async isChecked() {
|
|
555
|
-
return (await this.#getInput()).getProperty('checked');
|
|
555
|
+
return await (await this.#getInput()).getProperty('checked');
|
|
556
556
|
}
|
|
557
557
|
/**
|
|
558
558
|
* Whether the checkbox is disabled.
|
|
@@ -565,7 +565,7 @@ class SkyCheckboxHarness extends SkyComponentHarness {
|
|
|
565
565
|
* Whether the checkbox is focused.
|
|
566
566
|
*/
|
|
567
567
|
async isFocused() {
|
|
568
|
-
return (await this.#getInput()).isFocused();
|
|
568
|
+
return await (await this.#getInput()).isFocused();
|
|
569
569
|
}
|
|
570
570
|
/**
|
|
571
571
|
* Whether the checkbox is required.
|
|
@@ -636,7 +636,7 @@ class SkyCheckboxGroupHarness extends SkyComponentHarness {
|
|
|
636
636
|
* Clicks the help inline button.
|
|
637
637
|
*/
|
|
638
638
|
async clickHelpInline() {
|
|
639
|
-
|
|
639
|
+
await (await this.#getHelpInline()).click();
|
|
640
640
|
}
|
|
641
641
|
/**
|
|
642
642
|
* Gets an array of harnesses for the checkboxes in the checkbox group.
|
|
@@ -662,7 +662,7 @@ class SkyCheckboxGroupHarness extends SkyComponentHarness {
|
|
|
662
662
|
* the text will still be returned.
|
|
663
663
|
*/
|
|
664
664
|
async getHeadingText() {
|
|
665
|
-
return (await this.#getLegendHeading()).text();
|
|
665
|
+
return await (await this.#getLegendHeading()).text();
|
|
666
666
|
}
|
|
667
667
|
/**
|
|
668
668
|
* Gets the checkbox group's hint text.
|
|
@@ -675,7 +675,7 @@ class SkyCheckboxGroupHarness extends SkyComponentHarness {
|
|
|
675
675
|
* Whether the heading is hidden.
|
|
676
676
|
*/
|
|
677
677
|
async getHeadingHidden() {
|
|
678
|
-
return (await this.#getHeadingWrapper()).hasClass('sky-screen-reader-only');
|
|
678
|
+
return await (await this.#getHeadingWrapper()).hasClass('sky-screen-reader-only');
|
|
679
679
|
}
|
|
680
680
|
/**
|
|
681
681
|
* The semantic heading level used for the checkbox group. Returns undefined if heading level is not set.
|
|
@@ -738,13 +738,13 @@ class SkyCheckboxGroupHarness extends SkyComponentHarness {
|
|
|
738
738
|
* Whether all the checkboxes in a required group are unchecked.
|
|
739
739
|
*/
|
|
740
740
|
async hasRequiredError() {
|
|
741
|
-
return (await this.#getFormErrors()).hasError('required');
|
|
741
|
+
return await (await this.#getFormErrors()).hasError('required');
|
|
742
742
|
}
|
|
743
743
|
/**
|
|
744
744
|
* Whether the checkbox group has errors.
|
|
745
745
|
*/
|
|
746
746
|
async hasError(errorName) {
|
|
747
|
-
return (await this.#getFormErrors()).hasError(errorName);
|
|
747
|
+
return await (await this.#getFormErrors()).hasError(errorName);
|
|
748
748
|
}
|
|
749
749
|
async #getFormErrors() {
|
|
750
750
|
return await this.locatorFor(SkyFormErrorsHarness.with({
|
|
@@ -783,7 +783,7 @@ class SkyFileDropHarness extends SkyComponentHarness {
|
|
|
783
783
|
* Drops a file onto the component's drop target.
|
|
784
784
|
*/
|
|
785
785
|
async dropFile(file) {
|
|
786
|
-
|
|
786
|
+
await this.#dropFiles([file]);
|
|
787
787
|
}
|
|
788
788
|
// Consider making this public when we finalize this harness's public API.
|
|
789
789
|
async #dropFiles(files) {
|
|
@@ -800,14 +800,105 @@ class SkyFileDropHarness extends SkyComponentHarness {
|
|
|
800
800
|
// The file drop component's `filesChanged` event happens asynchronously as the
|
|
801
801
|
// result of an event handler which is outside of the test harness async logic,
|
|
802
802
|
// so get in the queue after the event handler, then resolve.
|
|
803
|
-
return new Promise((resolve) => {
|
|
803
|
+
return await new Promise((resolve) => {
|
|
804
804
|
setTimeout(() => resolve(), 100);
|
|
805
805
|
});
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
808
|
|
|
809
|
+
/**
|
|
810
|
+
* Harness for interacting with a field group component in tests.
|
|
811
|
+
*/
|
|
812
|
+
class SkyFieldGroupHarness extends SkyComponentHarness {
|
|
813
|
+
/**
|
|
814
|
+
* @internal
|
|
815
|
+
*/
|
|
816
|
+
static { this.hostSelector = 'sky-field-group'; }
|
|
817
|
+
#getLegend = this.locatorFor('legend');
|
|
818
|
+
#getLegendH3 = this.locatorForOptional('legend h3');
|
|
819
|
+
#getLegendH4 = this.locatorForOptional('legend h4');
|
|
820
|
+
#getLegendHeading = this.locatorFor('legend h3,h4');
|
|
821
|
+
#getHintText = this.locatorForOptional('.sky-field-group-hint-text');
|
|
822
|
+
/**
|
|
823
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
824
|
+
* `SkyFieldGroupHarness` that meets certain criteria.
|
|
825
|
+
*/
|
|
826
|
+
static with(filters) {
|
|
827
|
+
return SkyFieldGroupHarness.getDataSkyIdPredicate(filters);
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Gets the field group's heading text. If `headingHidden` is true,
|
|
831
|
+
* the text will still be returned.
|
|
832
|
+
*/
|
|
833
|
+
async getHeadingText() {
|
|
834
|
+
return await (await this.#getLegendHeading()).text();
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Gets the field group's hint text.
|
|
838
|
+
*/
|
|
839
|
+
async getHintText() {
|
|
840
|
+
const hintText = await this.#getHintText();
|
|
841
|
+
return (await hintText?.text())?.trim() ?? '';
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* Whether the heading is hidden.
|
|
845
|
+
*/
|
|
846
|
+
async getHeadingHidden() {
|
|
847
|
+
return await (await this.#getLegend()).hasClass('sky-screen-reader-only');
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* Whether the field group is stacked.
|
|
851
|
+
*/
|
|
852
|
+
async getStacked() {
|
|
853
|
+
const host = await this.host();
|
|
854
|
+
return await host.hasClass('sky-margin-stacked-xl');
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* The semantic heading level used for the field group.
|
|
858
|
+
*/
|
|
859
|
+
async getHeadingLevel() {
|
|
860
|
+
const h3 = await this.#getLegendH3();
|
|
861
|
+
return h3 ? 3 : 4;
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* The heading style used for the field group.
|
|
865
|
+
*/
|
|
866
|
+
async getHeadingStyle() {
|
|
867
|
+
const heading = (await this.#getLegendH3()) || (await this.#getLegendH4());
|
|
868
|
+
return (await heading?.hasClass('sky-font-heading-3')) ? 3 : 4;
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* Clicks the help inline button.
|
|
872
|
+
*/
|
|
873
|
+
async clickHelpInline() {
|
|
874
|
+
await (await this.#getHelpInline()).click();
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Gets the help popover content.
|
|
878
|
+
*/
|
|
879
|
+
async getHelpPopoverContent() {
|
|
880
|
+
return await (await this.#getHelpInline()).getPopoverContent();
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Gets the help popover title.
|
|
884
|
+
*/
|
|
885
|
+
async getHelpPopoverTitle() {
|
|
886
|
+
return await (await this.#getHelpInline()).getPopoverTitle();
|
|
887
|
+
}
|
|
888
|
+
async #getHelpInline() {
|
|
889
|
+
const harness = await this.locatorForOptional(SkyHelpInlineHarness.with({
|
|
890
|
+
ancestor: '.sky-field-group > .sky-field-group-legend',
|
|
891
|
+
}))();
|
|
892
|
+
if (harness) {
|
|
893
|
+
return harness;
|
|
894
|
+
}
|
|
895
|
+
throw Error('No help inline found.');
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
|
|
809
899
|
/**
|
|
810
900
|
* Allows interaction with a SKY UX radio buttons within a radio group.
|
|
901
|
+
* @deprecated Use `SkyRadioHarness` instead.
|
|
811
902
|
* @internal
|
|
812
903
|
*/
|
|
813
904
|
class SkyRadioFixture {
|
|
@@ -902,7 +993,7 @@ class SkyRadioLabelHarness extends ComponentHarness {
|
|
|
902
993
|
* Gets the text content of the radio label.
|
|
903
994
|
*/
|
|
904
995
|
async getText() {
|
|
905
|
-
return (await this.#getLabelContent()).text();
|
|
996
|
+
return await (await this.#getLabelContent()).text();
|
|
906
997
|
}
|
|
907
998
|
}
|
|
908
999
|
|
|
@@ -929,7 +1020,7 @@ class SkyRadioHarness extends SkyComponentHarness {
|
|
|
929
1020
|
* Blurs the radio button.
|
|
930
1021
|
*/
|
|
931
1022
|
async blur() {
|
|
932
|
-
|
|
1023
|
+
await (await this.#getInput()).blur();
|
|
933
1024
|
}
|
|
934
1025
|
/**
|
|
935
1026
|
* Puts the radio button in a checked state if it is currently unchecked.
|
|
@@ -946,25 +1037,25 @@ class SkyRadioHarness extends SkyComponentHarness {
|
|
|
946
1037
|
* Clicks the help inline button.
|
|
947
1038
|
*/
|
|
948
1039
|
async clickHelpInline() {
|
|
949
|
-
|
|
1040
|
+
await (await this.#getHelpInline()).click();
|
|
950
1041
|
}
|
|
951
1042
|
/**
|
|
952
1043
|
* Focuses the radio button.
|
|
953
1044
|
*/
|
|
954
1045
|
async focus() {
|
|
955
|
-
|
|
1046
|
+
await (await this.#getInput()).focus();
|
|
956
1047
|
}
|
|
957
1048
|
/**
|
|
958
1049
|
* Gets the radio button's aria-label.
|
|
959
1050
|
*/
|
|
960
1051
|
async getAriaLabel() {
|
|
961
|
-
return (await this.#getInput()).getAttribute('aria-label');
|
|
1052
|
+
return await (await this.#getInput()).getAttribute('aria-label');
|
|
962
1053
|
}
|
|
963
1054
|
/**
|
|
964
1055
|
* Gets the radio button's aria-labelledby.
|
|
965
1056
|
*/
|
|
966
1057
|
async getAriaLabelledby() {
|
|
967
|
-
return (await this.#getInput()).getAttribute('aria-labelledby');
|
|
1058
|
+
return await (await this.#getInput()).getAttribute('aria-labelledby');
|
|
968
1059
|
}
|
|
969
1060
|
/**
|
|
970
1061
|
* Gets the help popover content.
|
|
@@ -1010,23 +1101,23 @@ class SkyRadioHarness extends SkyComponentHarness {
|
|
|
1010
1101
|
async getLabelText() {
|
|
1011
1102
|
const labelText = await this.#getLabelText();
|
|
1012
1103
|
if (labelText) {
|
|
1013
|
-
return labelText.text();
|
|
1104
|
+
return await labelText.text();
|
|
1014
1105
|
}
|
|
1015
1106
|
else {
|
|
1016
|
-
return (await this.#getLabel())?.getText();
|
|
1107
|
+
return await (await this.#getLabel())?.getText();
|
|
1017
1108
|
}
|
|
1018
1109
|
}
|
|
1019
1110
|
/**
|
|
1020
1111
|
* Gets the radio button's name.
|
|
1021
1112
|
*/
|
|
1022
1113
|
async getName() {
|
|
1023
|
-
return (await this.#getInput()).getAttribute('name');
|
|
1114
|
+
return await (await this.#getInput()).getAttribute('name');
|
|
1024
1115
|
}
|
|
1025
1116
|
/**
|
|
1026
1117
|
* Whether the radio button is checked.
|
|
1027
1118
|
*/
|
|
1028
1119
|
async isChecked() {
|
|
1029
|
-
return (await this.#getInput()).getProperty('checked');
|
|
1120
|
+
return await (await this.#getInput()).getProperty('checked');
|
|
1030
1121
|
}
|
|
1031
1122
|
/**
|
|
1032
1123
|
* Whether the radio button is disabled.
|
|
@@ -1039,7 +1130,7 @@ class SkyRadioHarness extends SkyComponentHarness {
|
|
|
1039
1130
|
* Whether the radio button is focused.
|
|
1040
1131
|
*/
|
|
1041
1132
|
async isFocused() {
|
|
1042
|
-
return (await this.#getInput()).isFocused();
|
|
1133
|
+
return await (await this.#getInput()).isFocused();
|
|
1043
1134
|
}
|
|
1044
1135
|
async #getHelpInline() {
|
|
1045
1136
|
const harness = await this.locatorForOptional(SkyHelpInlineHarness)();
|
|
@@ -1078,14 +1169,13 @@ class SkyRadioGroupHarness extends SkyComponentHarness {
|
|
|
1078
1169
|
* Clicks the help inline button.
|
|
1079
1170
|
*/
|
|
1080
1171
|
async clickHelpInline() {
|
|
1081
|
-
|
|
1172
|
+
await (await this.#getHelpInline()).click();
|
|
1082
1173
|
}
|
|
1083
1174
|
/**
|
|
1084
1175
|
* Whether the heading is hidden.
|
|
1085
1176
|
*/
|
|
1086
1177
|
async getHeadingHidden() {
|
|
1087
|
-
return ((await this.#getHeadingWrapper())?.hasClass('sky-screen-reader-only') ??
|
|
1088
|
-
true);
|
|
1178
|
+
return await ((await this.#getHeadingWrapper())?.hasClass('sky-screen-reader-only') ?? true);
|
|
1089
1179
|
}
|
|
1090
1180
|
/**
|
|
1091
1181
|
* The semantic heading level used for the radio group. Returns undefined if heading level is not set.
|
|
@@ -1132,7 +1222,7 @@ class SkyRadioGroupHarness extends SkyComponentHarness {
|
|
|
1132
1222
|
* the text will still be returned.
|
|
1133
1223
|
*/
|
|
1134
1224
|
async getHeadingText() {
|
|
1135
|
-
return (await this.#getLegendHeading())?.text() ?? '';
|
|
1225
|
+
return await ((await this.#getLegendHeading())?.text() ?? '');
|
|
1136
1226
|
}
|
|
1137
1227
|
/**
|
|
1138
1228
|
* Gets the help popover content.
|
|
@@ -1187,7 +1277,7 @@ class SkyRadioGroupHarness extends SkyComponentHarness {
|
|
|
1187
1277
|
* Whether the radio group has errors.
|
|
1188
1278
|
*/
|
|
1189
1279
|
async hasError(errorName) {
|
|
1190
|
-
return (await this.#getFormErrors()).hasError(errorName);
|
|
1280
|
+
return await (await this.#getFormErrors()).hasError(errorName);
|
|
1191
1281
|
}
|
|
1192
1282
|
async #getFormErrors() {
|
|
1193
1283
|
return await this.locatorFor(SkyFormErrorsHarness)();
|
|
@@ -1207,5 +1297,5 @@ class SkyRadioGroupHarness extends SkyComponentHarness {
|
|
|
1207
1297
|
* Generated bundle index. Do not edit.
|
|
1208
1298
|
*/
|
|
1209
1299
|
|
|
1210
|
-
export { SkyCharacterCounterIndicatorHarness, SkyCheckboxFixture, SkyCheckboxGroupHarness, SkyCheckboxHarness, SkyCheckboxLabelHarness, SkyFileDropHarness, SkyFormErrorHarness, SkyFormErrorsHarness, SkyInputBoxHarness, SkyRadioFixture, SkyRadioGroupHarness, SkyRadioHarness, SkyRadioLabelHarness };
|
|
1300
|
+
export { SkyCharacterCounterIndicatorHarness, SkyCheckboxFixture, SkyCheckboxGroupHarness, SkyCheckboxHarness, SkyCheckboxLabelHarness, SkyFieldGroupHarness, SkyFileDropHarness, SkyFormErrorHarness, SkyFormErrorsHarness, SkyInputBoxHarness, SkyRadioFixture, SkyRadioGroupHarness, SkyRadioHarness, SkyRadioLabelHarness };
|
|
1211
1301
|
//# sourceMappingURL=skyux-forms-testing.mjs.map
|