refactor cancel test to be more explicit and always set ui to correct state