add a check that the Cancel button works correctly

Change-Id: Iba1da45e6bd0f7b81a731473143ad2f41175dfa5