diff --git a/test/test.js b/test/test.js index 9b94777..687b921 100644 --- a/test/test.js +++ b/test/test.js @@ -35,7 +35,8 @@ describe('Application life cycle test', function () { const password = process.env.PASSWORD; before(function () { - const chromeOptions = new Options().windowSize({ width: 1280, height: 1024 }); + const chromeOptions = new Options().windowSize({ width: 1600, height: 1024 }); + chromeOptions.addArguments('guest'); // disable password checks 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'); @@ -124,11 +125,12 @@ describe('Application life cycle test', function () { await browser.get(`https://${app.fqdn}/buckets`); await waitForElement(By.xpath('//button[@id="create-bucket"]')); await browser.findElement(By.xpath('//button[@id="create-bucket"]')).click(); - await browser.sleep(2000); + await browser.sleep(1000); + await waitForElement(By.xpath('//input[@id="bucket-name"]')); await browser.findElement(By.xpath('//input[@id="bucket-name"]')).sendKeys(BUCKET); await browser.findElement(By.xpath('//button[@id="create-bucket"]')).click(); + await browser.get(`https://${app.fqdn}/buckets`); await waitForElement(By.xpath(`//h1[contains(text(), "${BUCKET}")]`)); - await timers.setTimeout(5000); } async function checkBucket() { @@ -168,7 +170,7 @@ describe('Application life cycle test', function () { xit('build app', function () { execSync('cloudron build', EXEC_ARGS); }); - // // no SSO + // no SSO it('install app (no SSO)', async function () { execSync(`cloudron install --no-sso --location ${LOCATION} --secondary-domains API_SERVER_DOMAIN=${LOCATION}-api`, EXEC_ARGS); await timers.setTimeout(10000);