mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
87370: Update SearchFormComponent specs
This commit is contained in:
@@ -47,21 +47,23 @@ describe('SearchFormComponent', () => {
|
||||
el = de.nativeElement;
|
||||
});
|
||||
|
||||
it('should not display scopes when empty', () => {
|
||||
fixture.detectChanges();
|
||||
const select = de.query(By.css('select'));
|
||||
expect(select).toBeNull();
|
||||
});
|
||||
|
||||
it('should not display scopes when scopeSelectable is false', () => {
|
||||
comp.scopeSelectable = false;
|
||||
comp.scopes = objects;
|
||||
comp.scope = objects[1].id;
|
||||
it('should not display scopes when showScopeSelector is false', fakeAsync(() => {
|
||||
comp.showScopeSelector = false;
|
||||
|
||||
fixture.detectChanges();
|
||||
const select = de.query(By.css('select'));
|
||||
expect(select).toBeNull();
|
||||
});
|
||||
tick();
|
||||
|
||||
expect(de.query(By.css('.scope-button'))).toBeFalsy();
|
||||
}));
|
||||
|
||||
it('should display scopes when showScopeSelector is true', fakeAsync(() => {
|
||||
comp.showScopeSelector = true;
|
||||
|
||||
fixture.detectChanges();
|
||||
tick();
|
||||
|
||||
expect(de.query(By.css('.scope-button'))).toBeTruthy();
|
||||
}));
|
||||
|
||||
it('should display set query value in input field', fakeAsync(() => {
|
||||
const testString = 'This is a test query';
|
||||
|
Reference in New Issue
Block a user