<hs-details-item ng-repeat="item in amenities" style="overflow:hidden" class="ng-scope">
<hs-label class="ng-binding">Pepsi</hs-label>
<hs-value-block>
<hs>
<hs-spin ng-class="{'disabled': isAmenityPosting}" spin- ontrol="{changeCallback:setQuantity, value: item.quantity, min:0, params: item.amenity_id, title:'Quantity'}"><span class="disabled">-</span><span>+</span>
<!--<span hs-placeholder="0" localize="{data: item.quantity > 0 ? item.quantity:null, format: 'int', operation:'text'}"></span>-->
<span localize="{data: item.quantity, format: 'int', operation:'text'}">0</span>
</hs-spin>
</hs>
</hs-value-block>
</hs-details-item>
Scenario: I need to click on a spin which is a “+” button that increments numbers every time it is clicked. Challenge: There are 10 spins for different items. How can I uniquely identify the code to click on the correct spin? While the names of the items (water, Pepsi,...) are unique, they do not correspond to the specific spins being clicked. Any suggestions on how this can be achieved using Protractor? The following snippet of code demonstrates how the number of Pepsi is incremented when the spin is clicked. However, selecting the element with the "'+'" button does not provide anything unique:
<hs-spin ng-class="{'disabled': isAmenityPosting}" spin-control="{changeCallback:setQuantity, value: item.quantity, min:0, params: item.amenity_id, title:'Quantity'}"><