1
0
mirror of https://git.cloudron.io/cloudron/freshrss-app synced 2025-09-02 13:25:15 +00:00

Fixup tests

This commit is contained in:
Johannes Zellner
2025-08-19 09:38:10 +02:00
parent 99eb91f995
commit 067a448120

View File

@@ -119,8 +119,16 @@ describe('Application life cycle test', function () {
await waitForElement(By.xpath('//div[@id="notification" and contains(@class, "good")]')); await waitForElement(By.xpath('//div[@id="notification" and contains(@class, "good")]'));
} }
async function addUser(username, password) { async function addUser(username, password, relogin = true) {
await browser.get(`${baseUrl()}/i/?c=user&a=manage`); await browser.get(`${baseUrl()}/i/?c=user&a=manage`);
if (relogin) {
// needs a relogin for admin confirmation
await waitForElement(By.id('passwordPlain'));
await browser.findElement(By.id('passwordPlain')).sendKeys(admin_password);
await browser.findElement(By.id('loginButton')).click();
}
await waitForElement(By.id('new_user_name')); await waitForElement(By.id('new_user_name'));
await browser.findElement(By.id('new_user_name')).sendKeys(username); await browser.findElement(By.id('new_user_name')).sendKeys(username);
await browser.findElement(By.id('new_user_passwordPlain')).sendKeys(password); await browser.findElement(By.id('new_user_passwordPlain')).sendKeys(password);
@@ -229,7 +237,7 @@ describe('Application life cycle test', function () {
expect(app).to.be.an('object'); expect(app).to.be.an('object');
}); });
it('can add users', addUser.bind(null, 'test', admin_password)); it('can add users', addUser.bind(null, 'test', admin_password, false));
it('subscription exists', subscriptionExists); it('subscription exists', subscriptionExists);
it('can get static extension file', getStaticExtensionFile); it('can get static extension file', getStaticExtensionFile);