* MM-29039: unit and e2e tests for #4821
* add e2e test
* Apply suggestions from code review
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
* use suggested test libs
* move mock to test setup
* update snapshot for new mock
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>