@@ -14,6 +14,7 @@ import { useHoldingsFromStorage } from '../../../../hooks';
1414
1515import MemberTenantHoldings from './MemberTenantHoldings' ;
1616
17+ jest . mock ( '../../../../hooks/useMemberTenantHoldings' , ( ) => ( ) => ( { holdings : [ { id : 'holdingId' } ] , isLoading : false } ) ) ;
1718jest . mock ( '@folio/stripes/core' , ( ) => ( {
1819 ...jest . requireActual ( '@folio/stripes/core' ) ,
1920 useUserTenantPermissions : jest . fn ( ) . mockReturnValue ( {
@@ -23,7 +24,6 @@ jest.mock('@folio/stripes/core', () => ({
2324} ) ) ;
2425jest . mock ( '../../../../hooks' , ( ) => ( {
2526 ...jest . requireActual ( '../../../../hooks' ) ,
26- useMemberTenantHoldings : jest . fn ( ) . mockReturnValue ( { holdings : [ { id : 'holdingId' } ] , isLoading : false } ) ,
2727 useHoldingsFromStorage : jest . fn ( ) ,
2828} ) ) ;
2929jest . mock ( '../../HoldingsList' , ( ) => ( ) => < > Holdings</ > ) ;
@@ -44,14 +44,14 @@ const mockMemberTenant = {
4444const accordionId = `${ mockMemberTenant . id } .${ instance . id } ` ;
4545
4646const userTenantFullPermissions = [ {
47- permissionName : 'ui-inventory.holdings.create' ,
48- subPermissions : [ 'test subPermission 1' ]
49- } , {
50- permissionName : 'ui-inventory.instance.view' ,
51- subPermissions : [ 'test subPermission 1' ]
52- } , {
53- permissionName : 'ui-inventory.item.create' ,
54- subPermissions : [ 'test subPermission 1' ]
47+ permissionName : 'ui-inventory.holdings.create' ,
48+ subPermissions : [ 'test subPermission 1' ]
49+ } , {
50+ permissionName : 'ui-inventory.instance.view' ,
51+ subPermissions : [ 'test subPermission 1' ]
52+ } , {
53+ permissionName : 'ui-inventory.item.create' ,
54+ subPermissions : [ 'test subPermission 1' ]
5555} ] ;
5656
5757const renderMemberTenantHoldings = ( ) => {
@@ -70,7 +70,7 @@ const renderMemberTenantHoldings = () => {
7070describe ( 'MemberTenantHoldings' , ( ) => {
7171 beforeEach ( ( ) => {
7272 useHoldingsFromStorage . mockClear ( ) . mockReturnValue (
73- [ { [ accordionId ] : true } , jest . fn ( ) ]
73+ [ { [ accordionId ] : true } , jest . fn ( ) ]
7474 ) ;
7575 } ) ;
7676
0 commit comments