[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:
Denys Vuika
2021-06-15 16:16:15 +01:00
committed by GitHub
parent ba03c60adb
commit 3079aa48c3
121 changed files with 5316 additions and 4780 deletions

View File

@@ -15,14 +15,13 @@
* limitations under the License.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { EmptyListComponent } from './empty-list.component';
import { setupTestBed } from '../../../testing/setup-test-bed';
import { CoreTestingModule } from '../../../testing/core.testing.module';
import { TranslateModule } from '@ngx-translate/core';
describe('EmptyListComponentComponent', () => {
let component: EmptyListComponent;
let fixture: ComponentFixture<EmptyListComponent>;
setupTestBed({
@@ -34,22 +33,16 @@ describe('EmptyListComponentComponent', () => {
beforeEach(() => {
fixture = TestBed.createComponent(EmptyListComponent);
component = fixture.componentInstance;
});
afterEach(() => {
fixture.destroy();
});
it('should be defined', () => {
expect(component).toBeDefined();
});
it('should render the input values', async(() => {
it('should render the input values', async () => {
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
expect(fixture.nativeElement.querySelector('.adf-empty-list_template')).toBeDefined();
});
}));
await fixture.whenStable();
expect(fixture.nativeElement.querySelector('.adf-empty-list_template')).toBeDefined();
});
});