@skyux/forms 15.0.0-alpha.3 → 15.0.0-alpha.5

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.
@@ -1897,24 +1897,6 @@ class SkySelectionBoxGridHarness extends SkyComponentHarness {
1897
1897
  }
1898
1898
  }
1899
1899
 
1900
- /**
1901
- * Harness for interacting with a toggle switch label component in tests.
1902
- * @internal
1903
- */
1904
- class SkyToggleSwitchLabelHarness extends ComponentHarness {
1905
- /**
1906
- * @internal
1907
- */
1908
- static { this.hostSelector = 'sky-toggle-switch-label'; }
1909
- #getLabelContent = this.locatorFor('span[skyTrim]');
1910
- /**
1911
- * Gets the text content of the toggle switch label.
1912
- */
1913
- async getText() {
1914
- return await (await this.#getLabelContent()).text();
1915
- }
1916
- }
1917
-
1918
1900
  /**
1919
1901
  * Harness for interacting with a toggle switch component in tests.
1920
1902
  */
@@ -1924,7 +1906,6 @@ class SkyToggleSwitchHarness extends SkyComponentHarness {
1924
1906
  */
1925
1907
  static { this.hostSelector = 'sky-toggle-switch'; }
1926
1908
  #getButton = this.locatorFor('button.sky-toggle-switch-button');
1927
- #getLabel = this.locatorForOptional(SkyToggleSwitchLabelHarness);
1928
1909
  #getLabelText = this.locatorForOptional('span.sky-toggle-switch-label-text');
1929
1910
  /**
1930
1911
  * Gets a `HarnessPredicate` that can be used to search for a
@@ -1976,13 +1957,7 @@ class SkyToggleSwitchHarness extends SkyComponentHarness {
1976
1957
  */
1977
1958
  async getLabelHidden() {
1978
1959
  const labelText = await this.#getLabelText();
1979
- const labelComponent = await this.#getLabel();
1980
- if (labelComponent) {
1981
- throw new Error('`labelHidden` is only supported when setting the toggle switch label via the `labelText` input.');
1982
- }
1983
- else {
1984
- return !(await labelText?.text());
1985
- }
1960
+ return !(await labelText?.text());
1986
1961
  }
1987
1962
  /**
1988
1963
  * Gets the toggle switch's label text. If the label is set via `labelText` and `labelHidden` is true,
@@ -1991,7 +1966,7 @@ class SkyToggleSwitchHarness extends SkyComponentHarness {
1991
1966
  async getLabelText() {
1992
1967
  const labelText = await (await this.#getLabelText())?.text();
1993
1968
  const ariaLabel = await this.#getAriaLabel();
1994
- return (labelText || ariaLabel || (await (await this.#getLabel())?.getText()));
1969
+ return labelText || ariaLabel || undefined;
1995
1970
  }
1996
1971
  /**
1997
1972
  * Whether the toggle switch is checked.