OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

feat: disable settings while task is running

Open Sparkier opened this issue 1 year ago • 3 comments

Sparkier avatar Apr 22 '24 19:04 Sparkier

@Sparkier In SettingsForm.test.tsx, line 12, you can change the render(...) method with the renderWithProviders(...) method from test-utils to resolve the errors thrown during testing. You can do the same for the individual render methods in SettingsModal.test.tsx (note you can also to change the mock path on line 14 to #/services/settingsService or ../../../services/settingsService too since it wasn't updated from the recent import path update)

The renderWithProviders method is a modified render method I have setup that renders the component with the Redux providers for these kind of scenarios.

Also, if you are able to add new it.todo("...") test cases in the relevant files so that I or someone else can take a look and try to add the test for it, it would be helpful.

E.g., it.todo("should disable settings while task is running") in the SettingsForm.test.tsx and any others regarding disabling/tooltip in the AutocompleteCombobox.test.tsx file.

amanape avatar Apr 22 '24 20:04 amanape

I tried pushing the changes to this branch myself, but I am not entirely familiar with how branch sharing works on GitHub (I work on BitBucket)

amanape avatar Apr 22 '24 20:04 amanape

@Sparkier In SettingsForm.test.tsx, line 12, you can change the render(...) method with the renderWithProviders(...) method from test-utils to resolve the errors thrown during testing. You can do the same for the individual render methods in SettingsModal.test.tsx (note you can also to change the mock path on line 14 to #/services/settingsService or ../../../services/settingsService too since it wasn't updated from the recent import path update)

The renderWithProviders method is a modified render method I have setup that renders the component with the Redux providers for these kind of scenarios.

Also, if you are able to add new it.todo("...") test cases in the relevant files so that I or someone else can take a look and try to add the test for it, it would be helpful.

E.g., it.todo("should disable settings while task is running") in the SettingsForm.test.tsx and any others regarding disabling/tooltip in the AutocompleteCombobox.test.tsx file.

Thank you for the reminder! I can also put some time into the tests myself just probably not right now.

Sparkier avatar Apr 22 '24 21:04 Sparkier

Thanks!

rbren avatar Apr 23 '24 21:04 rbren