Handle `collapsed` class on triggers even when manually invoked

Fixes #13636.
Yeah, that's what I was thinking at first too but the whole unit test is about this group not having an ID but a class.