Write tests for the workspace switcher block

@dickolsson I can't understand what is the problem with the actual implementation, please add more details.