|
@@ -127,15 +127,16 @@ describe('Application life cycle test', function () {
|
|
|
|
|
|
it('can upload media', function (done) {
|
|
it('can upload media', function (done) {
|
|
browser.get('https://' + app.fqdn + '/wp-admin/media-new.php?browser-uploader');
|
|
browser.get('https://' + app.fqdn + '/wp-admin/media-new.php?browser-uploader');
|
|
- browser.wait(until.elementLocated(by.id('async-upload')), TIMEOUT);
|
|
|
|
- browser.findElement(by.xpath('//input[@id="async-upload" and @type="file"]')).sendKeys(path.resolve(__dirname, '../icon.png'));
|
|
|
|
- browser.findElement(by.id('html-upload')).click();
|
|
|
|
-
|
|
|
|
- browser.wait(function () {
|
|
|
|
- return browser.getCurrentUrl().then(function (url) {
|
|
|
|
- return url === 'https://' + app.fqdn + '/wp-admin/upload.php';
|
|
|
|
- });
|
|
|
|
- }, TIMEOUT).then(function () { done(); });
|
|
|
|
|
|
+ browser.wait(until.elementLocated(by.id('async-upload')), TIMEOUT).then(function () {
|
|
|
|
+ browser.findElement(by.xpath('//input[@id="async-upload" and @type="file"]')).sendKeys(path.resolve(__dirname, '../logo.png'));
|
|
|
|
+ browser.findElement(by.id('html-upload')).click();
|
|
|
|
+
|
|
|
|
+ browser.wait(function () {
|
|
|
|
+ return browser.getCurrentUrl().then(function (url) {
|
|
|
|
+ return url === 'https://' + app.fqdn + '/wp-admin/upload.php';
|
|
|
|
+ });
|
|
|
|
+ }, TIMEOUT).then(function () { done(); });
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
var mediaLink;
|
|
var mediaLink;
|