title: Protractor test if modal is visible
body: <p>I am attempting to Protractor test whether a bootstrap modal window to confirm a records deletion is currently visible.</p>
  
  <p>The record to delete appears in an angular ng-repeat, so I have to activate the delete button from there. </p>
  
  <p>If I test for <code>isPresent</code> the test always passes true because it is looking in the DOM for the modal window, and it will always be there. However testing for <code>isDisplayed</code> always returns false when I expect true.</p>
  
  <p>Here's some code...</p>
  
  <pre><code>// Use the .all repeater to search the array of presented records
  element.all(by.repeater('entries in presentData')).then(function(presentData) {
      // get the first record and open the options menu
      presentData[0].element(by.css('.dropdown-toggle')).click();
      // In that first record click the delete button
      presentData[0].element(by.css('.delete-link')).click();
      browser.waitForAngular();
      // Remove the 'fade' class from the Bootstrap modal, I heard animations can cause some issues for testing
      browser.executeScript("$('.modal').removeClass('fade');");
      // Expect that the .modal-dialog is true
      expect(element(by.className('modal-dialog')).isDisplayed()).toBe(true);
  });
  </code></pre>
  
  <p>I have tried all kinds of combinations of various other stackoverflow and github questions, but nothing is working for me so far.</p>
  
  <p>Any light you might be able to shed would be much appreciated!</p>