@skyux/forms 12.9.0 → 12.11.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 +112 -1
- package/fesm2022/skyux-forms-testing.mjs.map +1 -1
- package/fesm2022/skyux-forms.mjs +4 -4
- package/fesm2022/skyux-forms.mjs.map +1 -1
- package/lib/modules/input-box/input-box.component.d.ts +1 -1
- package/package.json +9 -9
- package/testing/modules/selection-box/selection-box-description-harness.d.ts +15 -0
- package/testing/modules/selection-box/selection-box-grid-harness-filters.d.ts +6 -0
- package/testing/modules/selection-box/selection-box-grid-harness.d.ts +27 -0
- package/testing/modules/selection-box/selection-box-harness-filters.d.ts +6 -0
- package/testing/modules/selection-box/selection-box-harness.d.ts +36 -0
- package/testing/modules/selection-box/selection-box-header-harness.d.ts +15 -0
- package/testing/public-api.d.ts +4 -0
|
@@ -5,6 +5,7 @@ import { SkyStatusIndicatorHarness } from '@skyux/indicators/testing';
|
|
|
5
5
|
import { SkyPopoverHarness } from '@skyux/popovers/testing';
|
|
6
6
|
import { By } from '@angular/platform-browser';
|
|
7
7
|
import { SkyAppTestUtility } from '@skyux-sdk/testing';
|
|
8
|
+
import { SkyIconHarness } from '@skyux/icon/testing';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Harness for interacting with a character counter indicator component in tests.
|
|
@@ -1734,6 +1735,116 @@ class SkyRadioGroupHarness extends SkyComponentHarness {
|
|
|
1734
1735
|
}
|
|
1735
1736
|
}
|
|
1736
1737
|
|
|
1738
|
+
/**
|
|
1739
|
+
* Harness to interact with a selection box description component in tests.
|
|
1740
|
+
* @internal
|
|
1741
|
+
*/
|
|
1742
|
+
class SkySelectionBoxDescriptionHarness extends SkyComponentHarness {
|
|
1743
|
+
/**
|
|
1744
|
+
* @internal
|
|
1745
|
+
*/
|
|
1746
|
+
static { this.hostSelector = 'sky-selection-box-description'; }
|
|
1747
|
+
/**
|
|
1748
|
+
* Gets the description text.
|
|
1749
|
+
*/
|
|
1750
|
+
async getText() {
|
|
1751
|
+
return (await (await this.host()).text()).trim();
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
/**
|
|
1756
|
+
* Harness to interact with a selection box header component in tests.
|
|
1757
|
+
* @internal
|
|
1758
|
+
*/
|
|
1759
|
+
class SkySelectionBoxHeaderHarness extends SkyComponentHarness {
|
|
1760
|
+
/**
|
|
1761
|
+
* @internal
|
|
1762
|
+
*/
|
|
1763
|
+
static { this.hostSelector = 'sky-selection-box-header'; }
|
|
1764
|
+
/**
|
|
1765
|
+
* Gets the header text.
|
|
1766
|
+
*/
|
|
1767
|
+
async getText() {
|
|
1768
|
+
return (await (await this.host()).text()).trim();
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
/**
|
|
1773
|
+
* Harness to interact with a selection box component in tests.
|
|
1774
|
+
*/
|
|
1775
|
+
class SkySelectionBoxHarness extends SkyComponentHarness {
|
|
1776
|
+
/**
|
|
1777
|
+
* @internal
|
|
1778
|
+
*/
|
|
1779
|
+
static { this.hostSelector = 'sky-selection-box'; }
|
|
1780
|
+
/**
|
|
1781
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
1782
|
+
* `SkySelectionBoxHarness` that meets certain criteria.
|
|
1783
|
+
*/
|
|
1784
|
+
static with(filters) {
|
|
1785
|
+
return SkySelectionBoxHarness.getDataSkyIdPredicate(filters);
|
|
1786
|
+
}
|
|
1787
|
+
/**
|
|
1788
|
+
* Gets the checkbox or radio harness for the selection box form control.
|
|
1789
|
+
*/
|
|
1790
|
+
async getControl() {
|
|
1791
|
+
return await this.locatorFor(SkyCheckboxHarness, SkyRadioHarness)();
|
|
1792
|
+
}
|
|
1793
|
+
/**
|
|
1794
|
+
* Gets the selection box description text.
|
|
1795
|
+
*/
|
|
1796
|
+
async getDescriptionText() {
|
|
1797
|
+
const text = await (await this.locatorForOptional(SkySelectionBoxDescriptionHarness)())?.getText();
|
|
1798
|
+
return text ?? '';
|
|
1799
|
+
}
|
|
1800
|
+
/**
|
|
1801
|
+
* Gets the selection box header text.
|
|
1802
|
+
*/
|
|
1803
|
+
async getHeaderText() {
|
|
1804
|
+
const text = await (await this.locatorForOptional(SkySelectionBoxHeaderHarness)())?.getText();
|
|
1805
|
+
return text ?? '';
|
|
1806
|
+
}
|
|
1807
|
+
/**
|
|
1808
|
+
* Gets the selection box icon, if it exists.
|
|
1809
|
+
*/
|
|
1810
|
+
async getIcon() {
|
|
1811
|
+
return await this.locatorForOptional(SkyIconHarness)();
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
/**
|
|
1816
|
+
* Harness for interacting with a selection box grid component in tests.
|
|
1817
|
+
*/
|
|
1818
|
+
class SkySelectionBoxGridHarness extends SkyComponentHarness {
|
|
1819
|
+
/**
|
|
1820
|
+
* @internal
|
|
1821
|
+
*/
|
|
1822
|
+
static { this.hostSelector = 'sky-selection-box-grid'; }
|
|
1823
|
+
/**
|
|
1824
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
1825
|
+
* `SkySelectionBoxGridHarness` that meets certain criteria.
|
|
1826
|
+
*/
|
|
1827
|
+
static with(filters) {
|
|
1828
|
+
return SkySelectionBoxGridHarness.getDataSkyIdPredicate(filters);
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* Gets a harness for a specific selection box that meets certain criteria.
|
|
1832
|
+
*/
|
|
1833
|
+
async getSelectionBox(filter) {
|
|
1834
|
+
return await this.locatorFor(SkySelectionBoxHarness.with(filter))();
|
|
1835
|
+
}
|
|
1836
|
+
/**
|
|
1837
|
+
* Gets an array of selection boxes.
|
|
1838
|
+
*/
|
|
1839
|
+
async getSelectionBoxes(filters) {
|
|
1840
|
+
const items = await this.locatorForAll(SkySelectionBoxHarness.with(filters || {}))();
|
|
1841
|
+
if (filters && items.length === 0) {
|
|
1842
|
+
throw new Error(`Unable to find any selection boxes with filter(s): ${JSON.stringify(filters)}`);
|
|
1843
|
+
}
|
|
1844
|
+
return items;
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1737
1848
|
/**
|
|
1738
1849
|
* Harness for interacting with a toggle switch label component in tests.
|
|
1739
1850
|
* @internal
|
|
@@ -1881,5 +1992,5 @@ class SkyToggleSwitchHarness extends SkyComponentHarness {
|
|
|
1881
1992
|
* Generated bundle index. Do not edit.
|
|
1882
1993
|
*/
|
|
1883
1994
|
|
|
1884
|
-
export { SkyCharacterCounterIndicatorHarness, SkyCheckboxFixture, SkyCheckboxGroupHarness, SkyCheckboxHarness, SkyCheckboxLabelHarness, SkyFieldGroupHarness, SkyFileAttachmentHarness, SkyFileDropHarness, SkyFileItemHarness, SkyFormErrorHarness, SkyFormErrorsHarness, SkyInputBoxHarness, SkyRadioFixture, SkyRadioGroupHarness, SkyRadioHarness, SkyRadioLabelHarness, SkyToggleSwitchHarness, provideSkyFileAttachmentTesting };
|
|
1995
|
+
export { SkyCharacterCounterIndicatorHarness, SkyCheckboxFixture, SkyCheckboxGroupHarness, SkyCheckboxHarness, SkyCheckboxLabelHarness, SkyFieldGroupHarness, SkyFileAttachmentHarness, SkyFileDropHarness, SkyFileItemHarness, SkyFormErrorHarness, SkyFormErrorsHarness, SkyInputBoxHarness, SkyRadioFixture, SkyRadioGroupHarness, SkyRadioHarness, SkyRadioLabelHarness, SkySelectionBoxGridHarness, SkySelectionBoxHarness, SkyToggleSwitchHarness, provideSkyFileAttachmentTesting };
|
|
1885
1996
|
//# sourceMappingURL=skyux-forms-testing.mjs.map
|