Test the fact selector

This is a port of existing tests of the former FactSelector now using
Jasmine and the new application architecture.