Assert the form view has, or does not have, unsaved changes: the save and discard buttons of the control panel are shown while the record differs from what the server holds (.o_form_status_indicator_buttons).
Examples
Then the record should have unsaved changes
And the record should not have unsaved changes
Then the form should have unsaved changes
But the form should have unsaved changes
Then the form should not have unsaved changes
Pattern
Then(/^the (?:record|form) should( not)* have unsaved changes$/, …)
Part of @webship-js/odoo-steps (github.com/webship/odoo-steps), a step pack for Webship-js 2.0.x.