Refactor grade view tests