Removed unused test
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
144a99510f
commit
ac0d17dd50
|
@ -1,43 +0,0 @@
|
||||||
import { describe, expect, it } from '@jest/globals';
|
|
||||||
import { useNavigation } from '../useNavigation';
|
|
||||||
const navigation = useNavigation();
|
|
||||||
|
|
||||||
describe('useNavigation', () => {
|
|
||||||
it('should return the routes for all modules', async () => {
|
|
||||||
expect(navigation.modules.value.length).toBeGreaterThan(1);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return a proper formated object without the children property', async () => {
|
|
||||||
const expectedMenuItem = {
|
|
||||||
stateName: 'Dashboard',
|
|
||||||
name: 'dashboard',
|
|
||||||
roles: [],
|
|
||||||
icon: 'dashboard',
|
|
||||||
title: 'dashboard'
|
|
||||||
}
|
|
||||||
|
|
||||||
const firstMenuItem = navigation.modules.value[0]
|
|
||||||
expect(firstMenuItem.children).toBeUndefined();
|
|
||||||
expect(firstMenuItem).toEqual(expect.objectContaining(expectedMenuItem));
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return a proper formated object with two child items', async () => {
|
|
||||||
const expectedMenuItem = [{
|
|
||||||
name: 'CustomerList',
|
|
||||||
title: 'list',
|
|
||||||
icon: 'view_list',
|
|
||||||
stateName: 'CustomerList'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'CustomerCreate',
|
|
||||||
title: 'createCustomer',
|
|
||||||
icon: 'vn:addperson',
|
|
||||||
stateName: 'CustomerCreate',
|
|
||||||
roles: ['developer']
|
|
||||||
}];
|
|
||||||
|
|
||||||
const secondMenuItem = navigation.modules.value[1]
|
|
||||||
expect(secondMenuItem.children).toEqual(expect.arrayContaining(expectedMenuItem));
|
|
||||||
expect(secondMenuItem.children.length).toEqual(2)
|
|
||||||
});
|
|
||||||
});
|
|
Loading…
Reference in New Issue