This commit is contained in:
parent
132cfef4e9
commit
bae70e24f8
|
@ -2,16 +2,18 @@ import './left-menu.js';
|
||||||
|
|
||||||
describe('Component vnLeftMenu', () => {
|
describe('Component vnLeftMenu', () => {
|
||||||
let controller;
|
let controller;
|
||||||
|
let $element;
|
||||||
|
|
||||||
beforeEach(angular.mock.module('salix', $translateProvider => {
|
beforeEach(angular.mock.module('salix', $translateProvider => {
|
||||||
$translateProvider.translations('en', {});
|
$translateProvider.translations('en', {});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(angular.mock.inject(($componentController, $state, $window) => {
|
beforeEach(angular.mock.inject(($componentController, $state, $window) => {
|
||||||
|
$element = angular.element('<div></div>');
|
||||||
$state.current.name = 'client.card.summary';
|
$state.current.name = 'client.card.summary';
|
||||||
$state.current.data = {moduleIndex: 0};
|
$state.current.data = {moduleIndex: 0};
|
||||||
$window.routes = [{menu: []}];
|
$window.routes = [{menu: []}];
|
||||||
controller = $componentController('vnLeftMenu', {$state, $window});
|
controller = $componentController('vnLeftMenu', {$state, $window, $element});
|
||||||
controller.items = [
|
controller.items = [
|
||||||
{description: 'Client', state: 'client', icon: null, childs: []},
|
{description: 'Client', state: 'client', icon: null, childs: []},
|
||||||
{description: 'Client', state: 'client.card', icon: null, childs: []},
|
{description: 'Client', state: 'client.card', icon: null, childs: []},
|
||||||
|
|
Loading…
Reference in New Issue