|
|
@@ -1,5 +1,4 @@
|
|
|
-
|
|
|
-import { describe, test, it, expect } from 'vitest'
|
|
|
+import {describe, expect, test} from 'vitest'
|
|
|
import {RuntimeConfig} from "@nuxt/schema";
|
|
|
import {AnyAbility} from "@casl/ability/dist/types";
|
|
|
import {AccessProfile, organizationState} from "~/types/interfaces";
|
|
|
@@ -42,7 +41,7 @@ describe('build', () => {
|
|
|
expect(result.label).toEqual('stats')
|
|
|
expect(result.icon).toEqual({name: 'fas fa-chart-bar'})
|
|
|
// @ts-ignore
|
|
|
- expect(result.children.length).toEqual(5)
|
|
|
+ expect(result.children.length).toEqual(4)
|
|
|
})
|
|
|
|
|
|
test('has no items', () => {
|
|
|
@@ -78,12 +77,4 @@ describe('build', () => {
|
|
|
{label: 'fede_stats', icon: {name: 'fas fa-chart-bar'}, to: 'https://mydomain.com/#/statistic/membersfedeonly', type: MENU_LINK_TYPE.V1, active: false}
|
|
|
)
|
|
|
})
|
|
|
-
|
|
|
- test('has only rights for menu structure_stats', () => {
|
|
|
- ability.can = vi.fn((action: string, subject: string) => action === 'display' && subject === 'structure_stats_page')
|
|
|
-
|
|
|
- expect(menuBuilder.build()).toEqual(
|
|
|
- {label: 'structure_stats', icon: {name: 'fas fa-chart-bar'}, to: 'https://mydomain.com/#/statistic/membersfedeassos', type: MENU_LINK_TYPE.V1, active: false}
|
|
|
- )
|
|
|
- })
|
|
|
})
|