test(sorting): improve tests for sorting and fix dynamic sort in hub-edit