Angular2 e2e test case with protractor throwing error
<p>I have created my app with <a href="https://github.com/AngularClass/angular2-webpack-starter" rel="nofollow">angular2-webpack-starter</a> and i have used <a href="http://socket.io" rel="nofollow">socket.io</a> with it. I have created one common service to create socket connection and listen its method. this service is used and initialized after user is logged in. When app is running and i execute test case for login, i am checking url with below code :</p>

<pre><code>browser.getCurrentUrl().then((url) =&gt; {
    expect(url).toEqual('/dashboard');    
});
</code></pre>

<p>The issue is when socket is connected its throwing error 'Timed out waiting for Protractor to synchronize with the page after 15 seconds' and if socket is not connected same test case is running without any error.</p>