@@ -510,31 +510,6 @@ describe('TimeEntriesComponent', () => {
510
510
expect ( cookieService . get ) . toHaveBeenCalledWith ( sentParameter ) ;
511
511
} ) ;
512
512
513
- it ( 'set false in isFeatureToggleCalendarActive when cookie does not exist' , ( ) => {
514
- spyOn ( cookieService , 'get' ) ;
515
-
516
- component . ngOnInit ( ) ;
517
-
518
- expect ( component . isFeatureToggleCalendarActive ) . toBeFalse ( ) ;
519
- } ) ;
520
-
521
- it ( 'set true in isFeatureToggleCalendarActive when cookiesService.get() return true' , ( ) => {
522
- const cookieResponseValue = 'true' ;
523
- spyOn ( cookieService , 'get' ) . and . returnValue ( cookieResponseValue ) ;
524
-
525
- component . ngOnInit ( ) ;
526
-
527
- expect ( component . isFeatureToggleCalendarActive ) . toBeTrue ( ) ;
528
- } ) ;
529
-
530
- it ( 'set false in isFeatureToggleCalendarActive when cookiesService.get() return false' , ( ) => {
531
- const cookieResponseValue = 'false' ;
532
- spyOn ( cookieService , 'get' ) . and . returnValue ( cookieResponseValue ) ;
533
-
534
- component . ngOnInit ( ) ;
535
-
536
- expect ( component . isFeatureToggleCalendarActive ) . toBeFalse ( ) ;
537
- } ) ;
538
513
539
514
it ( 'set true in displayGridView when its initial value is false and call onDisplayModeChange' , ( ) => {
540
515
const expectedValue = true ;
@@ -644,51 +619,6 @@ describe('TimeEntriesComponent', () => {
644
619
expect ( component . calendarView ) . toBe ( CalendarView . Month ) ;
645
620
} ) ;
646
621
647
- it ( 'not view button onDisplayModeChange when isFeatureToggleCalendarActive is false' , ( ) => {
648
- component . isFeatureToggleCalendarActive = false ;
649
-
650
- fixture . detectChanges ( ) ;
651
-
652
- const HTMLTimeEntriesDebugElement : DebugElement = fixture . debugElement ;
653
- const HTMLTimeEntriesElement : HTMLElement = HTMLTimeEntriesDebugElement . nativeElement ;
654
- const HTMLTimeEntriesButton = HTMLTimeEntriesElement . querySelector ( '.btn.btn-primary.float-right' ) ;
655
- expect ( HTMLTimeEntriesButton ) . toBeNull ( ) ;
656
- } ) ;
657
-
658
- it ( 'view list button when displayGridView is true and isFeatureToggleCalendarActive is true' , ( ) => {
659
- const expectedIconInsideButton = '.fa-list' ;
660
- const unexpectedIconInsideButton = '.fa-th' ;
661
- component . isFeatureToggleCalendarActive = true ;
662
- component . displayGridView = true ;
663
-
664
- fixture . detectChanges ( ) ;
665
-
666
- const HTMLTimeEntriesDebugElement : DebugElement = fixture . debugElement ;
667
- const HTMLTimeEntriesElement : HTMLElement = HTMLTimeEntriesDebugElement . nativeElement ;
668
- const HTMLTimeEntriesButton = HTMLTimeEntriesElement . querySelector ( '.btn.btn-primary.float-right' ) ;
669
- const HTMLExpectedChildButton = HTMLTimeEntriesButton . querySelector ( expectedIconInsideButton ) ;
670
- const HTMLUnexpectedChildButton = HTMLTimeEntriesButton . querySelector ( unexpectedIconInsideButton ) ;
671
- expect ( HTMLExpectedChildButton ) . not . toBeNull ( ) ;
672
- expect ( HTMLUnexpectedChildButton ) . toBeNull ( ) ;
673
- } ) ;
674
-
675
- it ( 'view calendar button when displayGridView is false and isFeatureToggleCalendarActive is true' , ( ) => {
676
- const expectedIconInsideButton = '.fa-th' ;
677
- const unexpectedIconInsideButton = '.fa-list' ;
678
- component . isFeatureToggleCalendarActive = true ;
679
- component . displayGridView = false ;
680
-
681
- fixture . detectChanges ( ) ;
682
-
683
- const HTMLTimeEntriesDebugElement : DebugElement = fixture . debugElement ;
684
- const HTMLTimeEntriesElement : HTMLElement = HTMLTimeEntriesDebugElement . nativeElement ;
685
- const HTMLTimeEntriesButton = HTMLTimeEntriesElement . querySelector ( '.btn.btn-primary.float-right' ) ;
686
- const HTMLExpectedChildButton = HTMLTimeEntriesButton . querySelector ( expectedIconInsideButton ) ;
687
- const HTMLUnexpectedChildButton = HTMLTimeEntriesButton . querySelector ( unexpectedIconInsideButton ) ;
688
- expect ( HTMLExpectedChildButton ) . not . toBeNull ( ) ;
689
- expect ( HTMLUnexpectedChildButton ) . toBeNull ( ) ;
690
- } ) ;
691
-
692
622
it ( 'view calendarView when displayGridView is true' , ( ) => {
693
623
const expectedView = '#gridView' ;
694
624
component . displayGridView = true ;
0 commit comments