|
@@ -138,7 +138,12 @@ describe('Actions', () => {
|
|
await userEvent.click(
|
|
await userEvent.click(
|
|
screen.getByRole('menuitem', { name: 'Restart Connector' })
|
|
screen.getByRole('menuitem', { name: 'Restart Connector' })
|
|
);
|
|
);
|
|
- expect(restartConnector).toHaveBeenCalledWith(ConnectorAction.RESTART);
|
|
|
|
|
|
+ expect(restartConnector).toHaveBeenCalledWith({
|
|
|
|
+ 'action': ConnectorAction.RESTART,
|
|
|
|
+ 'clusterName': 'myCluster',
|
|
|
|
+ 'connectName': 'myConnect',
|
|
|
|
+ "connectorName": 'myConnector'
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
it('calls restartAllTasks', async () => {
|
|
it('calls restartAllTasks', async () => {
|
|
@@ -152,7 +157,12 @@ describe('Actions', () => {
|
|
screen.getByRole('menuitem', { name: 'Restart All Tasks' })
|
|
screen.getByRole('menuitem', { name: 'Restart All Tasks' })
|
|
);
|
|
);
|
|
expect(restartAllTasks).toHaveBeenCalledWith(
|
|
expect(restartAllTasks).toHaveBeenCalledWith(
|
|
- ConnectorAction.RESTART_ALL_TASKS
|
|
|
|
|
|
+ {
|
|
|
|
+ 'action': ConnectorAction.RESTART_ALL_TASKS,
|
|
|
|
+ 'clusterName': 'myCluster',
|
|
|
|
+ 'connectName': 'myConnect',
|
|
|
|
+ "connectorName": 'myConnector'
|
|
|
|
+ }
|
|
);
|
|
);
|
|
});
|
|
});
|
|
|
|
|
|
@@ -167,7 +177,12 @@ describe('Actions', () => {
|
|
screen.getByRole('menuitem', { name: 'Restart Failed Tasks' })
|
|
screen.getByRole('menuitem', { name: 'Restart Failed Tasks' })
|
|
);
|
|
);
|
|
expect(restartFailedTasks).toHaveBeenCalledWith(
|
|
expect(restartFailedTasks).toHaveBeenCalledWith(
|
|
- ConnectorAction.RESTART_FAILED_TASKS
|
|
|
|
|
|
+ {
|
|
|
|
+ 'action': ConnectorAction.RESTART_FAILED_TASKS,
|
|
|
|
+ 'clusterName': 'myCluster',
|
|
|
|
+ 'connectName': 'myConnect',
|
|
|
|
+ "connectorName": 'myConnector'
|
|
|
|
+ }
|
|
);
|
|
);
|
|
});
|
|
});
|
|
|
|
|
|
@@ -178,8 +193,15 @@ describe('Actions', () => {
|
|
}));
|
|
}));
|
|
renderComponent();
|
|
renderComponent();
|
|
await afterClickRestartButton();
|
|
await afterClickRestartButton();
|
|
- await userEvent.click(screen.getByRole('menuitem', { name: 'Pause' }));
|
|
|
|
- expect(pauseConnector).toHaveBeenCalledWith(ConnectorAction.PAUSE);
|
|
|
|
|
|
+ await userEvent.click(screen.getByRole('menuitem', {name: 'Pause'}));
|
|
|
|
+ expect(pauseConnector).toHaveBeenCalledWith(
|
|
|
|
+ {
|
|
|
|
+ 'action': ConnectorAction.PAUSE,
|
|
|
|
+ 'clusterName': 'myCluster',
|
|
|
|
+ 'connectName': 'myConnect',
|
|
|
|
+ "connectorName": 'myConnector'
|
|
|
|
+ }
|
|
|
|
+ );
|
|
});
|
|
});
|
|
|
|
|
|
it('calls resumeConnector when resume button clicked', async () => {
|
|
it('calls resumeConnector when resume button clicked', async () => {
|
|
@@ -193,7 +215,14 @@ describe('Actions', () => {
|
|
renderComponent();
|
|
renderComponent();
|
|
await afterClickRestartButton();
|
|
await afterClickRestartButton();
|
|
await userEvent.click(screen.getByRole('menuitem', { name: 'Resume' }));
|
|
await userEvent.click(screen.getByRole('menuitem', { name: 'Resume' }));
|
|
- expect(resumeConnector).toHaveBeenCalledWith(ConnectorAction.RESUME);
|
|
|
|
|
|
+ expect(resumeConnector).toHaveBeenCalledWith(
|
|
|
|
+ {
|
|
|
|
+ 'action': ConnectorAction.RESUME,
|
|
|
|
+ 'clusterName': 'myCluster',
|
|
|
|
+ 'connectName': 'myConnect',
|
|
|
|
+ "connectorName": 'myConnector'
|
|
|
|
+ }
|
|
|
|
+ );
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|