title: How to handle spinners using protractor if spinner hidden by wrapper
body: <p>During writing test for Angular app using Protractor, I faced a lot of problem related to handling spinners, some of then I solved, but I don't know how to test spinners which hidden by wrapper, for example if parent tag have ng-if, or ng-hide statements, and spinner has a height and width that is greater than 0.
  I have tried to use: </p>
  
  <pre><code>spinner.isDisplayed();
  browser.wait(EC.visibilityOf(spinner), 5000); 
  </code></pre>
  
  <p>HTML examples (parent tag could be different):</p>
  
  <pre><code> &lt;div class="some purent div"&gt;
   &lt;div class="spinner-loader small-loader ng-hide" ng-show="expression"&gt;  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>:::</p>
  
  <pre><code>&lt;div class="container"&gt;
        &lt;div class="spinner-loader spinner-dark" ng-if="if_statement"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>:::</p>
  
  <pre><code>&lt;div ng-show='exp'&gt;
  ...
   &lt;div&gt;
  ...
    &lt;div class='spinner'&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>but it's hasn't worked. Please help...!</p>