Assert the contact form shows, or does not show, an error after it was submitted: the fields it refuses are marked (.o_has_error) and a message appears next to the button. An optional field name checks that this field is one of the refused ones.
Examples
Then I should see a contact form error
And I should not see a contact form error
Then we should see an contact form error
And I should see a contact form error on "Email"
Then we should see a contact us form error on "Question"
Pattern
Then(/^(I |we )*should( not)* see an? contact(?: us)? form error(?: on "([^"]*)")?$/, …)
Part of @webship-js/odoo-steps (github.com/webship/odoo-steps), a step pack for Webship-js 2.0.x.