title: protractor testing angular 2 and click event
body: <p>I m building an angular 2 application and I need some informations concerning unit tests with protractor.</p>
  
  <p>In fact, with angular 1, we were able to make some stuff like :</p>
  
  <pre><code>element(by.css('[ng-click="myFunction()"]'))
  </code></pre>
  
  <p>in our tests to validate the fact that we have an ng-click attribute on the current page.</p>
  
  <p>I've tried the following with angular 2 :</p>
  
  <pre><code>element(by.css('[(click)="alert(\'test\')"]'))
  </code></pre>
  
  <p>But it doesn't seems to work.</p>
  
  <p>Any body knows how can I test the fact that I have a clic event with angular 2 and protractor ?</p>
  
  <p>EDIT : Here's the HTML I m using in my HomeComponent.html file :</p>
  
  <pre><code>&lt;button (click)="alert('test')"&gt;Hello&lt;/button&gt;
  </code></pre>
  
  <p>Thanks for your help</p>