Spaces context tests

WIP
#4793