Bläddra i källkod

fix unit tests

Olivier Massot 1 år sedan
förälder
incheckning
73594383c3

+ 22 - 4
tests/units/services/layout/menuBuilder/configurationMenuBuilder.test.ts

@@ -82,10 +82,18 @@ describe('build', () => {
     expect(menuBuilder.build()).toEqual({
       label: 'cmf_licence_generate',
       icon: undefined,
-      to: '/cmf_licence_structure',
-      type: MENU_LINK_TYPE.INTERNAL,
+      to: 'https://mydomain.com/#/licence_cmf/organization',
+      type: MENU_LINK_TYPE.V1,
       active: false,
     })
+    //
+    // expect(menuBuilder.build()).toEqual({
+    //   label: 'cmf_licence_generate',
+    //   icon: undefined,
+    //   to: '/cmf_licence_structure',
+    //   type: MENU_LINK_TYPE.INTERNAL,
+    //   active: false,
+    // })
   })
 
   test('has only rights for menu parameters', () => {
@@ -94,13 +102,23 @@ describe('build', () => {
         action === 'display' && subject === 'parameters_page',
     )
 
+    menuBuilder.organizationProfile.id = 123
+
     expect(menuBuilder.build()).toEqual({
       label: 'parameters',
       icon: undefined,
-      to: '/parameters',
-      type: MENU_LINK_TYPE.INTERNAL,
+      to: 'https://mydomain.com/#/main/edit/parameters/123',
+      type: MENU_LINK_TYPE.V1,
       active: false,
     })
+
+    // expect(menuBuilder.build()).toEqual({
+    //   label: 'parameters',
+    //   icon: undefined,
+    //   to: '/parameters',
+    //   type: MENU_LINK_TYPE.INTERNAL,
+    //   active: false,
+    // })
   })
 
   test('has only rights for menu place', () => {