-
Notifications
You must be signed in to change notification settings - Fork 2.7k
MM-20078: Migrate 'components/admin_console/radio_setting.jsx' and associated tests to TypeScript #4202
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @allenlai18 👍
Would you be open to adding tests for your PR please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @allenlai18!
@lindy65 Yes. I would be open. What test are you talking about though? |
Hi @allenlai18 :) Thanks, In the title it mentions 'associated tests' so I'm not sure whether any unit tests existed already? If they do, then it would be converting them to TypeScript. If none exist, it would mean writing unit tests for this PR... |
@allenlai18 you can base your tests in other similar files in the same directory, for example |
@lindy65 @jespino :) Gotcha, so there is exists a unit test for radio_setting.tsx but it's for the one in /widgets/settings/ . I migrated the one in admin_console. They both have the exact same component name and filename. Would it be better to rename them? I will write unit test for admin_console RadioSetting |
Thanks @allenlai18, appreciated 👍 I'll defer to @jespino for your question on renaming... |
I don't think so, one of the is a widget that is design to be generally used (but is only used in one place for now) and the other is scoped to the admin console, I think we can keep both as they are. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now looks good to me. Thanks @allenlai18! 🎉
@jespino I do not have much experience in writing unit test. please let me know if there are any suggestions or things that I could have done better! -- |
@allenlai18 yes, you had to add it, thanks |
Merged! thanks @allenlai18! 🎉 |
Summary
Migrate 'components/admin_console/radio_setting.jsx' and associated tests to TypeScript
Ticket Link
https://mattermost.atlassian.net/browse/MM-20078