Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "7.2.49",
"version": "7.2.50-remove-flag-icp-enabled",
"engines": {
"node": ">=18.19.0"
},
Expand Down
2 changes: 1 addition & 1 deletion projects/ccd-case-ui-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "7.2.49",
"version": "7.2.50-remove-flag-icp-enabled",
"engines": {
"node": ">=18.19.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ describe('CaseFileViewFieldComponent', () => {
mockCaseFileViewService.getCategoriesAndDocuments.and.returnValue(of(null));

mockLoadingService = createSpyObj<LoadingService>('LoadingService', ['register', 'unregister']);
mockabstractConfig = createSpyObj<AbstractAppConfig>('LoadingService', ['getIcpJurisdictions', 'getIcpEnable']);
mockabstractConfig = createSpyObj<AbstractAppConfig>('LoadingService', ['getIcpJurisdictions']);
mockabstractConfig.getIcpJurisdictions.and.returnValue('["ST_CIC", "IA"]');
mockabstractConfig.getIcpEnable.and.returnValue(true);
mockLoadingService.register.and.returnValue('loadingToken');
mockLoadingService.unregister.and.returnValue(null);

Expand All @@ -92,7 +91,7 @@ describe('CaseFileViewFieldComponent', () => {
{ provide: LoadingService, useValue: mockLoadingService },
{ provide: SessionStorageService, useValue: mockSessionStorageService },
{ provide: CaseNotifier, useValue: ['ST-CIC'] },
{ provide: AbstractAppConfig, useValue: mockabstractConfig },
{ provide: AbstractAppConfig, useValue: mockabstractConfig }

]
})
Expand Down Expand Up @@ -246,14 +245,7 @@ describe('CaseFileViewFieldComponent', () => {
expect(component.errorMessages).toEqual(errorMessagesFromElements);
});

it('should disable icp when config contains false', () => {
mockabstractConfig.getIcpEnable.and.returnValue(false);
fixture.detectChanges();
expect(component.icpEnabled).toBeFalsy();
});

it('should enable icp when config contains true', () => {
mockabstractConfig.getIcpEnable.and.returnValue(true);
fixture.detectChanges();
expect(component.icpEnabled).toBeTruthy();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class CaseFileViewFieldComponent implements OnInit, AfterViewInit, OnDest
// As there can be more than one intersecting role, if any acls are update: true
this.allowMoving = acls.some(acl => acl.update);
this.icp_jurisdictions = this.abstractConfig.getIcpJurisdictions();
this.icpEnabled = this.abstractConfig.getIcpEnable();
this.icpEnabled = true;
}

public ngAfterViewInit(): void {
Expand Down