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;
|
el = de.nativeElement;
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not display scopes when empty', () => {
|
it('should not display scopes when showScopeSelector is false', fakeAsync(() => {
|
||||||
fixture.detectChanges();
|
comp.showScopeSelector = false;
|
||||||
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;
|
|
||||||
|
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const select = de.query(By.css('select'));
|
tick();
|
||||||
expect(select).toBeNull();
|
|
||||||
});
|
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(() => {
|
it('should display set query value in input field', fakeAsync(() => {
|
||||||
const testString = 'This is a test query';
|
const testString = 'This is a test query';
|
||||||
|
Reference in New Issue
Block a user