mirror of
https://git.cloudron.io/cloudron/freshrss-app
synced 2025-09-02 05:15:12 +00:00
Fixup tests
This commit is contained in:
12
test/test.js
12
test/test.js
@@ -119,8 +119,16 @@ describe('Application life cycle test', function () {
|
||||
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`);
|
||||
|
||||
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 browser.findElement(By.id('new_user_name')).sendKeys(username);
|
||||
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');
|
||||
});
|
||||
|
||||
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('can get static extension file', getStaticExtensionFile);
|
||||
|
||||
|
Reference in New Issue
Block a user