feat: The Big One UI #47
@@ -27,13 +27,15 @@ describe('MonitoringPageComponents', () => {
|
||||
test('renders and sends gesture command', () => {
|
||||
render(<GestureControls />);
|
||||
|
||||
// Change selection
|
||||
fireEvent.change(screen.getByRole('combobox'), { target: { value: 'animations/Stand/Gestures/Thinking_8' } });
|
||||
fireEvent.change(screen.getByRole('combobox'), {
|
||||
target: { value: 'animations/Stand/Gestures/Hey_1' }
|
||||
});
|
||||
|
||||
// Click button
|
||||
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