File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,6 @@ describe('CoreUI template', () => {
3232 button . click ( ) ;
3333 browser . sleep ( sleep ) ;
3434 expect ( body . getAttribute ( 'class' ) ) . not . toContain ( 'sidebar-minimized' ) ;
35- browser . driver . manage ( ) . window ( ) . setSize ( 600 , 800 ) ;
36- browser . sleep ( 1000 ) ;
3735 } ) ;
3836
3937 it ( 'should toggle `sidebar-show` body.class on `navbar-toggler` click' , ( ) => {
@@ -52,4 +50,19 @@ describe('CoreUI template', () => {
5250 browser . sleep ( sleep ) ;
5351 expect ( body . getAttribute ( 'class' ) ) . not . toContain ( 'sidebar-show' ) ;
5452 } ) ;
53+
54+ it ( 'should toggle `aside-menu-lg-show` body.class on `navbar-toggler` click' , ( ) => {
55+ browser . manage ( ) . window ( ) . maximize ( ) ;
56+ browser . sleep ( 1000 ) ;
57+ const body = page . getBody ( ) ;
58+ expect ( body . getAttribute ( 'class' ) ) . not . toContain ( 'aside-menu-lg-show' ) ;
59+ const button1 = page . getByCss ( '.navbar-toggler.d-none.d-lg-block' ) . last ( ) ;
60+ button1 . click ( ) ;
61+ browser . sleep ( sleep ) ;
62+ expect ( body . getAttribute ( 'class' ) ) . toContain ( 'aside-menu-lg-show' ) ;
63+ browser . sleep ( sleep ) ;
64+ button1 . click ( ) ;
65+ browser . sleep ( sleep ) ;
66+ expect ( body . getAttribute ( 'class' ) ) . not . toContain ( 'aside-menu-lg-show' ) ;
67+ } ) ;
5568} ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ describe('AppSidebarNavTitleComponent', () => {
1616 beforeEach ( ( ) => {
1717 fixture = TestBed . createComponent ( AppSidebarNavTitleComponent ) ;
1818 component = fixture . componentInstance ;
19- component . item = { } ;
19+ component . item = { title : true , name : 'title' } ;
2020 fixture . detectChanges ( ) ;
2121 } ) ;
2222
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ export const navItems: INavData[] = [
1010 text : 'NEW'
1111 }
1212 } ,
13+ {
14+ title : true ,
15+ name : 'Title'
16+ } ,
1317 {
1418 name : 'Disabled' ,
1519 url : '/dashboard' ,
You can’t perform that action at this time.
0 commit comments