84367: SearchForm/SearchComponent: add option to hide scope selection dropdown

This commit is contained in:
Yura
2021-10-20 11:27:55 +02:00
parent 9fc7b57157
commit 14b1fd463d
6 changed files with 29 additions and 2 deletions

View File

@@ -72,6 +72,16 @@ describe('SearchFormComponent', () => {
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();
const select = de.query(By.css('select'));
expect(select).toBeNull();
});
it('should display set query value in input field', fakeAsync(() => {
const testString = 'This is a test query';
comp.query = testString;