Fix tests: add_field_to_mappings to take a type parameter

Also make the dates valid for ES.