diff --git a/src/app/features/transfers/standing-instruction-history.component.test.ts b/src/app/features/transfers/standing-instruction-history.component.test.ts new file mode 100644 index 000000000..558affc17 --- /dev/null +++ b/src/app/features/transfers/standing-instruction-history.component.test.ts @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { provideHttpClient } from '@angular/common/http'; +import { provideHttpClientTesting } from '@angular/common/http/testing'; +import { TestBed } from '@angular/core/testing'; +import en from '../../../assets/i18n/en.json'; +import { StandingInstructionHistoryComponent } from './standing-instruction-history.component'; + +describe('StandingInstructionHistoryComponent', () => { + it('labels the error log column "Error Log" rather than the failure message', () => { + TestBed.configureTestingModule({ + providers: [provideHttpClient(), provideHttpClientTesting()], + }); + const component = TestBed.runInInjectionContext( + () => new StandingInstructionHistoryComponent(), + ); + + const errorLog = component.columns.find((column) => column.key === 'errorLog'); + expect(errorLog?.label).toBe('COMMON.ERROR_LOG'); + expect(en.COMMON.ERROR_LOG).toBe('Error Log'); + }); +}); diff --git a/src/app/features/transfers/standing-instruction-history.component.ts b/src/app/features/transfers/standing-instruction-history.component.ts index a0c5905c6..2e7f34037 100644 --- a/src/app/features/transfers/standing-instruction-history.component.ts +++ b/src/app/features/transfers/standing-instruction-history.component.ts @@ -62,7 +62,7 @@ export class StandingInstructionHistoryComponent implements OnInit { { key: 'amount', label: 'COMMON.AMOUNT' }, { key: 'executionTime', label: 'CLIENTS.EXECUTION_TIME' }, { key: 'status', label: 'COMMON.STATUS' }, - { key: 'errorLog', label: 'COMMON.ERROR' }, + { key: 'errorLog', label: 'COMMON.ERROR_LOG' }, ]; ngOnInit(): void { diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 9dc92bcfa..e593f5d87 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -203,6 +203,7 @@ "ENABLED": "Enabled", "ENTITY": "Entity", "ERROR": "Operation failed.", + "ERROR_LOG": "Error Log", "ERRORS": { "FORBIDDEN": "You do not have permission to perform this action. Contact an administrator if you believe this is a mistake.", "NETWORK": "Unable to connect to the server. Please check your network or CORS settings.", diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index 633bbaff6..b9be8e8c6 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -203,6 +203,7 @@ "ENABLED": "Activé", "ENTITY": "Entité", "ERROR": "Échec de l'opération.", + "ERROR_LOG": "Journal des erreurs", "ERRORS": { "FORBIDDEN": "Vous n'avez pas l'autorisation d'effectuer cette action. Contactez un administrateur si vous pensez qu'il s'agit d'une erreur.", "NETWORK": "Impossible de se connecter au serveur. Vérifiez votre réseau ou vos paramètres CORS.", diff --git a/src/assets/i18n/hi.json b/src/assets/i18n/hi.json index 05b1c2fef..80ff838b5 100644 --- a/src/assets/i18n/hi.json +++ b/src/assets/i18n/hi.json @@ -187,6 +187,7 @@ "ENABLED": "सक्षम", "ENTITY": "इकाई", "ERROR": "कार्रवाई विफल रही।", + "ERROR_LOG": "त्रुटि लॉग", "ERRORS": { "FORBIDDEN": "आपके पास इस कार्रवाई को करने की अनुमति नहीं है। यदि आपको लगता है कि यह कोई त्रुटि है तो व्यवस्थापक से संपर्क करें।", "NETWORK": "सर्वर से कनेक्ट करने में असमर्थ। कृपया अपने नेटवर्क या CORS सेटिंग्स की जांच करें।",