Change case modes to Action attribute, add tests