Including a regression test for https://github.com/vector-im/vector-web/issues/1314
The karma tests don't pass yet, and aren't ready to land on develop. This reverts commit 438453e61a, reversing changes made to 50f94eb040.
438453e61a
50f94eb040