diff --git a/lib/core/feature-flags/src/lib/directives/features.directive.ts b/lib/core/feature-flags/src/lib/directives/features.directive.ts index 9debddbc020..3a954f6bea9 100644 --- a/lib/core/feature-flags/src/lib/directives/features.directive.ts +++ b/lib/core/feature-flags/src/lib/directives/features.directive.ts @@ -58,7 +58,7 @@ export class FeaturesDirective implements OnDestroy { } ngOnDestroy() { - this.destroy$.next(); + this.destroy$.next({}); this.destroy$.complete(); } } diff --git a/lib/core/feature-flags/src/lib/directives/not-features.directive.ts b/lib/core/feature-flags/src/lib/directives/not-features.directive.ts index 8dc0f1fbc90..a1435a671ac 100644 --- a/lib/core/feature-flags/src/lib/directives/not-features.directive.ts +++ b/lib/core/feature-flags/src/lib/directives/not-features.directive.ts @@ -58,7 +58,7 @@ export class NotFeaturesDirective implements OnDestroy { } ngOnDestroy() { - this.destroy$.next(); + this.destroy$.next({}); this.destroy$.complete(); } } diff --git a/lib/core/src/lib/auth/guard/auth-guard-bpm.service.spec.ts b/lib/core/src/lib/auth/guard/auth-guard-bpm.service.spec.ts index 6022afa53b8..fa365b5609e 100644 --- a/lib/core/src/lib/auth/guard/auth-guard-bpm.service.spec.ts +++ b/lib/core/src/lib/auth/guard/auth-guard-bpm.service.spec.ts @@ -23,10 +23,10 @@ import { RouterStateSnapshot, Router } from '@angular/router'; import { MatDialog, MatDialogModule } from '@angular/material/dialog'; import { TranslateModule } from '@ngx-translate/core'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; -import { OidcAuthenticationService } from '../services/oidc-authentication.service'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RedirectAuthService } from '../oidc/redirect-auth.service'; import { EMPTY } from 'rxjs'; +import { OidcAuthenticationService } from '../oidc/oidc-authentication.service'; describe('AuthGuardService BPM', () => { let authGuard: AuthGuardBpm; diff --git a/lib/core/src/lib/auth/guard/auth-guard-ecm.service.spec.ts b/lib/core/src/lib/auth/guard/auth-guard-ecm.service.spec.ts index e0ec4d5de48..fc41edd864c 100644 --- a/lib/core/src/lib/auth/guard/auth-guard-ecm.service.spec.ts +++ b/lib/core/src/lib/auth/guard/auth-guard-ecm.service.spec.ts @@ -22,12 +22,12 @@ import { AuthenticationService } from '../services/authentication.service'; import { RouterStateSnapshot, Router } from '@angular/router'; import { MatDialog, MatDialogModule } from '@angular/material/dialog'; import { TranslateModule } from '@ngx-translate/core'; -import { OidcAuthenticationService } from '../services/oidc-authentication.service'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { RedirectAuthService } from '../oidc/redirect-auth.service'; import { EMPTY } from 'rxjs'; +import { OidcAuthenticationService } from '../oidc/oidc-authentication.service'; describe('AuthGuardService ECM', () => { let authGuard: AuthGuardEcm; diff --git a/lib/core/src/lib/auth/services/authentication.service.spec.ts b/lib/core/src/lib/auth/services/authentication.service.spec.ts index 2a0069e21bd..6272eb8302c 100644 --- a/lib/core/src/lib/auth/services/authentication.service.spec.ts +++ b/lib/core/src/lib/auth/services/authentication.service.spec.ts @@ -21,7 +21,6 @@ import { CookieService } from '../../common/services/cookie.service'; import { AppConfigService } from '../../app-config/app-config.service'; import { TranslateModule } from '@ngx-translate/core'; import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service'; -import { OidcAuthenticationService } from './oidc-authentication.service'; import { AuthModule } from '../oidc/auth.module'; import { HttpClientModule } from '@angular/common/http'; import { CookieServiceMock } from '../../mock'; @@ -39,11 +38,7 @@ describe('AuthenticationService', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot(), - AuthModule.forRoot({ useHash: true }), - HttpClientModule - ], + imports: [TranslateModule.forRoot(), AuthModule.forRoot({ useHash: true }), HttpClientModule], providers: [ { provide: CookieService, diff --git a/lib/core/src/lib/form/components/widgets/multiline-text/multiline-text.widget.spec.ts b/lib/core/src/lib/form/components/widgets/multiline-text/multiline-text.widget.spec.ts index 1b51bf8c163..84f5297ead5 100644 --- a/lib/core/src/lib/form/components/widgets/multiline-text/multiline-text.widget.spec.ts +++ b/lib/core/src/lib/form/components/widgets/multiline-text/multiline-text.widget.spec.ts @@ -17,8 +17,17 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; +import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { MatInputHarness } from '@angular/material/input/testing'; import { MatTooltipHarness } from '@angular/material/tooltip/testing'; +import { FormModel } from '../core/form.model'; +import { FormFieldModel } from '../core/form-field.model'; +import { FormFieldTypes } from '../core/form-field-types'; +import { MultilineTextWidgetComponentComponent } from './multiline-text.widget'; +import { ComponentFixture, getTestBed } from '@angular/core/testing'; +import { TranslateModule } from '@ngx-translate/core'; +import { TranslationService } from '../../../../translation/translation.service'; +import { TranslationMock } from '../../../../mock/translation.service.mock'; describe('MultilineTextWidgetComponentComponent', () => { let loader: HarnessLoader; @@ -27,10 +36,11 @@ describe('MultilineTextWidgetComponentComponent', () => { let element: HTMLElement; beforeEach(() => { - TestBed.configureTestingModule({ - imports: [CoreTestingModule] + getTestBed().configureTestingModule({ + imports: [TranslateModule.forRoot(), NoopAnimationsModule], + providers: [{ provide: TranslationService, useClass: TranslationMock }] }); - fixture = TestBed.createComponent(MultilineTextWidgetComponentComponent); + fixture = getTestBed().createComponent(MultilineTextWidgetComponentComponent); widget = fixture.componentInstance; element = fixture.nativeElement; loader = TestbedHarnessEnvironment.loader(fixture); diff --git a/lib/testing/package-lock.json b/lib/testing/package-lock.json index ec657b8e6bd..50a260e4679 100644 --- a/lib/testing/package-lock.json +++ b/lib/testing/package-lock.json @@ -9,17 +9,17 @@ "version": "6.9.0", "license": "Apache-2.0", "peerDependencies": { - "@alfresco/js-api": ">=7.5.0" + "@alfresco/js-api": ">=7.8.0" } }, "node_modules/@alfresco/js-api": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-7.5.0.tgz", - "integrity": "sha512-zDjqeEF5zX8DfnSAjM/e+uOf0PdVb67vDWF0Zv/lWjxtezerRdLW/P6BHjxqTscE1VAeGUdALzX5R7e+RZcHDw==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-7.8.0.tgz", + "integrity": "sha512-3y5WwtvsEkwAB3WaFC9Ec+QMzvPmZccJ7Em06lVBDwxtFgZ1F2CisVNepWgZLoCSkCH8Lgm6e4Tr0L93S3AmoQ==", "peer": true, "dependencies": { "event-emitter": "^0.3.5", - "superagent": "^8.0.9", + "superagent": "^9.0.1", "tslib": "^2.6.1" } }, @@ -36,14 +36,19 @@ "peer": true }, "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "peer": true, "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -62,10 +67,13 @@ } }, "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "peer": true + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/cookiejar": { "version": "2.1.4", @@ -101,17 +109,20 @@ } }, "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "peer": true, "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/delayed-stream": { @@ -133,6 +144,27 @@ "wrappy": "1" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "peer": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es5-ext": { "version": "0.10.63", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.63.tgz", @@ -237,15 +269,14 @@ } }, "node_modules/formidable": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz", - "integrity": "sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-3.5.1.tgz", + "integrity": "sha512-WJWKelbRHN41m5dumb0/k8TeAx7Id/y3a+Z7QfhxP/htI9Js5zYaEDtG8uMgG0vM0lOlqnmjE99/kfpOYi/0Og==", "peer": true, "dependencies": { "dezalgo": "^1.0.4", "hexoid": "^1.0.0", - "once": "^1.4.0", - "qs": "^6.11.0" + "once": "^1.4.0" }, "funding": { "url": "https://ko-fi.com/tunnckoCore/commissions" @@ -261,16 +292,20 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "peer": true, "dependencies": { + "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -288,21 +323,21 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "peer": true, "dependencies": { - "get-intrinsic": "^1.2.2" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "peer": true, "engines": { "node": ">= 0.4" @@ -324,9 +359,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "peer": true, "dependencies": { "function-bind": "^1.1.2" @@ -344,18 +379,6 @@ "node": ">=8" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "peer": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -429,12 +452,12 @@ } }, "node_modules/qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", + "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", "peer": true, "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -443,54 +466,45 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "peer": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "peer": true, "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "peer": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/superagent": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.1.2.tgz", - "integrity": "sha512-6WTxW1EB6yCxV5VFOIPQruWGHqc3yI7hEmZK6h+pyk69Lk/Ut7rLUY6W/ONF2MjBuGjvmMiIpsrVJ2vjrHlslA==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-9.0.2.tgz", + "integrity": "sha512-xuW7dzkUpcJq7QnhOsnNUgtYp3xRwpt2F7abdRYIpCsAt0hhUqia0EdxyXZQQpNmGtsCzYHryaKSV3q3GJnq7w==", "peer": true, "dependencies": { "component-emitter": "^1.3.0", @@ -498,14 +512,13 @@ "debug": "^4.3.4", "fast-safe-stringify": "^2.1.1", "form-data": "^4.0.0", - "formidable": "^2.1.2", + "formidable": "^3.5.1", "methods": "^1.1.2", "mime": "2.6.0", - "qs": "^6.11.0", - "semver": "^7.3.8" + "qs": "^6.11.0" }, "engines": { - "node": ">=6.4.0 <13 || >=14" + "node": ">=14.18.0" } }, "node_modules/tslib": { @@ -525,12 +538,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "peer": true - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "peer": true } } }