title: expect is throwing an "AssertionError: expected { Object (browser_, then, ...) } to equal true"
body: <p>I have an error with the expect on my tests</p>
  
  <p>I'm getting this error</p>
  
  <pre><code>[08:41:37] E/launcher - expected { Object (browser_, then, ...) } to equal true
  [08:41:37] E/launcher - AssertionError: expected { Object (browser_, then, ...) } to equal true
      at role.element.getText.then (/Users/jburquez/akamai/ConsoleUI/tests/e2e/console_bdd/steps/manage_agents_steps.js:114:109)
      at elementArrayFinder_.then (/Users/jburquez/akamai/ConsoleUI/node_modules/protractor/built/element.js:804:32)
      at ManagedPromise.invokeCallback_ (/Users/jburquez/akamai/ConsoleUI/node_modules/selenium-webdriver/lib/promise.js:1376:14)
      at TaskQueue.execute_ (/Users/jburquez/akamai/ConsoleUI/node_modules/selenium-webdriver/lib/promise.js:3084:14)
      at TaskQueue.executeNext_ (/Users/jburquez/akamai/ConsoleUI/node_modules/selenium-webdriver/lib/promise.js:3067:27)
      at asyncRun (/Users/jburquez/akamai/ConsoleUI/node_modules/selenium-webdriver/lib/promise.js:2927:27)
      at /Users/jburquez/akamai/ConsoleUI/node_modules/selenium-webdriver/lib/promise.js:668:7
      at process._tickCallback (internal/process/next_tick.js:68:7)
  [08:41:37] E/launcher - Process exited with error code 199
  [08:41:37] '&lt;anonymous&gt;' errored after 1.42 min
  [08:41:37] Error in plugin "gulp-protractor"
  Message:
      protractor exited with code 199
  Details:
      domain: [object Object]
      domainThrown: true
  </code></pre>
  
  <p>And this is my code on the step</p>
  
  <pre><code>  Then('Validate role {editrole} is selected', { timeout:30 * 1000 }, (editrole) =&gt; {
      var agentRoles = element.all(by.repeater('ctrl.roles'));
      agentRoles.each((role) =&gt; {
        return role.element(by.xpath(".//div[@class='md-whiteframe-1dp outset inset']/md-checkbox")).getText()
        .then((roleSelected) =&gt; {
          if (editrole === roleSelected) {
            expect(element(".//div[@class='md-whiteframe-1dp outset inset']/md-checkbox").isSelected()).to.be.equal(true);
          }
        });
      });
    });
  </code></pre>
  
  <p>What i'm trying to do is verify if an element is checked so reading another suggestions I saw that <code>.isSelected()</code> is the best option for this, but i'm not sure why is throwing this error.</p>
  
  <p>Hope you can help me!!</p>