While writing a test for an Angular app using Protractor, I encountered several issues with handling spinners. I managed to solve some of them, but I'm unsure how to test spinners that are hidden by a wrapper. For instance, when the parent tag has ng-if or ng-hide statements and the spinner's dimensions are greater than 0.
spinner.isDisplayed();
browser.wait(EC.visibilityOf(spinner), 5000);
Here are some HTML examples (the parent tag may vary):
<div class="some purent div">
<div class="spinner-loader small-loader ng-hide" ng-show="expression"> </div>
</div>
:::
<div class="container">
<div class="spinner-loader spinner-dark" ng-if="if_statement"></div>
</div>
:::
<div ng-show='exp'>
...
<div>
...
<div class='spinner'></div>
</div>
</div>
Unfortunately, my attempts have been unsuccessful. I would appreciate any assistance. Thank you!