Fix tests

This commit is contained in:
Girish Ramakrishnan 2024-11-15 12:59:58 +05:30
parent 9c586976ad
commit 6d332d053f

View file

@ -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); });