user3482804 user3482804 - 1 year ago 96
Javascript Question

How to check change in class name using protractor

Need to test change in class name after particular action is performed.
In my application , after a button is pressed the footer progress bar shows progress .

the only change in footer code is change in class name . following is the code snippet:


<i class="fa fa-check-circle pull-left" ng-class="{processComplete : sent}"></i>

After process is complete:

<i class="fa fa-check-circle pull-left processComplete" ng-class="{processComplete : sent}"></i>

How to test the change in class name using protractor?


You can check that an element with processComplete class is present:


Or, you can check that a particular element has processComplete class:


// perform some action