Skip to content

Commit d5cc5ab

Browse files
committed
test: minor updates e2e, unit
1 parent 0d8d6b7 commit d5cc5ab

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

e2e/src/app.e2e-spec.ts

+15-2
Original file line numberDiff line numberDiff 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
});

projects/coreui/angular/src/lib/sidebar/app-sidebar-nav/app-sidebar-nav-title.component.spec.ts

+1-1
Original file line numberDiff line numberDiff 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

src/app/_nav.ts

+4
Original file line numberDiff line numberDiff 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',

0 commit comments

Comments
 (0)