From 0b3c3d48d9584037e3b858301127b6910207ab74 Mon Sep 17 00:00:00 2001 From: Nicolas Agustin Guevara Pihen Date: Thu, 12 Dec 2024 12:05:35 -0300 Subject: [PATCH] Update test --- .../components/common/tables/table-wz-api.test.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/main/public/components/common/tables/table-wz-api.test.tsx b/plugins/main/public/components/common/tables/table-wz-api.test.tsx index b6b98e5dde..00715188d1 100644 --- a/plugins/main/public/components/common/tables/table-wz-api.test.tsx +++ b/plugins/main/public/components/common/tables/table-wz-api.test.tsx @@ -15,6 +15,12 @@ import React from 'react'; import { mount } from 'enzyme'; import { TableWzAPI } from './table-wz-api'; +import { useAppConfig, useStateStorage } from '../hooks'; + +jest.mock('../hooks', () => ({ + useAppConfig: jest.fn(), + useStateStorage: jest.fn(), +})); jest.mock('../../../kibana-services', () => ({ getHttp: () => ({ @@ -64,6 +70,13 @@ const columns = [ describe('Table WZ API component', () => { it('renders correctly to match the snapshot', () => { + (useAppConfig as jest.Mock).mockReturnValue({ + data: { + 'reports.csv.maxRows': 10000, + }, + }); + (useStateStorage as jest.Mock).mockReturnValue([[], jest.fn()]); + const wrapper = mount(