TST: Test for groupby transform on categorical column
Added test for groupby transform on categorical column

- [x] closes #29037 
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
