diff --git a/src/app/component-library/components/checkbox/checkbox.component.spec.ts b/src/app/component-library/components/checkbox/checkbox.component.spec.ts index 9f150baff..d5b86545d 100644 --- a/src/app/component-library/components/checkbox/checkbox.component.spec.ts +++ b/src/app/component-library/components/checkbox/checkbox.component.spec.ts @@ -3,7 +3,7 @@ import { Shallow } from 'shallow-render'; import { ComponentsModule } from '../../components.module'; import { CheckboxComponent } from './checkbox.component'; -describe('ToggleComponent', () => { +describe('CheckboxCompoent', () => { let shallow: Shallow; beforeEach(async () => { @@ -86,7 +86,7 @@ describe('ToggleComponent', () => { it('should be focusable and have correct ARIA attributes', async () => { const { find } = await shallow.render(); - const checkboxContainer = find('.checkbox-container').nativeElement; + const checkboxContainer = find('.checkbox').nativeElement; expect(checkboxContainer.getAttribute('role')).toEqual('checkbox'); expect(checkboxContainer.getAttribute('tabindex')).toEqual('0'); @@ -136,21 +136,11 @@ describe('ToggleComponent', () => { bind: { disabled: true }, }); fixture.detectChanges(); - const checkboxContainer = find('.checkbox-container').nativeElement; + const checkboxContainer = find('.checkbox').nativeElement; expect(checkboxContainer.getAttribute('aria-disabled')).toEqual('true'); }); - it('should be focusable and have correct ARIA attributes', async () => { - const { find } = await shallow.render(); - const checkboxContainer = find('.checkbox-container').nativeElement; - - expect(checkboxContainer.getAttribute('role')).toEqual('checkbox'); - expect(checkboxContainer.getAttribute('tabindex')).toEqual('0'); - expect(checkboxContainer.getAttribute('aria-checked')).toEqual('false'); - expect(checkboxContainer.getAttribute('aria-disabled')).toEqual('false'); - }); - it('should toggle checked state on Enter key press', async () => { const { find, instance, fixture } = await shallow.render(); instance.isChecked = false; @@ -193,7 +183,7 @@ describe('ToggleComponent', () => { bind: { disabled: true }, }); fixture.detectChanges(); - const checkboxContainer = find('.checkbox-container').nativeElement; + const checkboxContainer = find('.checkbox').nativeElement; expect(checkboxContainer.getAttribute('aria-disabled')).toEqual('true'); });