mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-04 03:43:34 +00:00 
			
		
		
		
	Chore: Update settings / users list page mocks
This commit is contained in:
		
							parent
							
								
									93808aca54
								
							
						
					
					
						commit
						cef2366c34
					
				@ -11,14 +11,10 @@ import Theme from '../../../../../../components/Theme';
 | 
			
		||||
import ThemeToggleProvider from '../../../../../../components/ThemeToggleProvider';
 | 
			
		||||
import ListPage from '../index';
 | 
			
		||||
 | 
			
		||||
jest.mock('@strapi/helper-plugin', () => ({
 | 
			
		||||
  ...jest.requireActual('@strapi/helper-plugin'),
 | 
			
		||||
  getFetchClient: jest.fn(() => ({
 | 
			
		||||
    get: jest.fn().mockReturnValue({
 | 
			
		||||
      data: {
 | 
			
		||||
        data: {
 | 
			
		||||
          pagination: { page: 1, pageSize: 10, pageCount: 2, total: 2 },
 | 
			
		||||
          results: [
 | 
			
		||||
jest.mock('../../../../../../hooks/useAdminUsers', () => ({
 | 
			
		||||
  __esModule: true,
 | 
			
		||||
  useAdminUsers: jest.fn().mockReturnValue({
 | 
			
		||||
    users: [
 | 
			
		||||
      {
 | 
			
		||||
        email: 'soup@strapi.io',
 | 
			
		||||
        firstname: 'soup',
 | 
			
		||||
@ -50,11 +46,14 @@ jest.mock('@strapi/helper-plugin', () => ({
 | 
			
		||||
        ],
 | 
			
		||||
      },
 | 
			
		||||
    ],
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    pagination: { page: 1, pageSize: 10, pageCount: 2, total: 2 },
 | 
			
		||||
    isLoading: false,
 | 
			
		||||
    isError: false,
 | 
			
		||||
  }),
 | 
			
		||||
    put: jest.fn(),
 | 
			
		||||
  })),
 | 
			
		||||
}));
 | 
			
		||||
 | 
			
		||||
jest.mock('@strapi/helper-plugin', () => ({
 | 
			
		||||
  ...jest.requireActual('@strapi/helper-plugin'),
 | 
			
		||||
  useNotification: jest.fn(),
 | 
			
		||||
  useFocusWhenNavigate: jest.fn(),
 | 
			
		||||
  useRBAC: jest.fn(() => ({
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user