title: view doesn't load when I mock backend
body: <p>I'm trying to test one particular element of user interface. To do so I need particular request to my backend to respond with predefined data, but all other requests should pass through. Here's how I do it (coffee for more readability):</p>
  
  <pre><code>describe 'select2 combobox widget', ()-&gt;
    httpBackendMock = () -&gt;
       angular.module 'httpBackendMock', ['ngMockE2E', 'fmAppApp']
          .run ($httpBackend)-&gt;
              dummyCategories = [
                 {id: 1, name: 'foo', icon: '', user_id: 5},
                 {id: 2, name: 'bar', icon: '', user_id: 5},
                 {id: 3, name: 'baz', icon: '', user_id: 5},
                 {id: 4, name: 'quax', icon: '', user_id: 5}
              ]
  
              $httpBackend.whenGET '/api/categories'
                  .respond ()-&gt;
                      [200, dummyCategories]
              $httpBackend.whenGET /.*/
                  .passThrough()
              $httpBackend.whenGET /^\/views\//
                  .passThrough()
              $httpBackend.whenGET /^\/scripts\/.*/
                  .passThrough()
              $httpBackend.whenGET /^\/scripts\//
                  .passThrough()
              $httpBackend.whenGET /^\/bower_components\//
                  .passThrough()
              $httpBackend.whenGET(/\.html$/).passThrough()
  
    browser
       .addMockModule 'httpBackendMock', httpBackendMock
  </code></pre>
  
  <p>so basically what I do here is create new module on top of my application module <code>fmAppApp</code> and angular <code>ngMockE2E</code> and tell Protractor about it.</p>
  
  <p>And for the sake of completeness I'll show here one simple statement inside this <code>describe</code> block:</p>
  
  <pre><code>it 'should allow user to type in anything', ()-&gt;
      browser.get 'http://localhost:9000/#/'
      element By.model 'category.selected'
          .click()
      input = element By.css '.ui-select-search'
      input.sendKeys 'newtestcategory'
      expect input.getAttribute('value')
          .toBe 'newtestcategory'
  </code></pre>
  
  <p>when I run grunt protractor it opens browser, navigates to specified url (<code>http://localhost:9000/#/</code>) as it should and then I see blank page and spec failures with this error:
  <code>NoSuchElementError: No element found using locator: by.model("category.selected")</code></p>
  
  <p>Unfortunately this message is all I have since I can't open firebug and see what went wrong for obvious reasons. I guess I could redirect logging from browser console somehow and see what is root of evil here but I don't know how. Maybe someone encountered that as well and knows what it might be?
  Update:
  I did as Cétia below suggested and I got this message in logs:</p>
  
  <p><code>message: 'http://localhost:9000/bower_components/angular/angular.js 11607:24 Error: Unexpected request: POST /api/login</code></p>
  
  <p>Now why is that? Should I add 'api/login' to passThrough() ?</p>