"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/app/shared/input-suggestions/validation-suggestions/validation-suggestions.component.spec.ts" between
dspace-angular-dspace-7.0.tar.gz and dspace-angular-dspace-7.1.tar.gz

About: dspace-angular is the Angular-based frontend of DSpace, a digital repository system to capture, store, index, preserve and redistribute an organization’s research material in digital formats.

validation-suggestions.component.spec.ts  (dspace-angular-dspace-7.0):validation-suggestions.component.spec.ts  (dspace-angular-dspace-7.1)
skipping to change at line 63 skipping to change at line 63
beforeEach(() => { beforeEach(() => {
spyOn(comp, 'onClickSuggestion'); spyOn(comp, 'onClickSuggestion');
const clickedLink = de.query(By.css('.dropdown-list > div:nth-child(' + (c lickedIndex + 1) + ') a')); const clickedLink = de.query(By.css('.dropdown-list > div:nth-child(' + (c lickedIndex + 1) + ') a'));
clickedLink.triggerEventHandler('click', {}); clickedLink.triggerEventHandler('click', {});
fixture.detectChanges(); fixture.detectChanges();
}); });
it('should call onClickSuggestion() with the suggestion as a parameter', () => { it('should call onClickSuggestion() with the suggestion as a parameter', () => {
expect(comp.onClickSuggestion).toHaveBeenCalledWith(suggestions[clickedInd ex].value); expect(comp.onClickSuggestion).toHaveBeenCalledWith(suggestions[clickedInd ex].value);
}); });
}); });
describe('can edit input', () => {
describe('test input field readonly property when input disable is true', ()
=> {
beforeEach(() => {
comp.disable = true;
fixture.detectChanges();
});
it('it should be true', () => {
fixture.detectChanges();
const input = fixture.debugElement.query(By.css('input'));
const element = input.nativeElement;
expect(element.readOnly).toBe(true);
});
});
describe('test input field readonly property when input disable is false', (
) => {
beforeEach(() => {
comp.disable = false;
fixture.detectChanges();
});
it('it should be true', () => {
fixture.detectChanges();
const input = fixture.debugElement.query(By.css('input'));
const element = input.nativeElement;
expect(element.readOnly).toBe(false);
});
});
});
}); });
 End of changes. 1 change blocks. 
0 lines changed or deleted 28 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)