title: Protractor does not runnnig correctly as Jenkins Job
body: <p>I'm trying to run my Protractor test on a Jenkins server. But I get every time following error message:</p>
  <blockquote>
  <p>TypeError: Cannot read property 'visibilityOf' of undefined</p>
  <blockquote>
  <p>Stacktrace:
  TypeError: Cannot read property 'visibilityOf' of undefined at waitingForElement
  (/var/lib/jenkins/jobs/workspace/project/dist/dev/scripts/test/e2e/helper.e2e.js:9:20)
  at Object.switchTab (/var/lib/jenkins/jobs/workspace/project/dist/dev/scripts/test/e2e/helper.e2e.js:135:5)
  at null.
  (/var/lib/jenkins/jobs/workspace/project/dist/dev/scripts/test/e2e/test-employee.e2e.js:87</p>
  </blockquote>
  </blockquote>
  <p>This is the respective code:</p>
  <pre><code>function waitingForElement(elem, timeOut) { 
      var EC = protractor.ExpectedConditions;
      browser.wait(EC.visibilityOf(elem), timeOut);
      ....    
  }
  </code></pre>
  <p>And at the top line line I have a reference to the angular-protractor typings:</p>
  <pre><code>/// &lt;reference path=&quot;../../../../typings_custom/angular-protractor/index.d.ts&quot; /&gt;
  </code></pre>
  <p>And this is my Jenkins configuration:</p>
  <pre><code>echo &quot;build tests&quot;
  npm run build.e2e   
  #Run protractor
  protractor protractor-config.js --params.url &quot;http://localhost:90&quot; --suite testSuite
  </code></pre>
  <p>But when I'm runnig the Protractor test locally or in a server terminal then they are working, but not as Jenkins job.</p>
  <p>Any ideas?</p>