@skyux/forms 13.7.2 → 13.8.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.
|
@@ -72,7 +72,10 @@ class SkyFormErrorHarness extends SkyComponentHarness {
|
|
|
72
72
|
* `SkyFormErrorHarness` that meets certain criteria
|
|
73
73
|
*/
|
|
74
74
|
static with(filters) {
|
|
75
|
-
return SkyFormErrorHarness.getDataSkyIdPredicate(filters)
|
|
75
|
+
return SkyFormErrorHarness.getDataSkyIdPredicate(filters).addOption('errorName', filters.errorName, async (harness, errorName) => {
|
|
76
|
+
const harnessErrorName = await harness.getErrorName();
|
|
77
|
+
return await HarnessPredicate.stringMatches(harnessErrorName, errorName);
|
|
78
|
+
});
|
|
76
79
|
}
|
|
77
80
|
/**
|
|
78
81
|
* Gets the error name.
|
|
@@ -171,7 +174,13 @@ class SkyInputBoxHarness extends SkyQueryableComponentHarness {
|
|
|
171
174
|
return errors;
|
|
172
175
|
}
|
|
173
176
|
/**
|
|
174
|
-
*
|
|
177
|
+
* Gets the custom form error.
|
|
178
|
+
*/
|
|
179
|
+
async getCustomFormError(errorName) {
|
|
180
|
+
return await this.locatorFor(SkyFormErrorHarness.with({ errorName: errorName }))();
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Whether the custom form error is triggered.
|
|
175
184
|
*/
|
|
176
185
|
async hasCustomFormError(errorName) {
|
|
177
186
|
return await (await this.#getFormError()).hasError(errorName);
|
|
@@ -858,6 +867,12 @@ class SkyFileAttachmentHarness extends SkyComponentHarness {
|
|
|
858
867
|
async getAcceptedTypes() {
|
|
859
868
|
return await (await this.#input()).getAttribute('accept');
|
|
860
869
|
}
|
|
870
|
+
/**
|
|
871
|
+
* Gets the custom form error.
|
|
872
|
+
*/
|
|
873
|
+
async getCustomError(errorName) {
|
|
874
|
+
return await this.locatorFor(SkyFormErrorHarness.with({ errorName: errorName }))();
|
|
875
|
+
}
|
|
861
876
|
/**
|
|
862
877
|
* Gets the help inline popover content.
|
|
863
878
|
*/
|
|
@@ -1073,6 +1088,12 @@ class SkyFileDropHarness extends SkyComponentHarness {
|
|
|
1073
1088
|
async getAcceptedTypes() {
|
|
1074
1089
|
return await (await this.#input()).getAttribute('accept');
|
|
1075
1090
|
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Gets the custom form error.
|
|
1093
|
+
*/
|
|
1094
|
+
async getCustomError(errorName) {
|
|
1095
|
+
return await this.locatorFor(SkyFormErrorHarness.with({ errorName: errorName }))();
|
|
1096
|
+
}
|
|
1076
1097
|
/**
|
|
1077
1098
|
* Gets the aria-label for the file upload button.
|
|
1078
1099
|
*/
|
|
@@ -1635,6 +1656,12 @@ class SkyRadioGroupHarness extends SkyComponentHarness {
|
|
|
1635
1656
|
async clickHelpInline() {
|
|
1636
1657
|
await (await this.#getHelpInline()).click();
|
|
1637
1658
|
}
|
|
1659
|
+
/**
|
|
1660
|
+
* Gets the custom form error.
|
|
1661
|
+
*/
|
|
1662
|
+
async getCustomError(errorName) {
|
|
1663
|
+
return await this.locatorFor(SkyFormErrorHarness.with({ errorName: errorName }))();
|
|
1664
|
+
}
|
|
1638
1665
|
/**
|
|
1639
1666
|
* Whether the heading is hidden.
|
|
1640
1667
|
*/
|
|
@@ -1742,7 +1769,7 @@ class SkyRadioGroupHarness extends SkyComponentHarness {
|
|
|
1742
1769
|
((await host.hasClass('sky-field-group-stacked')) && !!heading));
|
|
1743
1770
|
}
|
|
1744
1771
|
/**
|
|
1745
|
-
* Whether the
|
|
1772
|
+
* Whether a form error with the specified name has fired.
|
|
1746
1773
|
*/
|
|
1747
1774
|
async hasError(errorName) {
|
|
1748
1775
|
return await (await this.#getFormErrors()).hasError(errorName);
|