From da87f2c8fb5fd6f373c998094d6e1ac9b0105964 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Thu, 16 Dec 2021 17:33:47 +0100 Subject: [PATCH] Make tests more predictable --- test/test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test.js b/test/test.js index 6c59adf..7864d5a 100644 --- a/test/test.js +++ b/test/test.js @@ -71,7 +71,6 @@ describe('Application life cycle test', function () { async function closeAccountSetupDialog() { await browser.get('https://' + app.fqdn); - await waitForElement(By.id('stopDisplayModal')); await browser.findElement(By.xpath('//span[contains(text(), "show me this anymore")]')).click(); await browser.findElement(By.xpath('//a[contains(text(), "Set up")]')).click(); await browser.sleep(3000); @@ -107,10 +106,11 @@ describe('Application life cycle test', function () { async function uploadVideo() { browser.get('https://' + app.fqdn + '/videos/upload'); - await waitForElement(By.xpath('//input[@id="videofile" and @type="file"]')); + await browser.sleep(2000); await browser.findElement(By.xpath('//input[@id="videofile" and @type="file"]')).sendKeys(path.resolve(__dirname, './Cloudron Test Video.mp4')); - await browser.sleep(20000); // wait for upload - await browser.findElement(By.xpath('//span[text()="Publish"]')).click(); + await browser.sleep(10000); // wait for upload + await waitForElement(By.xpath('//div[@class="submit-container"]//span[text()="Publish"]')); + await browser.findElement(By.xpath('//div[@class="submit-container"]//span[text()="Publish"]')).click(); await browser.sleep(2000); }