fix after rebase [ci:force]

This commit is contained in:
Denys Vuika
2024-10-02 09:57:27 -04:00
parent cc74849f78
commit 244a1dff2e
3 changed files with 12 additions and 20 deletions
@@ -69,17 +69,16 @@ export class GroupCloudWidgetComponent extends WidgetComponent implements OnInit
this.preSelectGroup = this.field.value ? this.field.value : []; this.preSelectGroup = this.field.value ? this.field.value : [];
this.validate = this.field.readOnly ? false : true; this.validate = this.field.readOnly ? false : true;
} }
// eslint-disable-next-line @typescript-eslint/no-unused-expressions this.search = new UntypedFormControl({ value: '', disabled: this.field.readOnly }, []);
(this.search = new UntypedFormControl({ value: '', disabled: this.field.readOnly }, [])), this.search.statusChanges
this.search.statusChanges .pipe(
.pipe( filter((value: string) => value === 'INVALID'),
filter((value: string) => value === 'INVALID'), takeUntil(this.onDestroy$)
takeUntil(this.onDestroy$) )
) .subscribe(() => {
.subscribe(() => { this.field.markAsInvalid();
this.field.markAsInvalid(); this.field.form.markAsInvalid();
this.field.form.markAsInvalid(); });
});
this.search.statusChanges this.search.statusChanges
.pipe( .pipe(
@@ -91,7 +91,6 @@ export class ProcessServicesCloudModule {
{ provide: IDENTITY_GROUP_SERVICE_TOKEN, useExisting: IdentityGroupService }, { provide: IDENTITY_GROUP_SERVICE_TOKEN, useExisting: IdentityGroupService },
{ provide: IDENTITY_USER_SERVICE_TOKEN, useExisting: IdentityUserService }, { provide: IDENTITY_USER_SERVICE_TOKEN, useExisting: IdentityUserService },
{ provide: TASK_LIST_CLOUD_TOKEN, useClass: TaskListCloudService }, { provide: TASK_LIST_CLOUD_TOKEN, useClass: TaskListCloudService },
{ provide: TASK_LIST_PREFERENCES_SERVICE_TOKEN, useClass: LocalPreferenceCloudService },
FormRenderingService, FormRenderingService,
{ provide: FormRenderingService, useClass: CloudFormRenderingService } { provide: FormRenderingService, useClass: CloudFormRenderingService }
] ]
@@ -17,9 +17,7 @@
import { FileViewerWidgetComponent } from './file-viewer.widget'; import { FileViewerWidgetComponent } from './file-viewer.widget';
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormModel, FormService, FormFieldModel, RedirectAuthService, NoopTranslateModule, NoopAuthModule } from '@alfresco/adf-core'; import { FormModel, FormService, FormFieldModel, NoopTranslateModule, NoopAuthModule } from '@alfresco/adf-core';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { EMPTY, of } from 'rxjs';
describe('FileViewerWidgetComponent', () => { describe('FileViewerWidgetComponent', () => {
const fakeForm = new FormModel(); const fakeForm = new FormModel();
@@ -45,11 +43,7 @@ describe('FileViewerWidgetComponent', () => {
beforeEach(() => { beforeEach(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [NoopTranslateModule, NoopAuthModule, FileViewerWidgetComponent], imports: [NoopTranslateModule, NoopAuthModule, FileViewerWidgetComponent],
providers: [ providers: [{ provide: FormService, useValue: formServiceStub }]
{ provide: FormService, useValue: formServiceStub },
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}); });
formServiceStub = TestBed.inject(FormService); formServiceStub = TestBed.inject(FormService);