AAE-35340 Replace deprecated toPromise() usages with firstValueFrom / lastValueFrom (#11161)

This commit is contained in:
Amedeo Lepore
2025-09-03 08:37:13 -04:00
committed by GitHub
parent 93c872b65d
commit 51c55674b4
27 changed files with 178 additions and 191 deletions
@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { of, timer } from 'rxjs';
import { firstValueFrom, of, timer } from 'rxjs';
import { FormFieldModel, FormModel, GroupModel, FormFieldTypes, UnitTestingUtils } from '@alfresco/adf-core';
import { FunctionalGroupWidgetComponent } from './functional-group.widget';
import { ComponentFixture, TestBed } from '@angular/core/testing';
@@ -64,7 +64,7 @@ describe('FunctionalGroupWidgetComponent', () => {
component.searchTerm.setValue(text);
fixture.detectChanges();
await timer(300).toPromise();
await firstValueFrom(timer(300));
await fixture.whenStable();
fixture.detectChanges();