title: How do I write my protractor scenarios to assert on http response errors?
body: <p>I'm using protractor to test my angular client (server is built using Python Google App Engine).</p>
  
  <p>I would like my protractor test to have an assertion on the http response from a POST that is triggered by clicking on a form button... like so:</p>
  
  <pre><code>  describe('Pointless Form Post Test', function() {
    beforeEach(function() {
        browser.get('/myform'); 
    });
  
    it('should successfully populate a form, post it, and not return error', function() {
        element(by.model('form_summary')).sendKeys('Some input text');
        element(by.model('form_details')).sendKeys('Lots of detailed text');
        element(by.id('formBtn')).click();
                --&gt; SOME FORM OF ASSERTION FOR HTTP 500 ERROR RESPONSE &lt;
    })
  });
  </code></pre>
  
  <p>How do I assert on the response from the server that is received after clicking the button?</p>
  
  <p>NOTE:  I have this sneaking suspicion I don't have the right understanding of the scope of E2E testing that protractor is meant to address... but this feels like something I would need for my E2E testing.  I was writing a test against my POST handler and noticed the server was sending back 500 errors (a bug in the server).  Was hoping protractor could be used to catch these issues.</p>