@@ -33,7 +33,9 @@ describe("DossierGradesCourseHeaderComponent", () => {
33
33
component . designation = "course 1" ;
34
34
fixture . detectChanges ( ) ;
35
35
36
- expect ( debugElement . nativeElement . textContent ) . toBe ( "course 1" ) ;
36
+ expect ( debugElement . nativeElement . textContent . replace ( "\n" , "" ) ) . toBe (
37
+ "course 1" ,
38
+ ) ;
37
39
} ) ;
38
40
39
41
it ( "should show designation and grade" , ( ) => {
@@ -44,15 +46,19 @@ describe("DossierGradesCourseHeaderComponent", () => {
44
46
] ) ;
45
47
fixture . detectChanges ( ) ;
46
48
47
- expect ( debugElement . nativeElement . textContent ) . toBe ( "course 2 (5.5)" ) ;
49
+ expect ( debugElement . nativeElement . textContent . replace ( "\n" , "" ) ) . toBe (
50
+ "course 2 (5.5)" ,
51
+ ) ;
48
52
} ) ;
49
53
50
54
it ( "should show designation and average" , ( ) => {
51
55
component . designation = "course 3" ;
52
56
component . average = 5.2555 ;
53
57
fixture . detectChanges ( ) ;
54
58
55
- expect ( debugElement . nativeElement . textContent ) . toBe ( "course 3 (5.256)" ) ;
59
+ expect ( debugElement . nativeElement . textContent . replace ( "\n" , "" ) ) . toBe (
60
+ "course 3 (5.256)" ,
61
+ ) ;
56
62
} ) ;
57
63
58
64
it ( "should show designation and only grade if both average and grade are set" , ( ) => {
@@ -64,14 +70,18 @@ describe("DossierGradesCourseHeaderComponent", () => {
64
70
] ) ;
65
71
fixture . detectChanges ( ) ;
66
72
67
- expect ( debugElement . nativeElement . textContent ) . toBe ( "course 4 (5.5)" ) ;
73
+ expect ( debugElement . nativeElement . textContent . replace ( "\n" , "" ) ) . toBe (
74
+ "course 4 (5.5)" ,
75
+ ) ;
68
76
} ) ;
69
77
70
78
it ( "should only show designation if average is 0" , ( ) => {
71
79
component . designation = "course 5" ;
72
80
component . average = 0 ;
73
81
74
82
fixture . detectChanges ( ) ;
75
- expect ( debugElement . nativeElement . textContent ) . toBe ( "course 5" ) ;
83
+ expect ( debugElement . nativeElement . textContent . replace ( "\n" , "" ) ) . toBe (
84
+ "course 5" ,
85
+ ) ;
76
86
} ) ;
77
87
} ) ;
0 commit comments