Discard the changes of the form view with the discard button of the control panel (.o_form_button_cancel). A new record that was never saved is dropped and the previous view comes back.
Examples
When I discard the changes
When we discard the changes
And I discard the record
When we discard the record
And we discard the changes of the record
Pattern
When(/^(I |we )*discard the (?:record|changes(?: of the record)?)$/, …)
Part of @webship-js/odoo-steps (github.com/webship/odoo-steps), a step pack for Webship-js 2.0.x.