Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.

Commit ce07b08

Browse files
tests(sidemenu): adding some test for display-type attribute
1 parent 9b7230e commit ce07b08

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

test/unit/angular/controller/sideMenuController.unit.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ describe('$ionicSideMenus controller', function() {
6969
expect(ctrl.right.isEnabled).toEqual(true);
7070
});
7171

72+
// Menu displayType
73+
it('should set displayType', function() {
74+
ctrl.left.setDisplayType('overlay');
75+
ctrl.right.setDisplayType('overlay');
76+
expect(ctrl.left.displayType).toEqual('overlay');
77+
expect(ctrl.right.displayType).toEqual('overlay');
78+
ctrl.left.setDisplayType('push');
79+
ctrl.right.setDisplayType('push');
80+
expect(ctrl.left.displayType).toEqual('push');
81+
expect(ctrl.right.displayType).toEqual('push');
82+
});
83+
7284
// Menu widths
7385
it('should init widths', function() {
7486
expect(ctrl.left.width).toEqual(270);

test/unit/views/sideMenu.unit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ describe('SideMenu', function() {
1212
it('Should init', function() {
1313
expect(menu.width).toEqual(270);
1414
expect(menu.isEnabled).toEqual(true);
15+
expect(menu.displayType).toEqual('push');
1516
});
1617
});

0 commit comments

Comments
 (0)