title: When should we use .then with Protractor Promise?
body: <p>I've got many instability with Protractor, and I'm sure there is something I don't understand.
  Sometimes I need use the .then() when clicking on a button before continuing, sometimes it don't have any impact and I should not use .then() or the test failed.</p>
  
  <p>I wonder when should I use the .then() callback when testing in Protractor ?
  Example :</p>
  
  <pre><code>createAccountForm = $('#form-create-account');
  submitButton = createAccountForm.$('button[type=submit]');
  
  browser.wait(EC.elementToBeClickable(submitButton), 5000);
  submitButton.click(); // .then(function(){   &lt;-- uncomment in the .then form
  
  // find the confirmation message
  var message = $('.alert-success');
  browser.wait(EC.visibilityOf(message), 5000);
  log.debug('After visibilityOf');
  
  expect(message.isPresent()).to.be.eventually.true;
  // }); --&gt; uncomment when in .then form
  </code></pre>
  
  <p>When I use this form of test (without .then()) I see on browser that the <strong>click on the button is not done</strong>, the test continue with the following expect and then stop.</p>
  
  <p>If <strong>I use the .then() form, the click on the button is done</strong>, and the test continue without error.</p>
  
  <p>On other test, I don't need to use the then() callback when clicking on button.</p>
  
  <p>So , when should I use the .then() and when not ?</p>
  
  <p>Jean-Marc</p>