chore: gesture test updated
This commit is contained in:
@@ -27,13 +27,15 @@ describe('MonitoringPageComponents', () => {
|
|||||||
test('renders and sends gesture command', () => {
|
test('renders and sends gesture command', () => {
|
||||||
render(<GestureControls />);
|
render(<GestureControls />);
|
||||||
|
|
||||||
// Change selection
|
fireEvent.change(screen.getByRole('combobox'), {
|
||||||
fireEvent.change(screen.getByRole('combobox'), { target: { value: 'animations/Stand/Gestures/Thinking_8' } });
|
target: { value: 'animations/Stand/Gestures/Hey_1' }
|
||||||
|
});
|
||||||
|
|
||||||
// Click button
|
// Click button
|
||||||
fireEvent.click(screen.getByText('Actuate'));
|
fireEvent.click(screen.getByText('Actuate'));
|
||||||
|
|
||||||
expect(MonitoringAPI.sendAPICall).toHaveBeenCalledWith('gesture', 'animations/Stand/Gestures/Thinking_8');
|
// Expect the API to be called with that new value
|
||||||
|
expect(MonitoringAPI.sendAPICall).toHaveBeenCalledWith('gesture', 'animations/Stand/Gestures/Hey_1');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user