title: Using Protractor 'Expect'
body: <p>I have some simple specs that run in sequence. The first one has an <code>expect</code> assertion for the webpage title - as does the second.</p>
  
  <p>However, when I run the sequence, the first assertion passes but the second one fails and console.log shows that parts of the first spec's <code>expect</code> have become merged with the second spec's <code>expect</code>.</p>
  
  <p>I have a feeling this is something to do with <em>promise</em>...please can someone confirm this (or deny it!!) and advise on a way to close the promise?</p>
  
  <p>Thanks</p>
  
  <p><strong>First Spec</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>describe('JL Homepage', function() {
  //browser.waitForAngularEnabled(false);
  browser.get('https://mwac-johnlewis-dev.digitalbridge.eu/landing');
  
   browser.sleep(10000);
  
  
  it('should have a title', function(){
  expect (browser.getTitle()).toBe('John Lewis Wallpaper Visualiser: 
  Welcome');
  });
  
  });
  </code></pre>
  
  <p><strong>Second Spec</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>describe('Demo photo', function() {
  browser.waitForAngularEnabled(false);
  
  
  browser.sleep(3000);
  element(by.xpath('html/body/webapp-app/div/div/webapp-johnlewis-landing/div/div/ul/li[2]/a/span')).click();
  
  it('should load a demo room', function(){
  
      expect (browser.getTitle()).toEqual('John Lewis Wallpaper Visualiser: Design your room');
  
  browser.sleep(3000);
  });
  
  });
  </code></pre>
  
  <p><strong>Console</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>2 specs, 1 failure
  Finished in 19.409 seconds
  
  
  **************************************************
  *                    Failures                    *
  **************************************************
  
  1) Demo photo should load a demo room
    - Expected 'John Lewis Wallpaper Visualiser: Welcome' to equal 'John 
    Lewis Wallpaper Visualiser: Design your room'.
  
  Executed 2 of 2 specs (1 FAILED) in 19 secs.
  [12:08:21] I/launcher - 0 instance(s) of WebDriver still running
  [12:08:21] I/launcher - chrome #01 failed 1 test(s)
  [12:08:21] I/launcher - overall: 1 failed spec(s)
  [12:08:21] E/launcher - Process exited with error code 1
  Admins-MacBook:jl_autotests davidredmayne$ 
  </code></pre>