|
@@ -41,7 +41,7 @@ describe('build', () => {
|
|
|
expect(result.label).toEqual('billing')
|
|
expect(result.label).toEqual('billing')
|
|
|
expect(result.icon).toEqual({name: 'fas fa-euro-sign'})
|
|
expect(result.icon).toEqual({name: 'fas fa-euro-sign'})
|
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
|
- expect(result.children.length).toEqual(8)
|
|
|
|
|
|
|
+ expect(result.children.length).toEqual(9)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
test('has no items', () => {
|
|
test('has no items', () => {
|
|
@@ -112,4 +112,12 @@ describe('build', () => {
|
|
|
{label: 'jvs_export', icon: {name: 'fas fa-align-justify'}, to: 'https://mydomain.com/#/jvs/list/', type: MENU_LINK_TYPE.V1, active: false}
|
|
{label: 'jvs_export', icon: {name: 'fas fa-align-justify'}, to: 'https://mydomain.com/#/jvs/list/', type: MENU_LINK_TYPE.V1, active: false}
|
|
|
)
|
|
)
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+ test('has only rights for menu afi_export', () => {
|
|
|
|
|
+ ability.can = vi.fn((action: string, subject: string) => action === 'display' && subject === 'afi_page')
|
|
|
|
|
+
|
|
|
|
|
+ expect(menuBuilder.build()).toEqual(
|
|
|
|
|
+ {label: 'afi_export', icon: {name: 'fas fa-align-justify'}, to: 'https://mydomain.com/#/afis/list/', type: MENU_LINK_TYPE.V1, active: false}
|
|
|
|
|
+ )
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|