mirror of
https://git.cloudron.io/cloudron/gitea-app
synced 2025-09-20 12:10:13 +00:00
Update test deps
This commit is contained in:
19
test/test.js
19
test/test.js
@@ -34,9 +34,8 @@ describe('Application life cycle test', function () {
|
||||
var SSH_PORT = 29420;
|
||||
|
||||
var app;
|
||||
var token;
|
||||
var browser;
|
||||
|
||||
var server, browser = new Builder().forBrowser('chrome').build();
|
||||
var repodir = '/tmp/testrepo';
|
||||
var reponame = 'testrepo';
|
||||
|
||||
@@ -45,26 +44,14 @@ describe('Application life cycle test', function () {
|
||||
var email = process.env.EMAIL;
|
||||
|
||||
before(function () {
|
||||
var seleniumJar= require('selenium-server-standalone-jar');
|
||||
var SeleniumServer = require('selenium-webdriver/remote').SeleniumServer;
|
||||
server = new SeleniumServer(seleniumJar.path, { port: 4444 });
|
||||
server.start();
|
||||
browser = new Builder().forBrowser('chrome').setChromeOptions(new Options().windowSize({ width: 1280, height: 1024 })).build();
|
||||
});
|
||||
|
||||
after(function (done) {
|
||||
after(function () {
|
||||
browser.quit();
|
||||
rimraf.sync(repodir);
|
||||
done();
|
||||
});
|
||||
|
||||
function waitForUrl(url) {
|
||||
return browser.wait(function () {
|
||||
return browser.getCurrentUrl().then(function (currentUrl) {
|
||||
return currentUrl === url;
|
||||
});
|
||||
}, TIMEOUT);
|
||||
}
|
||||
|
||||
function getAppInfo() {
|
||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
|
||||
|
Reference in New Issue
Block a user