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
Original file line number Diff line number Diff line change
@@ -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');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
"ENABLED": "सक्षम",
"ENTITY": "इकाई",
"ERROR": "कार्रवाई विफल रही।",
"ERROR_LOG": "त्रुटि लॉग",
"ERRORS": {
"FORBIDDEN": "आपके पास इस कार्रवाई को करने की अनुमति नहीं है। यदि आपको लगता है कि यह कोई त्रुटि है तो व्यवस्थापक से संपर्क करें।",
"NETWORK": "सर्वर से कनेक्ट करने में असमर्थ। कृपया अपने नेटवर्क या CORS सेटिंग्स की जांच करें।",
Expand Down
Loading