Project

General

Profile

Cleanup #45536

mgr/dashboard: Remove warning from unit tests

Added by Tiago Melo almost 4 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Testing & QA
Target version:
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

Currently the following warnings are shown:

 console.warn
    Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?

      at Console.Object.<anonymous>.Console.warn (../packages/core/src/console.ts:20:13)
      at Router.Object.<anonymous>.Router.navigateByUrl (../packages/router/src/router.ts:1012:20)
      at Router.Object.<anonymous>.Router.navigate (../packages/router/src/router.ts:1052:17)
      at SafeSubscriber._next (src/app/shared/api/auth.service.ts:44:19)
      at SafeSubscriber.Object.<anonymous>.SafeSubscriber.__tryOrUnsub (node_modules/rxjs/src/internal/Subscriber.ts:265:10)
      at SafeSubscriber.Object.<anonymous>.SafeSubscriber.next (node_modules/rxjs/src/internal/Subscriber.ts:207:14)
      at Subscriber.Object.<anonymous>.Subscriber._next (node_modules/rxjs/src/internal/Subscriber.ts:139:22)

  console.warn
    Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
    Arguments: 
    [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: abc, _f: undefined, _strict: undefined, _locale: [object Object]
    Error: 
        at Function.createFromInputFallback (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/moment/moment.js:320:98)
        at configFromString (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/moment/moment.js:2385:15)
        at configFromInput (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/moment/moment.js:2611:13)
        at prepareConfig (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/moment/moment.js:2594:13)
        at createFromConfig (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/moment/moment.js:2561:44)
        at createLocalOrUTC (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/moment/moment.js:2648:16)
        at createLocal (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/moment/moment.js:2652:16)
        at Moment.isAfter (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/moment/moment.js:3206:52)
        at /ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.ts:165:36
        at Array.forEach (<anonymous>)
        at RbdTrashListComponent.Object.<anonymous>.RbdTrashListComponent.prepareResponse (/ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.ts:164:12)
        at /ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.spec.ts:142:17
        at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/zone.js/dist/zone.js:386:30)
        at ProxyZoneSpec.Object.<anonymous>.ProxyZoneSpec.onInvoke (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/zone.js/dist/proxy.js:117:43)
        at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/zone.js/dist/zone.js:385:36)
        at Zone.Object.<anonymous>.Zone.run (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/zone.js/dist/zone.js:143:47)
        at Object.wrappedFunc (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/jest-preset-angular/build/zone-patch/index.js:49:30)
        at Object.asyncJestTest (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:100:37)
        at /ceph/src/pybind/mgr/dashboard/frontend/node_modules/jest-jasmine2/build/queueRunner.js:45:12
        at new Promise (<anonymous>)
        at mapper (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/jest-jasmine2/build/queueRunner.js:28:19)
        at /ceph/src/pybind/mgr/dashboard/frontend/node_modules/jest-jasmine2/build/queueRunner.js:75:41
        at processTicksAndRejections (internal/process/task_queues.js:97:5)

      at warn (node_modules/moment/moment.js:293:21)
      at Function.createFromInputFallback (node_modules/moment/moment.js:320:17)
      at configFromString (node_modules/moment/moment.js:2385:15)
      at configFromInput (node_modules/moment/moment.js:2611:13)
      at prepareConfig (node_modules/moment/moment.js:2594:13)
      at createFromConfig (node_modules/moment/moment.js:2561:44)
      at createLocalOrUTC (node_modules/moment/moment.js:2648:16)

History

#1 Updated by Kiefer Chang almost 4 years ago

  • Pull request ID set to 35052

#2 Updated by Lenz Grimmer almost 4 years ago

  • Status changed from Fix Under Review to Resolved
  • Target version set to v16.0.0

#3 Updated by Ernesto Puerta almost 3 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 151 to Testing & QA

Also available in: Atom PDF