|
@@ -74,7 +74,7 @@ describe('Application life cycle test', function () {
|
|
}).then(function () {
|
|
}).then(function () {
|
|
return browser.sleep(3000);
|
|
return browser.sleep(3000);
|
|
}).then(function () {
|
|
}).then(function () {
|
|
- return browser.findElement(by.xpath('//button[text()="OK"]')).click();
|
|
|
|
|
|
+ return browser.findElement(by.xpath('//button[text()="Confirm"]')).click();
|
|
}).then(function () {
|
|
}).then(function () {
|
|
return browser.sleep(30000); // wait 30secs for reload
|
|
return browser.sleep(30000); // wait 30secs for reload
|
|
}).then(function () {
|
|
}).then(function () {
|
|
@@ -109,21 +109,23 @@ describe('Application life cycle test', function () {
|
|
|
|
|
|
function uploadImage(done) {
|
|
function uploadImage(done) {
|
|
browser.get('https://' + app.fqdn + '/user/admin/edit');
|
|
browser.get('https://' + app.fqdn + '/user/admin/edit');
|
|
- browser.findElement(by.xpath('//a[text()="Change Picture"]')).click().then(function () {
|
|
|
|
- return browser.sleep(4000);
|
|
|
|
- }).then(function () {
|
|
|
|
- return browser.findElement(by.xpath('//span[contains(text(), "Upload New Picture")]')).click();
|
|
|
|
- }).then(function () {
|
|
|
|
- return browser.sleep(4000);
|
|
|
|
- }).then(function () {
|
|
|
|
- return browser.findElement(by.xpath('//input[@type="file"]')).sendKeys(path.resolve(__dirname, '../logo.png'));
|
|
|
|
- }).then(function () {
|
|
|
|
- browser.sleep(3000);
|
|
|
|
- }).then(function () {
|
|
|
|
- return browser.findElement(by.id('fileUploadSubmitBtn')).click();
|
|
|
|
- }).then(function () {
|
|
|
|
- browser.sleep(3000).then(function () { done(); });
|
|
|
|
- });
|
|
|
|
|
|
+ browser.wait(until.elementLocated(by.xpath('//a[text()="Change Picture"]')), TEST_TIMEOUT.then(function () {
|
|
|
|
+ browser.findElement(by.xpath('//a[text()="Change Picture"]')).click().then(function () {
|
|
|
|
+ return browser.sleep(4000);
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return browser.findElement(by.xpath('//span[contains(text(), "Upload New Picture")]')).click();
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return browser.sleep(4000);
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return browser.findElement(by.xpath('//input[@type="file"]')).sendKeys(path.resolve(__dirname, '../logo.png'));
|
|
|
|
+ }).then(function () {
|
|
|
|
+ browser.sleep(3000);
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return browser.findElement(by.id('fileUploadSubmitBtn')).click();
|
|
|
|
+ }).then(function () {
|
|
|
|
+ browser.sleep(3000).then(function () { done(); });
|
|
|
|
+ });
|
|
|
|
+ }));
|
|
}
|
|
}
|
|
|
|
|
|
function checkImage(done) {
|
|
function checkImage(done) {
|