@@ -55,25 +55,25 @@ describe('services/AvatarService', () => {
55
55
} ) ;
56
56
57
57
it ( 'should handle color that does not exist in uilib' , ( ) => {
58
- expect ( uut . getColorTint ( '#F1BE0B' , 10 ) ) . toEqual ( '#b28c08 ' ) ;
59
- expect ( uut . getColorTint ( '#F1BE0B' , 20 ) ) . toEqual ( '#ca9f09 ' ) ;
60
- expect ( uut . getColorTint ( '#F1BE0B' , 30 ) ) . toEqual ( '#F1BE0B ' ) ;
61
- expect ( uut . getColorTint ( '#F1BE0B' , 40 ) ) . toEqual ( '#f5d04d' ) ;
62
- expect ( uut . getColorTint ( '#F1BE0B' , 50 ) ) . toEqual ( '#f9e291' ) ;
63
- expect ( uut . getColorTint ( '#F1BE0B' , 60 ) ) . toEqual ( '#fbedbb' ) ;
64
- expect ( uut . getColorTint ( '#F1BE0B' , 70 ) ) . toEqual ( '#fdf4d6' ) ;
65
- expect ( uut . getColorTint ( '#F1BE0B' , 80 ) ) . toEqual ( '#fef9e7' ) ;
58
+ expect ( uut . getColorTint ( '#F1BE0B' , 10 ) . toLowerCase ( ) ) . toEqual ( '#d2a50a ' ) ;
59
+ expect ( uut . getColorTint ( '#F1BE0B' , 20 ) . toLowerCase ( ) ) . toEqual ( '#deaf0a ' ) ;
60
+ expect ( uut . getColorTint ( '#F1BE0B' , 30 ) . toLowerCase ( ) ) . toEqual ( '#f1be0b ' ) ;
61
+ expect ( uut . getColorTint ( '#F1BE0B' , 40 ) . toLowerCase ( ) ) . toEqual ( '#f5d04d' ) ;
62
+ expect ( uut . getColorTint ( '#F1BE0B' , 50 ) . toLowerCase ( ) ) . toEqual ( '#f9e291' ) ;
63
+ expect ( uut . getColorTint ( '#F1BE0B' , 60 ) . toLowerCase ( ) ) . toEqual ( '#fbedbb' ) ;
64
+ expect ( uut . getColorTint ( '#F1BE0B' , 70 ) . toLowerCase ( ) ) . toEqual ( '#fdf4d6' ) ;
65
+ expect ( uut . getColorTint ( '#F1BE0B' , 80 ) . toLowerCase ( ) ) . toEqual ( '#fef9e7' ) ;
66
66
} ) ;
67
67
68
68
it ( 'should round down tint level to the nearest one' , ( ) => {
69
- expect ( uut . getColorTint ( '#F1BE0B' , 75 ) ) . toEqual ( '#fdf4d6' ) ;
70
- expect ( uut . getColorTint ( '#F1BE0B' , 25 ) ) . toEqual ( '#ca9f09 ' ) ;
71
- expect ( uut . getColorTint ( '#F1BE0B' , 35 ) ) . toEqual ( '#F1BE0B ' ) ;
69
+ expect ( uut . getColorTint ( '#F1BE0B' , 75 ) . toLowerCase ( ) ) . toEqual ( '#fdf4d6' ) ;
70
+ expect ( uut . getColorTint ( '#F1BE0B' , 25 ) . toLowerCase ( ) ) . toEqual ( '#deaf0a ' ) ;
71
+ expect ( uut . getColorTint ( '#F1BE0B' , 35 ) . toLowerCase ( ) ) . toEqual ( '#f1be0b ' ) ;
72
72
} ) ;
73
73
74
74
it ( 'should handle out of range tint levels and round them to the nearest one in range' , ( ) => {
75
- expect ( uut . getColorTint ( '#F1BE0B' , 3 ) ) . toEqual ( '#b28c08 ' ) ;
76
- expect ( uut . getColorTint ( '#F1BE0B' , 95 ) ) . toEqual ( '#fef9e7' ) ;
75
+ expect ( uut . getColorTint ( '#F1BE0B' , 3 ) . toLowerCase ( ) ) . toEqual ( '#d2a50a ' ) ;
76
+ expect ( uut . getColorTint ( '#F1BE0B' , 95 ) . toLowerCase ( ) ) . toEqual ( '#fef9e7' ) ;
77
77
} ) ;
78
78
} ) ;
79
79
} ) ;
0 commit comments