build: Update karma versions and fix compile errors

This commit is contained in:
Ralph Hopman
2025-01-15 17:45:16 +01:00
committed by Arnold Gálovics
parent cac1d11ad7
commit 34a366e6de
11 changed files with 804 additions and 187 deletions
+741 -130
View File
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -102,19 +102,19 @@
"husky": "^9.1.7",
"jasmine-core": "^4.2.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-cli": "2.0.0",
"karma-coverage": "^2.2.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma": "^6.4.4",
"karma-chrome-launcher": "^3.2.0",
"karma-cli": "^2.0.0",
"karma-coverage": "^2.2.1",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"karma-junit-reporter": "1.2.0",
"karma-jasmine-html-reporter": "^2.1.0",
"karma-junit-reporter": "^2.0.1",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"prettier-plugin-multiline-arrays": "^3.0.6",
"protractor": "~7.0.0",
"puppeteer": "^15.3.2",
"puppeteer": "^24.1.0",
"stylelint": "^16.10.0",
"stylelint-config-recommended-scss": "^14.1.0",
"stylelint-config-standard": "^36.0.1",
@@ -1,13 +1,13 @@
import { TestBed } from '@angular/core/testing';
import { OfficeTreeServiceService } from './office-tree-service.service';
import { OfficeTreeService } from './office-tree-service.service';
describe('OfficeTreeServiceService', () => {
let service: OfficeTreeServiceService;
let service: OfficeTreeService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(OfficeTreeServiceService);
service = TestBed.inject(OfficeTreeService);
});
it('should be created', () => {
+1 -1
View File
@@ -11,7 +11,7 @@ describe('DateFormatPipe', () => {
}));
it('create an instance', () => {
const pipe = new DateFormatPipe(new SettingsService());
const pipe = new DateFormatPipe(new SettingsService(null, null));
expect(pipe).toBeTruthy();
});
});
+1 -1
View File
@@ -2,7 +2,7 @@ import { DatetimeFormatPipe } from './datetime-format.pipe';
describe('DatetimeFormatPipe', () => {
it('create an instance', () => {
const pipe = new DatetimeFormatPipe();
const pipe = new DatetimeFormatPipe(null);
expect(pipe).toBeTruthy();
});
});
+1 -1
View File
@@ -2,7 +2,7 @@ import { FormatNumberPipe } from './format-number.pipe';
describe('FormatNumberPipe', () => {
it('create an instance', () => {
const pipe = new FormatNumberPipe();
const pipe = new FormatNumberPipe(null, null);
expect(pipe).toBeTruthy();
});
});
+2 -1
View File
@@ -1,8 +1,9 @@
import { TranslateService } from '@ngx-translate/core';
import { YesnoPipe } from './yesno.pipe';
describe('YesnoPipe', () => {
it('create an instance', () => {
const pipe = new YesnoPipe();
const pipe = new YesnoPipe(null);
expect(pipe).toBeTruthy();
});
});
@@ -1,6 +1,6 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { WorkflowJobsComponent } from './workflow-job.component';
import { WorkflowJobsComponent } from './workflow-jobs.component';
describe('WorkflowJobsComponent', () => {
let component: WorkflowJobsComponent;
+22 -19
View File
@@ -1,28 +1,31 @@
// `.env.ts` is generated by the `npm run env` command
import env from './.env';
// The `window['env']` object is loaded in the `index.html` file
const loadedEnv = window['env'] || {};
export const environment = {
production: true,
version: env.mifos_x.version,
hash: env.mifos_x.hash,
// For connecting to server running elsewhere update the tenant identifier
fineractPlatformTenantId: window['env']['fineractPlatformTenantId'] || 'default',
fineractPlatformTenantIds: window['env']['fineractPlatformTenantIds'] || 'default',
fineractPlatformTenantId: loadedEnv['fineractPlatformTenantId'] || 'default',
fineractPlatformTenantIds: loadedEnv['fineractPlatformTenantIds'] || 'default',
// For connecting to others servers running elsewhere update the base API URL
baseApiUrls:
window['env']['fineractApiUrls'] ||
loadedEnv['fineractApiUrls'] ||
'https://dev.mifos.io,https://demo.mifos.io,https://qa.mifos.io,https://staging.mifos.io,https://mobile.mifos.io,https://demo.fineract.dev,https://localhost:8443',
// For connecting to server running elsewhere set the base API URL
baseApiUrl: window['env']['fineractApiUrl'] || window.location.protocol + '//' + window.location.hostname,
oauthServerUrl: window['env']['oauthServerUrl'] || window['env']['fineractApiUrl'] + window['env']['apiProvider'],
baseApiUrl: loadedEnv['fineractApiUrl'] || window.location.protocol + '//' + window.location.hostname,
oauthServerUrl: loadedEnv['oauthServerUrl'] || loadedEnv['fineractApiUrl'] + loadedEnv['apiProvider'],
allowServerSwitch: env.allow_switching_backend_instance,
apiProvider: window['env']['apiProvider'] || '/fineract-provider/api',
apiVersion: window['env']['apiVersion'] || '/v1',
apiProvider: loadedEnv['apiProvider'] || '/fineract-provider/api',
apiVersion: loadedEnv['apiVersion'] || '/v1',
serverUrl: '',
oauth: {
enabled: window['env']['oauthServerEnabled'] || false, // For connecting to Mifos X using OAuth2 Authentication change the value to true
serverUrl: window['env']['oauthServerUrl'] || '',
appId: window['env']['oauthAppId'] || ''
enabled: loadedEnv['oauthServerEnabled'] || false, // For connecting to Mifos X using OAuth2 Authentication change the value to true
serverUrl: loadedEnv['oauthServerUrl'] || '',
appId: loadedEnv['oauthAppId'] || ''
},
warningDialog: {
title: 'Warning',
@@ -30,22 +33,22 @@ export const environment = {
'This system is for authorized use only. Unauthorized access will result in possible legal action. By accessing this system, you acknowledge that you are authorized to do so and that all data stored and processed here is confidential.',
buttonText: 'Close'
},
defaultLanguage: window['env']['defaultLanguage'] || 'en-US',
defaultLanguage: loadedEnv['defaultLanguage'] || 'en-US',
supportedLanguages:
window['env']['supportedLanguages'] || 'cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW',
preloadClients: window['env']['preloadClients'] || true,
loadedEnv['supportedLanguages'] || 'cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW',
preloadClients: loadedEnv['preloadClients'] || true,
defaultCharDelimiter: window['env']['defaultCharDelimiter'] || ',',
defaultCharDelimiter: loadedEnv['defaultCharDelimiter'] || ',',
displayBackEndInfo: window['env']['displayBackEndInfo'] || 'true',
displayTenantSelector: window['env']['displayTenantSelector'] || 'true',
displayBackEndInfo: loadedEnv['displayBackEndInfo'] || 'true',
displayTenantSelector: loadedEnv['displayTenantSelector'] || 'true',
// Time in seconds, default 60 seconds
waitTimeForNotifications: window['env']['waitTimeForNotifications'] || 60,
waitTimeForNotifications: loadedEnv['waitTimeForNotifications'] || 60,
// Time in seconds, default 30 seconds
waitTimeForCOBCatchUp: window['env']['waitTimeForCOBCatchUp'] || 30,
waitTimeForCOBCatchUp: loadedEnv['waitTimeForCOBCatchUp'] || 30,
session: {
timeout: {
idleTimeout: window['env']['sessionIdleTimeout'] || 300000 // 5 minutes
idleTimeout: loadedEnv['sessionIdleTimeout'] || 300000 // 5 minutes
}
}
};
+22 -20
View File
@@ -1,21 +1,24 @@
// The file contents for the current environment will overwrite these during build.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
// The list of which env maps to which file can be found in `.angular-cli.json`.
// The list of which env maps to which file can be found in `angular.json`.
// `.env.ts` is generated by the `npm run env` command
import env from './.env';
// The `window['env']` object is loaded in the `index.html` file
const loadedEnv = window['env'] || {};
export const environment = {
production: false,
version: env.mifos_x.version,
hash: env.mifos_x.hash,
// For connecting to server running elsewhere update the tenant identifier
fineractPlatformTenantId: window['env']['fineractPlatformTenantId'] || 'default',
fineractPlatformTenantIds: window['env']['fineractPlatformTenantIds'] || 'default',
fineractPlatformTenantId: loadedEnv['fineractPlatformTenantId'] || 'default',
fineractPlatformTenantIds: loadedEnv['fineractPlatformTenantIds'] || 'default',
// For connecting to others servers running elsewhere update the base API URL
baseApiUrls:
window['env']['fineractApiUrls'] ||
loadedEnv['fineractApiUrls'] ||
'https://dev.mifos.io,https://demo.mifos.io,https://qa.mifos.io,https://staging.mifos.io,https://mobile.mifos.io,https://demo.fineract.dev,https://localhost:8443,' +
window.location.protocol +
'//' +
@@ -24,16 +27,15 @@ export const environment = {
window.location.port,
// For connecting to server running elsewhere set the base API URL
baseApiUrl:
window['env']['baseApiUrl'] ||
window.location.protocol + '//' + window.location.hostname + ':' + window.location.port,
loadedEnv['baseApiUrl'] || window.location.protocol + '//' + window.location.hostname + ':' + window.location.port,
allowServerSwitch: env.allow_switching_backend_instance,
apiProvider: window['env']['apiProvider'] || '/fineract-provider/api',
apiVersion: window['env']['apiVersion'] || '/v1',
apiProvider: loadedEnv['apiProvider'] || '/fineract-provider/api',
apiVersion: loadedEnv['apiVersion'] || '/v1',
serverUrl: '',
oauth: {
enabled: window['env']['oauthServerEnabled'] || false, // For connecting to Mifos X using OAuth2 Authentication change the value to true
serverUrl: window['env']['oauthServerUrl'] || '',
appId: window['env']['oauthAppId'] || ''
enabled: loadedEnv['oauthServerEnabled'] || false, // For connecting to Mifos X using OAuth2 Authentication change the value to true
serverUrl: loadedEnv['oauthServerUrl'] || '',
appId: loadedEnv['oauthAppId'] || ''
},
warningDialog: {
title: 'Warning',
@@ -41,22 +43,22 @@ export const environment = {
'This system is for authorized use only. Unauthorized access will result in possible legal action. By accessing this system, you acknowledge that you are authorized to do so and that all data stored and processed here is confidential.',
buttonText: 'Close'
},
defaultLanguage: window['env']['defaultLanguage'] || 'en-US',
defaultLanguage: loadedEnv['defaultLanguage'] || 'en-US',
supportedLanguages:
window['env']['supportedLanguages'] || 'cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW',
preloadClients: window['env']['preloadClients'] || true,
loadedEnv['supportedLanguages'] || 'cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW',
preloadClients: loadedEnv['preloadClients'] || true,
defaultCharDelimiter: window['env']['defaultCharDelimiter'] || ',',
defaultCharDelimiter: loadedEnv['defaultCharDelimiter'] || ',',
displayBackEndInfo: window['env']['displayBackEndInfo'] || 'true',
displayTenantSelector: window['env']['displayTenantSelector'] || 'true',
displayBackEndInfo: loadedEnv['displayBackEndInfo'] || 'true',
displayTenantSelector: loadedEnv['displayTenantSelector'] || 'true',
// Time in seconds, default 60 seconds
waitTimeForNotifications: window['env']['waitTimeForNotifications'] || 60,
waitTimeForNotifications: loadedEnv['waitTimeForNotifications'] || 60,
// Time in seconds, default 30 seconds
waitTimeForCOBCatchUp: window['env']['waitTimeForCOBCatchUp'] || 30,
waitTimeForCOBCatchUp: loadedEnv['waitTimeForCOBCatchUp'] || 30,
session: {
timeout: {
idleTimeout: window['env']['sessionIdleTimeout'] || 300000 // 5 minutes
idleTimeout: loadedEnv['sessionIdleTimeout'] || 300000 // 5 minutes
}
}
};
+2 -2
View File
@@ -14,8 +14,8 @@ module.exports = (config: any) => {
// list of files / patterns to load in the browser
files: [
'src/**/*spec.ts',
'src/**/*.ts'
{ pattern: 'src/**/*spec.ts', type: 'js' },
{ pattern: 'src/**/*.ts', type: 'js' }
],
// list of files / patterns to exclude