lathonez / clicker

Ionic 2 + @angular/cli Seed Project : Angular2 + Typescript + Karma + Protractor + Travis
http://lathonez.com/2018/ionic-2-unit-testing/
MIT License
430 stars 137 forks source link

Ionic clicks in collection-view #196

Closed valburyakov closed 7 years ago

valburyakov commented 7 years ago

Hello, i've tried to setup e2e testing in our ionic2/angulr2 project by this example. And i faced the problem that click or tap doesn't work with collection-view items: let product = element(by.cssContainingText('.product-item', 'Produktserien')); product.click() or browser.touchActions().tap(product).perform() And i have to set browser.ignoreSynchronization = true because with it protractor begin to hang. Even with sleeps and waitForClickable it won't work. Mb someone faced with the same issue and is there some workaround?

<collection-view-page class="ion-page show-page" style="z-index: 116;">
...
<inventory ng-reflect-products-list="" ng-reflect-categories-list="[object Object],[object Object],[object Object],[object Object]"><div class="inventory-wrapper">
  <div class="scroll">
    <categories-tree ng-reflect-categories-list="[object Object],[object Object],[object Object],[object Object]"><div class="products-holder">
  <!--template bindings={
  "ng-reflect-ng-for-of": "[object Object],[object Object],[object Object],[object Object]"
}-->
<!--template bindings={}-->
<div class="product-item" [ng-reflect-ng-style="[object](url) Object]" style="touch-action: pan-y; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); order: 0;">
      <div class="img-holder" ng-reflect-ng-style="[object Object]" style="background-color: rgb(156, 203, 129);">
        <!--template bindings={
            "ng-reflect-ng-if": null
            }-->
        <p class="item-placeholder">Produktserien</p>
        <span class="first-bg" ng-reflect-ng-style="[object Object]" style="background-color: rgb(156, 203, 129);"></span>
        <span class="second-bg" ng-reflect-ng-style="[object Object]" style="background-color: rgb(156, 203, 129);"></span>
      </div>
      <p class="item-name"><span>Produktserien</span></p>
</div>
...
lathonez commented 7 years ago

See #191