|
@@ -37,7 +37,7 @@ describe('Application life cycle test', function () {
|
|
});
|
|
});
|
|
|
|
|
|
var LOCATION = 'test';
|
|
var LOCATION = 'test';
|
|
- var TEST_TIMEOUT = parseInt(process.env.TEST_TIMEOUT, 10) || 20000;
|
|
|
|
|
|
+ var TEST_TIMEOUT = 30000;
|
|
var app;
|
|
var app;
|
|
var email, token;
|
|
var email, token;
|
|
|
|
|
|
@@ -59,7 +59,6 @@ describe('Application life cycle test', function () {
|
|
|
|
|
|
function checkMailPlugin(done) {
|
|
function checkMailPlugin(done) {
|
|
browser.get('https://' + app.fqdn + '/admin/emailers/local');
|
|
browser.get('https://' + app.fqdn + '/admin/emailers/local');
|
|
- browser.sleep(4000);
|
|
|
|
browser.wait(until.elementLocated(by.id('host')), TEST_TIMEOUT).then(function () {
|
|
browser.wait(until.elementLocated(by.id('host')), TEST_TIMEOUT).then(function () {
|
|
browser.findElement(by.id('host')).getAttribute('value').then(function (val) {
|
|
browser.findElement(by.id('host')).getAttribute('value').then(function (val) {
|
|
if (val !== 'mail') return done(new Error('Incorrect mail server value: ' + val));
|
|
if (val !== 'mail') return done(new Error('Incorrect mail server value: ' + val));
|
|
@@ -96,24 +95,24 @@ describe('Application life cycle test', function () {
|
|
}).then(function () {
|
|
}).then(function () {
|
|
return browser.findElement(by.xpath('//li[@id="nodebb-plugin-beep"]//button[@data-action="toggleActive"]')).click(); // activate the plugin
|
|
return browser.findElement(by.xpath('//li[@id="nodebb-plugin-beep"]//button[@data-action="toggleActive"]')).click(); // activate the plugin
|
|
}).then(function () {
|
|
}).then(function () {
|
|
- browser.sleep(10000).then(function() { done(); }); // wait for the action to succeed
|
|
|
|
|
|
+ browser.sleep(20000).then(function() { done(); }); // wait for the action to succeed
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
function listCustomPlugin(done) {
|
|
function listCustomPlugin(done) {
|
|
browser.get('https://' + app.fqdn + '/admin/extend/plugins#installed');
|
|
browser.get('https://' + app.fqdn + '/admin/extend/plugins#installed');
|
|
- browser.wait(until.elementLocated(by.xpath('//ul[contains(@class, "installed")]//strong[text()="nodebb-plugin-beep"]')), TEST_TIMEOUT).then(function () {
|
|
|
|
|
|
+ browser.wait(until.elementLocated(by.xpath('//strong[text()="nodebb-plugin-beep"]')), TEST_TIMEOUT).then(function () {
|
|
done();
|
|
done();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
function uploadImage(done) {
|
|
function uploadImage(done) {
|
|
browser.get('https://' + app.fqdn + '/user/admin/edit');
|
|
browser.get('https://' + app.fqdn + '/user/admin/edit');
|
|
- browser.wait(until.elementLocated(by.xpath('//a[text()="Change Picture"]')), TEST_TIMEOUT.then(function () {
|
|
|
|
|
|
+ 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 () {
|
|
browser.findElement(by.xpath('//a[text()="Change Picture"]')).click().then(function () {
|
|
return browser.sleep(4000);
|
|
return browser.sleep(4000);
|
|
}).then(function () {
|
|
}).then(function () {
|
|
- return browser.findElement(by.xpath('//span[contains(text(), "Upload New Picture")]')).click();
|
|
|
|
|
|
+ return browser.findElement(by.xpath('//button[@data-action="upload"]')).click();
|
|
}).then(function () {
|
|
}).then(function () {
|
|
return browser.sleep(4000);
|
|
return browser.sleep(4000);
|
|
}).then(function () {
|
|
}).then(function () {
|
|
@@ -125,7 +124,7 @@ describe('Application life cycle test', function () {
|
|
}).then(function () {
|
|
}).then(function () {
|
|
browser.sleep(3000).then(function () { done(); });
|
|
browser.sleep(3000).then(function () { done(); });
|
|
});
|
|
});
|
|
- }));
|
|
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
function checkImage(done) {
|
|
function checkImage(done) {
|