refactor control panel tests