mirror of
https://git.cloudron.io/cloudron/freshrss-app
synced 2025-09-14 17:09:09 +00:00
Fix tests
This commit is contained in:
@@ -108,14 +108,15 @@ describe('Application life cycle test', function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addSubscription(callback) {
|
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"]'));
|
return visible(by.xpath('//input[@name="url_rss"]'));
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
return browser.findElement(by.xpath('//input[@name="url_rss"]')).sendKeys(url);
|
return browser.findElement(by.xpath('//input[@name="url_rss"]')).sendKeys(url);
|
||||||
}).then(function () {
|
}).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 () {
|
}).then(function () {
|
||||||
return visible(by.xpath('//div[@id="notification" and @class="notification good"]'));
|
return visible(by.xpath('//div[@id="notification" and @class="notification good"]'));
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
@@ -169,7 +170,7 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
function subscriptionExists(callback) {
|
function subscriptionExists(callback) {
|
||||||
browser.get(`${baseUrl()}/i/?get=c_1`).then(function () {
|
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 () {
|
}).then(function () {
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user