This commit is contained in:
giuliana
2025-01-24 12:32:15 +00:00
parent 82eb743eab
commit 72494dbe31
3 changed files with 4 additions and 4 deletions

View File

@@ -54,4 +54,3 @@ describe('ion-checkbox: indeterminate', () => {
expect(checkbox.getAttribute('aria-checked')).toBe('mixed');
});
});

View File

@@ -87,7 +87,7 @@ describe('ion-toggle: required', () => {
});
const toggle = page.body.querySelector('ion-toggle')!;
const nativeInput = toggle.shadowRoot?.querySelector("input[role=switch]")!;
const nativeInput = toggle.shadowRoot?.querySelector('input[role=switch]')!;
expect(nativeInput.hasAttribute('required')).toBeTruthy();
});
@@ -101,7 +101,7 @@ describe('ion-toggle: required', () => {
});
const toggle = page.body.querySelector('ion-toggle')!;
const nativeInput = toggle.shadowRoot?.querySelector("input[role=switch]")!;
const nativeInput = toggle.shadowRoot?.querySelector('input[role=switch]')!;
expect(nativeInput.hasAttribute('required')).toBeFalsy();
});

View File

@@ -297,7 +297,8 @@ export class Toggle implements ComponentInterface {
}
render() {
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment, required } = this;
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment, required } =
this;
const mode = getIonMode(this);
const value = this.getValue();