Selectors can now filter by item type, by test

Actions now have to be passed a test object, so that actions with
selectors can use the tests as filters.