From 5a0d2ea12e21048500ae7cbcecc9956225c2366a Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Mon, 10 Feb 2020 17:04:16 +0100 Subject: [PATCH] Ensure we can submit the test file page --- test/test.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/test.js b/test/test.js index df608d3..2db4c74 100755 --- a/test/test.js +++ b/test/test.js @@ -119,6 +119,10 @@ return done(); return browser.executeScript('arguments[0].CodeMirror.setValue("' + text + '");', cm); }).then(function () { return browser.findElement(By.xpath('//input[@name="commit_summary"]')).sendKeys('Dummy edit'); + }).then(function () { + // explicitly make the button clickable since CodeMirror.setValue() does not update the form state correctly + var button = browser.findElement(By.xpath('//button[contains(text(), "Commit Changes")]')); + return browser.executeScript('arguments[0].removeAttribute("disabled")', button); }).then(function () { return browser.findElement(By.xpath('//button[contains(text(), "Commit Changes")]')).click(); }).then(function () { @@ -304,9 +308,7 @@ return done(); }); }); - it('install app', function () { - execSync(`cloudron install --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); - }); + it('install app', function () { execSync(`cloudron install --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); }); it('can get app information', getAppInfo); it('can get the main page', function (done) {