Make tests more predictable

This commit is contained in:
Johannes Zellner 2021-12-16 17:33:47 +01:00
parent 0ce7dbe52b
commit da87f2c8fb

View file

@ -71,7 +71,6 @@ describe('Application life cycle test', function () {
async function closeAccountSetupDialog() { async function closeAccountSetupDialog() {
await browser.get('https://' + app.fqdn); 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('//span[contains(text(), "show me this anymore")]')).click();
await browser.findElement(By.xpath('//a[contains(text(), "Set up")]')).click(); await browser.findElement(By.xpath('//a[contains(text(), "Set up")]')).click();
await browser.sleep(3000); await browser.sleep(3000);
@ -107,10 +106,11 @@ describe('Application life cycle test', function () {
async function uploadVideo() { async function uploadVideo() {
browser.get('https://' + app.fqdn + '/videos/upload'); 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.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.sleep(10000); // wait for upload
await browser.findElement(By.xpath('//span[text()="Publish"]')).click(); 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); await browser.sleep(2000);
} }