mirror of
https://git.cloudron.io/cloudron/gitea-app
synced 2026-04-23 19:33:45 +00:00
Convert tests to charlie
This commit is contained in:
299
test/test.js
299
test/test.js
@@ -1,209 +1,154 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
import { execSync } from 'node:child_process';
|
|
||||||
import assert from 'node:assert/strict';
|
import assert from 'node:assert/strict';
|
||||||
|
import { execSync } from 'node:child_process';
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import superagent from '@cloudron/superagent';
|
import superagent from '@cloudron/superagent';
|
||||||
import { Builder, By, until } from 'selenium-webdriver';
|
import {
|
||||||
import { Options } from 'selenium-webdriver/chrome';
|
app,
|
||||||
|
clearCache,
|
||||||
|
click,
|
||||||
|
cloudronCli,
|
||||||
|
executeScript,
|
||||||
|
goto,
|
||||||
|
loginOIDC,
|
||||||
|
scrollIntoView,
|
||||||
|
sendKeys,
|
||||||
|
setInputFiles,
|
||||||
|
setupBrowser,
|
||||||
|
takeScreenshot,
|
||||||
|
teardownBrowser,
|
||||||
|
username,
|
||||||
|
waitForElement,
|
||||||
|
waitForPath
|
||||||
|
} from '@cloudron/charlie';
|
||||||
|
|
||||||
/* global it, xit, describe, before, after, afterEach */
|
/* global it, describe, before, after, afterEach */
|
||||||
|
|
||||||
if (!process.env.USERNAME || !process.env.PASSWORD || !process.env.EMAIL) {
|
|
||||||
console.log('USERNAME, PASSWORD and EMAIL env vars need to be set');
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
describe('Application life cycle test', function () {
|
|
||||||
this.timeout(0);
|
|
||||||
|
|
||||||
const TIMEOUT = parseInt(process.env.TIMEOUT, 10) || 5000;
|
|
||||||
const EXEC_ARGS = { cwd: path.resolve(import.meta.dirname, '..'), stdio: 'inherit' };
|
|
||||||
const LOCATION = process.env.LOCATION || 'test';
|
|
||||||
const SSH_PORT = 29420;
|
const SSH_PORT = 29420;
|
||||||
|
const INSTALL_TCP_FLAGS = { SSH_PORT };
|
||||||
let app, browser;
|
|
||||||
|
|
||||||
const repodir = '/tmp/testrepo';
|
const repodir = '/tmp/testrepo';
|
||||||
const reponame = 'testrepo';
|
const reponame = 'testrepo';
|
||||||
|
|
||||||
const username = process.env.USERNAME;
|
describe('Application life cycle test', function () {
|
||||||
const password = process.env.PASSWORD;
|
before(setupBrowser);
|
||||||
|
after(async function () {
|
||||||
before(function () {
|
await teardownBrowser();
|
||||||
const chromeOptions = new Options().windowSize({ width: 1280, height: 1024 });
|
|
||||||
if (process.env.CI) chromeOptions.addArguments('no-sandbox', 'disable-dev-shm-usage', 'headless');
|
|
||||||
browser = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
|
|
||||||
if (!fs.existsSync('./screenshots')) fs.mkdirSync('./screenshots');
|
|
||||||
});
|
|
||||||
|
|
||||||
after(function () {
|
|
||||||
browser.quit();
|
|
||||||
fs.rmSync(repodir, { recursive: true, force: true });
|
fs.rmSync(repodir, { recursive: true, force: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(async function () {
|
afterEach(async function () {
|
||||||
if (!process.env.CI || !app) return;
|
await takeScreenshot(this.currentTest.title);
|
||||||
|
|
||||||
const currentUrl = await browser.getCurrentUrl();
|
|
||||||
if (!currentUrl.includes(app.domain)) return;
|
|
||||||
assert.strictEqual(typeof this.currentTest.title, 'string');
|
|
||||||
|
|
||||||
const screenshotData = await browser.takeScreenshot();
|
|
||||||
fs.writeFileSync(`./screenshots/${new Date().getTime()}-${this.currentTest.title.replaceAll(' ', '_')}.png`, screenshotData, 'base64');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function getAppInfo() {
|
|
||||||
const inspect = JSON.parse(execSync('cloudron inspect'));
|
|
||||||
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
|
|
||||||
assert.ok(app && typeof app === 'object');
|
|
||||||
}
|
|
||||||
|
|
||||||
async function waitForElement(elem) {
|
|
||||||
await browser.wait(until.elementLocated(elem), TIMEOUT);
|
|
||||||
await browser.wait(until.elementIsVisible(browser.findElement(elem)), TIMEOUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
function sleep(millis) {
|
|
||||||
return new Promise(resolve => setTimeout(resolve, millis));
|
|
||||||
}
|
|
||||||
|
|
||||||
async function setAvatar() {
|
async function setAvatar() {
|
||||||
await browser.get('https://' + app.fqdn + '/user/settings');
|
await goto(`https://${app.fqdn}/user/settings`, '//label[contains(text(), "Use Custom Avatar")]');
|
||||||
|
await scrollIntoView('//label[contains(text(), "Use Custom Avatar")]');
|
||||||
var button = await browser.findElement(By.xpath('//label[contains(text(), "Use Custom Avatar")]'));
|
await click('//label[contains(text(), "Use Custom Avatar")]');
|
||||||
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
await setInputFiles('//input[@type="file" and @name="avatar"]', path.resolve(import.meta.dirname, '../logo.png'));
|
||||||
await browser.findElement(By.xpath('//label[contains(text(), "Use Custom Avatar")]')).click();
|
await click('//button[contains(text(), "Update Avatar")]');
|
||||||
await browser.findElement(By.xpath('//input[@type="file" and @name="avatar"]')).sendKeys(path.resolve(import.meta.dirname, '../logo.png'));
|
await waitForElement('//p[contains(text(),"Your avatar has been updated.")]');
|
||||||
await browser.findElement(By.xpath('//button[contains(text(), "Update Avatar")]')).click();
|
|
||||||
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(),"Your avatar has been updated.")]')), TIMEOUT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function checkAvatar() {
|
async function checkAvatar() {
|
||||||
await browser.get(`https://${app.fqdn}/${username}`);
|
await goto(`https://${app.fqdn}/${username}`, '//div[@id="profile-avatar"]/a/img');
|
||||||
|
const avatarSrc = await executeScript(() => {
|
||||||
const avatarSrc = await browser.findElement(By.xpath('//div[@id="profile-avatar"]/a/img')).getAttribute('src');
|
const el = document.querySelector('#profile-avatar a img');
|
||||||
|
return el ? el.getAttribute('src') : null;
|
||||||
const response = await superagent.get(avatarSrc);
|
});
|
||||||
|
assert.ok(avatarSrc);
|
||||||
|
const avatarUrl = new URL(avatarSrc, `https://${app.fqdn}`).href;
|
||||||
|
const response = await superagent.get(avatarUrl);
|
||||||
assert.strictEqual(response.status, 200);
|
assert.strictEqual(response.status, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function login(username, password) {
|
async function login(user, passwd) {
|
||||||
await browser.get('https://' + app.fqdn + '/user/login');
|
await goto(`https://${app.fqdn}/user/login`, '#user_name');
|
||||||
|
await sendKeys('#user_name', user);
|
||||||
await browser.findElement(By.id('user_name')).sendKeys(username);
|
await sendKeys('#password', passwd);
|
||||||
await browser.findElement(By.id('password')).sendKeys(password);
|
await click('//form[@action="/user/login"]//button');
|
||||||
await browser.findElement(By.xpath('//form[@action="/user/login"]//button')).click();
|
await waitForElement('//img[contains(@class, "avatar")]');
|
||||||
await browser.wait(until.elementLocated(By.xpath('//img[contains(@class, "avatar")]')), TIMEOUT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function adminLogin() {
|
async function adminLogin() {
|
||||||
await login('root', 'changeme');
|
await login('root', 'changeme');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loginOIDC(username, password, alreadyAuthenticated = true) {
|
async function loginGiteaOIDC() {
|
||||||
browser.manage().deleteAllCookies();
|
await clearCache();
|
||||||
await browser.get(`https://${app.fqdn}/user/login`);
|
await goto(`https://${app.fqdn}/user/login`, '//a[contains(@class, "openidConnect")]');
|
||||||
await browser.sleep(2000);
|
await click('//a[contains(@class, "openidConnect") and contains(., "Sign in with cloudron")]');
|
||||||
|
await loginOIDC('//img[contains(@class, "avatar")]');
|
||||||
|
|
||||||
await browser.findElement(By.xpath('//a[contains(@class, "openidConnect") and contains(., "Sign in with cloudron")]')).click();
|
|
||||||
await browser.sleep(2000);
|
|
||||||
|
|
||||||
if (!alreadyAuthenticated) {
|
|
||||||
await waitForElement(By.id('inputUsername'));
|
|
||||||
await browser.findElement(By.id('inputUsername')).sendKeys(username);
|
|
||||||
await browser.findElement(By.id('inputPassword')).sendKeys(password);
|
|
||||||
await browser.sleep(2000);
|
|
||||||
await browser.findElement(By.id('loginSubmitButton')).click();
|
|
||||||
await browser.sleep(2000);
|
|
||||||
}
|
|
||||||
|
|
||||||
await waitForElement(By.xpath('//img[contains(@class, "avatar")]'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function logout() {
|
async function logout() {
|
||||||
await browser.get('https://' + app.fqdn);
|
await goto(`https://${app.fqdn}`, '//img[contains(@class, "avatar")]');
|
||||||
|
await click('//img[contains(@class, "avatar")]');
|
||||||
await browser.findElement(By.xpath('//img[contains(@class, "avatar")]')).click();
|
await waitForElement('//a[@data-url="/user/logout"]');
|
||||||
await sleep(2000);
|
await click('//a[@data-url="/user/logout"]');
|
||||||
await browser.findElement(By.xpath('//a[@data-url="/user/logout"]')).click();
|
|
||||||
await sleep(2000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function addPublicKey() {
|
async function addPublicKey() {
|
||||||
const publicKey = fs.readFileSync(import.meta.dirname + '/id_ed25519.pub', 'utf8');
|
const keyPath = path.join(import.meta.dirname, 'id_ed25519');
|
||||||
execSync(`chmod g-rw,o-rw ${import.meta.dirname}/id_ed25519`); // ssh will complain about perms later
|
fs.chmodSync(keyPath, 0o600);
|
||||||
|
|
||||||
await browser.get('https://' + app.fqdn + '/user/settings/keys');
|
await goto(`https://${app.fqdn}/user/settings/keys`, '#add-ssh-button');
|
||||||
|
await click('#add-ssh-button');
|
||||||
await browser.wait(until.elementLocated(By.id('add-ssh-button')), TIMEOUT);
|
await sendKeys('#ssh-key-title', 'testkey');
|
||||||
await browser.findElement(By.id('add-ssh-button')).click();
|
await sendKeys('#ssh-key-content', fs.readFileSync(`${import.meta.dirname}/id_ed25519.pub`, 'utf8').trim());
|
||||||
await browser.findElement(By.id('ssh-key-title')).sendKeys('testkey');
|
await scrollIntoView('//button[contains(text(), "Add Key")]');
|
||||||
await browser.findElement(By.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480
|
await click('//form//button[contains(text(),"Add Key")]');
|
||||||
var button = browser.findElement(By.xpath('//button[contains(text(), "Add Key")]'));
|
await waitForElement('//p[contains(text(), "has been added.")]');
|
||||||
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
|
||||||
await browser.findElement(By.xpath('//form//button[contains(text(),"Add Key")]')).click();
|
|
||||||
|
|
||||||
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createRepo() {
|
async function createRepo() {
|
||||||
await browser.get(`https://${app.fqdn}/repo/create`);
|
await goto(`https://${app.fqdn}/repo/create`, '#repo_name');
|
||||||
await browser.wait(until.elementLocated(By.id('repo_name')));
|
await sendKeys('#repo_name', reponame);
|
||||||
await browser.findElement(By.id('repo_name')).sendKeys(reponame);
|
await scrollIntoView('//button[contains(text(), "Create Repository")]');
|
||||||
var button = browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]'));
|
await click('#auto-init');
|
||||||
await browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
await click('//button[contains(text(), "Create Repository")]');
|
||||||
await browser.findElement(By.id('auto-init')).click();
|
await waitForPath(`/${username}/${reponame}`);
|
||||||
await browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]')).click();
|
|
||||||
|
|
||||||
await browser.wait(function () {
|
|
||||||
return browser.getCurrentUrl().then(function (url) {
|
|
||||||
return url === 'https://' + app.fqdn + '/' + username + '/' + reponame;
|
|
||||||
});
|
|
||||||
}, TIMEOUT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cloneRepo() {
|
function cloneRepo() {
|
||||||
fs.rmSync(repodir, { recursive: true, force: true });
|
fs.rmSync(repodir, { recursive: true, force: true });
|
||||||
var env = Object.create(process.env);
|
const env = Object.create(process.env);
|
||||||
env.GIT_SSH = import.meta.dirname + '/git_ssh_wrapper.sh';
|
env.GIT_SSH = path.join(import.meta.dirname, 'git_ssh_wrapper.sh');
|
||||||
execSync(`git clone ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git ${repodir}`, { env: env });
|
execSync(`git clone ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git ${repodir}`, { env });
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushFile() {
|
function pushFile() {
|
||||||
const env = Object.create(process.env);
|
const env = Object.create(process.env);
|
||||||
env.GIT_SSH = import.meta.dirname + '/git_ssh_wrapper.sh';
|
env.GIT_SSH = path.join(import.meta.dirname, 'git_ssh_wrapper.sh');
|
||||||
execSync(`touch newfile && git add newfile && git commit -a -mx && git push ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame} main`,
|
execSync(
|
||||||
{ env: env, cwd: repodir });
|
`touch newfile && git add newfile && git commit -a -mx && git push ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame} main`,
|
||||||
|
{ env, cwd: repodir }
|
||||||
|
);
|
||||||
fs.rmSync(repodir, { recursive: true, force: true });
|
fs.rmSync(repodir, { recursive: true, force: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
function fileExists() {
|
function fileExists() {
|
||||||
assert.strictEqual(fs.existsSync(repodir + '/newfile'), true);
|
assert.strictEqual(fs.existsSync(`${repodir}/newfile`), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function sendMail() {
|
async function sendMail() {
|
||||||
await browser.get(`https://${app.fqdn}/-/admin/config`);
|
await goto(`https://${app.fqdn}/-/admin/config`, '//button[contains(., "Send")]');
|
||||||
await browser.sleep(3000);
|
await scrollIntoView('//button[contains(., "Send")]');
|
||||||
const button = await browser.findElement(By.xpath('//button[contains(., "Send")]'));
|
await sendKeys('//input[@name="email"]', 'test@cloudron.io');
|
||||||
await browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
await click('//button[contains(., "Send")]');
|
||||||
await browser.findElement(By.xpath('//input[@name="email"]')).sendKeys('test@cloudron.io');
|
await waitForElement('//p[contains(., "A testing email has been sent")]');
|
||||||
await browser.findElement(By.xpath('//button[contains(., "Send")]')).click();
|
|
||||||
await browser.wait(until.elementLocated(By.xpath('//p[contains(., "A testing email has been sent")]')), TIMEOUT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
it('install app', function () {
|
||||||
it('install app', function () { execSync(`cloudron install --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); });
|
cloudronCli.install({ tcpPortFlags: INSTALL_TCP_FLAGS });
|
||||||
|
});
|
||||||
it('can get app information', getAppInfo);
|
|
||||||
|
|
||||||
it('can admin login', adminLogin);
|
it('can admin login', adminLogin);
|
||||||
it('can send mail', sendMail);
|
it('can send mail', sendMail);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('can login', loginOIDC.bind(null, username, password, false));
|
it('can login', loginGiteaOIDC);
|
||||||
it('can set avatar', setAvatar);
|
it('can set avatar', setAvatar);
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
|
|
||||||
@@ -215,57 +160,58 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
it('can add and push a file', pushFile);
|
it('can add and push a file', pushFile);
|
||||||
|
|
||||||
it('can restart app', function () { execSync('cloudron restart --app ' + app.id); });
|
it('can restart app', function () {
|
||||||
|
cloudronCli.restart();
|
||||||
|
});
|
||||||
|
|
||||||
xit('can login', loginOIDC.bind(null, username, password)); // no need to relogin since session persists
|
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', fileExists);
|
it('file exists in repo', fileExists);
|
||||||
|
|
||||||
it('backup app', function () { execSync('cloudron backup create --app ' + app.id, EXEC_ARGS); });
|
it('backup app', async function () {
|
||||||
it('restore app', function () { execSync('cloudron restore --app ' + app.id, EXEC_ARGS); });
|
await cloudronCli.createBackup();
|
||||||
|
});
|
||||||
|
it('restore app', async function () {
|
||||||
|
await cloudronCli.restoreFromLatestBackup();
|
||||||
|
});
|
||||||
|
|
||||||
it('can login', loginOIDC.bind(null, username, password));
|
it('can login', loginGiteaOIDC);
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', function () { assert.strictEqual(fs.existsSync(repodir + '/newfile'), true); });
|
it('file exists in repo', function () {
|
||||||
|
assert.strictEqual(fs.existsSync(`${repodir}/newfile`), true);
|
||||||
|
});
|
||||||
|
|
||||||
it('move to different location', async function () {
|
it('move to different location', async function () {
|
||||||
//browser.manage().deleteAllCookies(); // commented because of error "'Network.deleteCookie' wasn't found"
|
await cloudronCli.changeLocation();
|
||||||
// ensure we don't hit NXDOMAIN in the mean time
|
|
||||||
await browser.get('about:blank');
|
|
||||||
|
|
||||||
execSync('cloudron configure --location ' + LOCATION + '2 --app ' + app.id, EXEC_ARGS);
|
|
||||||
});
|
});
|
||||||
it('can get app information', getAppInfo);
|
|
||||||
|
|
||||||
it('can login', loginOIDC.bind(null, username, password));
|
it('can login', loginGiteaOIDC);
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', function () { assert.strictEqual(fs.existsSync(repodir + '/newfile'), true); });
|
it('file exists in repo', function () {
|
||||||
|
assert.strictEqual(fs.existsSync(`${repodir}/newfile`), true);
|
||||||
it('uninstall app', async function () {
|
|
||||||
// ensure we don't hit NXDOMAIN in the mean time
|
|
||||||
await browser.get('about:blank');
|
|
||||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// No SSO
|
it('uninstall app', async function () {
|
||||||
it('install app (no sso)', function () { execSync(`cloudron install --no-sso --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); });
|
await cloudronCli.uninstall();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('install app (no sso)', function () {
|
||||||
|
cloudronCli.install({ noSso: true, tcpPortFlags: INSTALL_TCP_FLAGS });
|
||||||
|
});
|
||||||
|
|
||||||
it('can get app information', getAppInfo);
|
|
||||||
it('can admin login (no sso)', adminLogin);
|
it('can admin login (no sso)', adminLogin);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('uninstall app (no sso)', async function () {
|
it('uninstall app (no sso)', async function () {
|
||||||
await browser.get('about:blank');
|
await cloudronCli.uninstall();
|
||||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// test update
|
it('can install app', function () {
|
||||||
it('can install app', function () { execSync(`cloudron install --appstore-id ${app.manifest.id} --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); });
|
cloudronCli.appstoreInstall({ tcpPortFlags: INSTALL_TCP_FLAGS });
|
||||||
|
});
|
||||||
|
|
||||||
it('can get app information', getAppInfo);
|
it('can login', loginGiteaOIDC);
|
||||||
it('can login', loginOIDC.bind(null, username, password));
|
|
||||||
it('can set avatar', setAvatar);
|
it('can set avatar', setAvatar);
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
it('can add public key', addPublicKey);
|
it('can add public key', addPublicKey);
|
||||||
@@ -273,21 +219,20 @@ describe('Application life cycle test', function () {
|
|||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('can add and push a file', pushFile);
|
it('can add and push a file', pushFile);
|
||||||
|
|
||||||
it('can update', function () { execSync('cloudron update --app ' + app.id, EXEC_ARGS); });
|
it('can update', async function () {
|
||||||
it('can get app information', getAppInfo);
|
await cloudronCli.update();
|
||||||
|
});
|
||||||
|
|
||||||
it('can admin login', adminLogin);
|
it('can admin login', adminLogin);
|
||||||
it('can send mail', sendMail);
|
it('can send mail', sendMail);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
it('can login', loginOIDC.bind(null, username, password));
|
it('can login', loginGiteaOIDC);
|
||||||
it('can get avatar', checkAvatar);
|
it('can get avatar', checkAvatar);
|
||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in cloned repo', fileExists);
|
it('file exists in cloned repo', fileExists);
|
||||||
|
|
||||||
it('uninstall app', async function () {
|
it('uninstall app', async function () {
|
||||||
// ensure we don't hit NXDOMAIN in the mean time
|
await cloudronCli.uninstall();
|
||||||
await browser.get('about:blank');
|
|
||||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user