From: Nizamudeen A Date: Thu, 24 Mar 2022 08:01:18 +0000 (+0530) Subject: mgr/dashboard: fix "NullInjectorError: No provider for I18n X-Git-Tag: v15.2.17~100^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F45613%2Fhead;p=ceph.git 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 --- 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', () => {