title: Why does browser.wait seem to work even with a wait time of 0?
body: <p>I have the following code: </p>
  
  <pre><code>const until = protractor.ExpectedConditions;
  export class GenericPOClass {
      waitForPagetoLoad(numberOfSecondsToWait: number = 30) { // note the default
          (1) let elementToWaitFor = element(by.css('app-spec-mapper .stepper'));
          (2) browser.wait(until.presenceOf(elementToWaitFor), numberOfSecondsToWait*1000);
          (3) return expect(elementToWaitFor.isPresent()).toBeTruthy('Element stepper is not actually present.');
      }
  }
  </code></pre>
  
  <p>This is code called from a protractor/jasmine test to wait for my non-angular web page to load. </p>
  
  <p>If I use all 3 lines, with a "default wait time of 30 seconds, I make it past this loading part of my test and move onto another section. </p>
  
  <p>If I use just lines 1 &amp; 3, I get the expectation error.  </p>
  
  <p>If I use line 2 as well with a number of seconds to wait of 0, it works anyway. The page is loaded, line 3 passes.  </p>
  
  <p><strong><em>Is there some type of default wait time on browser.wait that overrides my wait time? Is there some freaky magic of asynchronicity that it works if observed (browser.wait calling the expected conditions is magic)?</em></strong> </p>
  
  <p>Coming from a synchronous Java and TestNG background, I've been learning protractor and JavaScript as I go, writing automated test cases for my job and things like this without a formal class or knowledgeable person to ask keep tripping me up.  I've been wrangling with getting waiting for things to load working for a week, please help me understand this black magic. </p>
  
  <p>Protractor Version: 5.1.2<br>
  NodeJS: 6.11.2<br>
  IDE: IntelliJ WebStorm</p>