From ea00b8e5411507a9a1aad5b5dd3b7630028b14a4 Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Thu, 24 Mar 2022 13:31:18 +0530 Subject: [PATCH] mgr/dashboard: fix "NullInjectorError: No provider for I18n Although I am not sure what's the root cause of this but this seems to fix the test failure. I don't know if this is caused by the differnce in angular versions between master and octopus but I still don't understand why it didn't catch in the recent PR to this file (https://github.com/ceph/ceph/pull/44763) Fixes: https://tracker.ceph.com/issues/55011 Signed-off-by: Nizamudeen A --- .../pwd-expiration-notification.component.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/pwd-expiration-notification/pwd-expiration-notification.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/pwd-expiration-notification/pwd-expiration-notification.component.spec.ts index fee50e43c4d0..9761a4122312 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/pwd-expiration-notification/pwd-expiration-notification.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/pwd-expiration-notification/pwd-expiration-notification.component.spec.ts @@ -8,7 +8,7 @@ import { of as observableOf } from 'rxjs'; import { AlertModule } from 'ngx-bootstrap/alert'; -import { configureTestBed } from '../../../../testing/unit-test-helper'; +import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper'; import { SettingsService } from '../../api/settings.service'; import { AlertPanelComponent } from '../../components/alert-panel/alert-panel.component'; @@ -38,7 +38,7 @@ describe('PwdExpirationNotificationComponent', () => { HttpClientTestingModule, RouterTestingModule.withRoutes(routes) ], - providers: [SettingsService, AuthStorageService] + providers: [SettingsService, AuthStorageService, i18nProviders] }); describe('password expiration date has been set', () => { -- 2.47.3