Skip to content

Commit 71b0933

Browse files
author
Edgar Guaman
committed
fix: TT-331 Creating unit test for toggleSidebar method
1 parent e198c22 commit 71b0933

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/app/modules/shared/components/sidebar/sidebar.component.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ describe('SidebarComponent', () => {
8686
});
8787
});
8888

89+
it('should toggle the sidebar', () => {
90+
component.toggleSideBar();
91+
fixture.detectChanges();
92+
const sidebarElement = fixture.debugElement.nativeElement.querySelector('#wrapper');
93+
expect(sidebarElement.classList.contains('toggled')).toBeTrue();
94+
});
95+
8996
it('should use the Azure service on logout', () => {
9097
spyOn(azureAdB2CServiceStubInjected, 'logout');
9198
component.logout();

0 commit comments

Comments
 (0)