Skip to content

Commit b21d04e

Browse files
committed
fix missing resetConnectorOffsets mock in frontend unit tests
1 parent a36bc20 commit b21d04e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

frontend/src/components/Connect/Details/Actions/__tests__/Actions.spec.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function setConnectorStatus(con: Connector, state: ConnectorState) {
2323

2424
const mockHistoryPush = jest.fn();
2525
const deleteConnector = jest.fn();
26+
const resetConnectorOffsets = jest.fn();
2627
const cancelMock = jest.fn();
2728

2829
jest.mock('react-router-dom', () => ({
@@ -34,6 +35,7 @@ jest.mock('lib/hooks/api/kafkaConnect', () => ({
3435
useConnector: jest.fn(),
3536
useDeleteConnector: jest.fn(),
3637
useUpdateConnectorState: jest.fn(),
38+
useResetConnectorOffsets: jest.fn(),
3739
}));
3840

3941
const expectActionButtonsExists = () => {
@@ -56,6 +58,7 @@ describe('Actions', () => {
5658
mockHistoryPush.mockClear();
5759
deleteConnector.mockClear();
5860
cancelMock.mockClear();
61+
resetConnectorOffsets.mockClear();
5962
});
6063

6164
describe('view', () => {

frontend/src/components/Connect/List/__tests__/List.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jest.mock('lib/hooks/api/kafkaConnect', () => ({
2727
useConnectors: jest.fn(),
2828
useDeleteConnector: jest.fn(),
2929
useUpdateConnectorState: jest.fn(),
30+
useResetConnectorOffsets: jest.fn(),
3031
}));
3132

3233
const clusterName = 'local';

0 commit comments

Comments
 (0)