mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5422] remove deprecated "async()" from unit tests (#7109)
* remove angualar async from content services * upgrade more tests * upgrade core tests * upgrade tests * fix deprecated constant * fix tests * fix after rebase
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ComponentFixture, TestBed, discardPeriodicTasks, fakeAsync, tick, async } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed, discardPeriodicTasks, fakeAsync, tick } from '@angular/core/testing';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { SearchTextInputComponent } from './search-text-input.component';
|
||||
import { DebugElement } from '@angular/core';
|
||||
@@ -55,12 +55,17 @@ describe('SearchTextInputComponent', () => {
|
||||
|
||||
describe('component rendering', () => {
|
||||
|
||||
it('should display a search input field when specified', async(() => {
|
||||
it('should display a search input field when specified', async () => {
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
component.inputType = 'search';
|
||||
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(element.querySelectorAll('input[type="search"]').length).toBe(1);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe('expandable option false', () => {
|
||||
@@ -246,10 +251,13 @@ describe('SearchTextInputComponent', () => {
|
||||
discardPeriodicTasks();
|
||||
}));
|
||||
|
||||
it('should set browser autocomplete to on when configured', async(() => {
|
||||
it('should set browser autocomplete to on when configured', async () => {
|
||||
component.autocomplete = true;
|
||||
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(element.querySelector('#adf-control-input').getAttribute('autocomplete')).toBe('on');
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user