mirror of
https://git.cloudron.io/cloudron/prometheus-server-app.git
synced 2024-12-11 17:56:28 +00:00
Fix tests
This commit is contained in:
parent
9c586976ad
commit
6d332d053f
1 changed files with 6 additions and 8 deletions
14
test/test.js
14
test/test.js
|
@ -6,7 +6,7 @@
|
|||
|
||||
require('chromedriver');
|
||||
|
||||
var execSync = require('child_process').execSync,
|
||||
const execSync = require('child_process').execSync,
|
||||
expect = require('expect.js'),
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
|
@ -25,11 +25,9 @@ describe('Application life cycle test', function () {
|
|||
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
||||
const TEST_TIMEOUT = parseInt(process.env.TIMEOUT, 10) || 50000;
|
||||
|
||||
var browser;
|
||||
var username = process.env.USERNAME;
|
||||
var password = process.env.PASSWORD;
|
||||
|
||||
var app;
|
||||
let browser, app;
|
||||
const username = process.env.USERNAME;
|
||||
const password = process.env.PASSWORD;
|
||||
|
||||
before(function () {
|
||||
const chromeOptions = new Options().windowSize({ width: 1280, height: 1024 });
|
||||
|
@ -76,7 +74,7 @@ describe('Application life cycle test', function () {
|
|||
await browser.findElement(By.id('loginSubmitButton')).click();
|
||||
}
|
||||
|
||||
await waitForElement(By.xpath('//a[text()="Alerts"]'));
|
||||
await waitForElement(By.xpath('//a[contains(., "Alerts")]'));
|
||||
}
|
||||
|
||||
async function logout() {
|
||||
|
@ -86,7 +84,7 @@ describe('Application life cycle test', function () {
|
|||
|
||||
async function loadApp() {
|
||||
await browser.get(`https://${app.fqdn}`);
|
||||
await waitForElement(By.xpath('//a[text()="Alerts"]'));
|
||||
await waitForElement(By.xpath('//a[contains(., "Alerts")]'));
|
||||
}
|
||||
|
||||
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
||||
|
|
Loading…
Reference in a new issue