Files
dspace-angular/src/app/process-page/form/process-parameters/parameter-value-input/boolean-value-input/boolean-value-input.component.spec.ts
Alexandre Vryghem 9ed13f31ff Fix Create a new process page accessibility issues
- Added missing aria-label to delete buttons
- Moved hardcoded translation to translation files
- Fix color contrast issues on buttons
- Fix minor alignment issues
- Added missing aria labels to input and select elements

(cherry picked from commit 52c0977489)
2023-12-06 16:03:23 +00:00

34 lines
992 B
TypeScript

import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { TranslateModule } from '@ngx-translate/core';
import { BooleanValueInputComponent } from './boolean-value-input.component';
describe('BooleanValueInputComponent', () => {
let component: BooleanValueInputComponent;
let fixture: ComponentFixture<BooleanValueInputComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
],
declarations: [BooleanValueInputComponent]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BooleanValueInputComponent);
component = fixture.componentInstance;
spyOn(component.updateValue, 'emit');
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should emit true onInit', () => {
expect(component.updateValue.emit).toHaveBeenCalledWith(true);
});
});