|
@@ -55,11 +55,13 @@ describe('Application life cycle test', function () {
|
|
|
});
|
|
|
|
|
|
function login(done) {
|
|
|
- browser.get('https://' + app.fqdn + '/wp-login.php');
|
|
|
- browser.findElement(by.id('user_login')).sendKeys(username);
|
|
|
- browser.findElement(by.id('user_pass')).sendKeys(password);
|
|
|
- browser.findElement(by.tagName('form')).submit();
|
|
|
- browser.wait(until.elementLocated(by.xpath('//h1[text()="Dashboard"]')), TIMEOUT).then(function () { done(); });
|
|
|
+ browser.get('https://' + app.fqdn + '/wp-login.php').then(function () {
|
|
|
+ browser.sleep(2000); // there seems to be some javascript that gives auto-focus to username
|
|
|
+ browser.findElement(by.id('user_login')).sendKeys(username);
|
|
|
+ browser.findElement(by.id('user_pass')).sendKeys(password);
|
|
|
+ browser.findElement(by.tagName('form')).submit();
|
|
|
+ browser.wait(until.elementLocated(by.xpath('//h1[text()="Dashboard"]')), TIMEOUT).then(function () { done(); });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
xit('build app', function () {
|