diff --git a/test/test.js b/test/test.js index 85fcdae..c10e4cf 100644 --- a/test/test.js +++ b/test/test.js @@ -108,14 +108,15 @@ describe('Application life cycle test', function () { } function addSubscription(callback) { - var url = "https://cloudron.io/blog/rss.xml"; + var url = 'https://blog.cloudron.io/rss/'; + const addUrl = app.manifest.version === '1.10.0' ? `${baseUrl()}/i/?c=subscription` : `${baseUrl()}/i/?c=subscription&a=add`; - browser.get(`${baseUrl()}/i/?c=subscription`).then(function () { + browser.get(addUrl).then(function () { return visible(by.xpath('//input[@name="url_rss"]')); }).then(function () { return browser.findElement(by.xpath('//input[@name="url_rss"]')).sendKeys(url); }).then(function () { - return browser.findElement(by.xpath('//form[@id="add_rss"]/div/button[@type="submit"]')).click(); + return browser.findElement(by.xpath('//button[@type="submit"]/ancestor::form[@id="add_rss"]')).submit(); }).then(function () { return visible(by.xpath('//div[@id="notification" and @class="notification good"]')); }).then(function () { @@ -169,7 +170,7 @@ describe('Application life cycle test', function () { function subscriptionExists(callback) { browser.get(`${baseUrl()}/i/?get=c_1`).then(function () { - return visible(by.xpath('//a[text()="Cloudron.io"]')); + return visible(by.xpath('//span[text()="Cloudron"]')); }).then(function () { callback(); });