My test:
it(\'should allow login\', function() {
browser.get(\'index.html\');
$(\'#username\').sendKeys(\'administrator\');
$(\'#password\').sendKeys(\'pa
$('#logout')
is a WebElement. isElementPresent
takes a locator, like by.css
$('#username').sendKeys('administrator');
$('#password').sendKeys('password');
$('#login').click();
var logout = by.css('#logout');
browser.wait(function() { return $p.isElementPresent(logout); }, 8000);
expect($p.isElementPresent(logout)).toBeTruthy();