@@ -7,6 +7,8 @@ import { ActivatedRoute } from '@angular/router';
77import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap' ;
88import { TranslateModule } from '@ngx-translate/core' ;
99
10+ import { APP_CONFIG } from '../../../config/app-config.interface' ;
11+ import { environment } from '../../../environments/environment.test' ;
1012import { buildPaginatedList } from '../../core/data/paginated-list.model' ;
1113import { SearchService } from '../../core/shared/search/search.service' ;
1214import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils' ;
@@ -28,9 +30,89 @@ describe('AdminNotifyDashboardComponent', () => {
2830 let searchResult3 ;
2931 let results ;
3032
31- const mockBoxes = [
32- { title : 'admin-notify-dashboard.received-ldn' , boxes : [ undefined , undefined , undefined , undefined , undefined ] } ,
33- { title : 'admin-notify-dashboard.generated-ldn' , boxes : [ undefined , undefined , undefined , undefined , undefined ] } ,
33+ const mockBoxes = [
34+ {
35+ title : 'admin-notify-dashboard.received-ldn' ,
36+ boxes : [
37+ {
38+ color : '#B8DAFF' ,
39+ title : 'admin-notify-dashboard.NOTIFY.incoming.accepted' ,
40+ config : 'NOTIFY.incoming.accepted' ,
41+ description : 'admin-notify-dashboard.NOTIFY.incoming.accepted.description' ,
42+ count : undefined ,
43+ } ,
44+ {
45+ color : '#D4EDDA' ,
46+ title : 'admin-notify-dashboard.NOTIFY.incoming.processed' ,
47+ config : 'NOTIFY.incoming.processed' ,
48+ description : 'admin-notify-dashboard.NOTIFY.incoming.processed.description' ,
49+ count : undefined ,
50+ } ,
51+ {
52+ color : '#FDBBC7' ,
53+ title : 'admin-notify-dashboard.NOTIFY.incoming.failure' ,
54+ config : 'NOTIFY.incoming.failure' ,
55+ description : 'admin-notify-dashboard.NOTIFY.incoming.failure.description' ,
56+ count : undefined ,
57+ } ,
58+ {
59+ color : '#FDBBC7' ,
60+ title : 'admin-notify-dashboard.NOTIFY.incoming.untrusted' ,
61+ config : 'NOTIFY.incoming.untrusted' ,
62+ description : 'admin-notify-dashboard.NOTIFY.incoming.untrusted.description' ,
63+ count : undefined ,
64+ } ,
65+ {
66+ color : '#43515F' ,
67+ title : 'admin-notify-dashboard.NOTIFY.incoming.involvedItems' ,
68+ textColor : '#fff' ,
69+ config : 'NOTIFY.incoming.involvedItems' ,
70+ description : 'admin-notify-dashboard.NOTIFY.incoming.involvedItems.description' ,
71+ count : undefined ,
72+ } ,
73+ ] ,
74+ } ,
75+ {
76+ title : 'admin-notify-dashboard.generated-ldn' ,
77+ boxes : [
78+ {
79+ color : '#D4EDDA' ,
80+ title : 'admin-notify-dashboard.NOTIFY.outgoing.delivered' ,
81+ config : 'NOTIFY.outgoing.delivered' ,
82+ description : 'admin-notify-dashboard.NOTIFY.outgoing.delivered.description' ,
83+ count : undefined ,
84+ } ,
85+ {
86+ color : '#B8DAFF' ,
87+ title : 'admin-notify-dashboard.NOTIFY.outgoing.queued' ,
88+ config : 'NOTIFY.outgoing.queued' ,
89+ description : 'admin-notify-dashboard.NOTIFY.outgoing.queued.description' ,
90+ count : undefined ,
91+ } ,
92+ {
93+ color : '#FDEEBB' ,
94+ title : 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry' ,
95+ config : 'NOTIFY.outgoing.queued_for_retry' ,
96+ description : 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry.description' ,
97+ count : undefined ,
98+ } ,
99+ {
100+ color : '#FDBBC7' ,
101+ title : 'admin-notify-dashboard.NOTIFY.outgoing.failure' ,
102+ config : 'NOTIFY.outgoing.failure' ,
103+ description : 'admin-notify-dashboard.NOTIFY.outgoing.failure.description' ,
104+ count : undefined ,
105+ } ,
106+ {
107+ color : '#43515F' ,
108+ title : 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems' ,
109+ textColor : '#fff' ,
110+ config : 'NOTIFY.outgoing.involvedItems' ,
111+ description : 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems.description' ,
112+ count : undefined ,
113+ } ,
114+ ] ,
115+ } ,
34116 ] ;
35117
36118 beforeEach ( async ( ) => {
@@ -45,6 +127,7 @@ describe('AdminNotifyDashboardComponent', () => {
45127 await TestBed . configureTestingModule ( {
46128 imports : [ TranslateModule . forRoot ( ) , NgbNavModule , AdminNotifyDashboardComponent ] ,
47129 providers : [
130+ { provide : APP_CONFIG , useValue : environment } ,
48131 { provide : SearchService , useValue : { search : ( ) => createSuccessfulRemoteDataObject$ ( results ) } } ,
49132 { provide : ActivatedRoute , useValue : new ActivatedRouteStub ( ) } ,
50133 ] ,
0 commit comments