title: How To Find Elements By Id in Angular Directive Test
body: <p>I have a directive that renders the following html in a unit test:</p>
  
  <pre><code>&lt;div id="published-envs"&gt;
      &lt;strong&gt;Published to&lt;/strong&gt;
      &lt;!-- ngRepeat: env in fundConfigurationVersion.publicationEnvironments --&gt;&lt;div data-ng-repeat="env in fundConfigurationVersion.publicationEnvironments" class="ng-binding ng-scope"&gt;
              QA (Jan 29, 2015)
      &lt;/div&gt;&lt;!-- end ngRepeat: env in publicationEnvironments --&gt;&lt;div data-ng-repeat="env in publicationEnvironments" class="ng-binding ng-scope"&gt;
              PROD (Jan 30, 2015)
      &lt;/div&gt;&lt;!-- end ngRepeat: env in publicationEnvironments --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I am trying to get a hold of the <code>&lt;div id="published-envs"&gt;</code> and assert that it has two child <code>&lt;div&gt;</code>'s in it.</p>
  
  <p>I have tried the following but it does not work:
  <code>var environments = element.find('#published-envs'); //comes back empty</code></p>
  
  <p>What is the correct way to find elements by id in an angular unit test?</p>