From 4b1ebf02e135299a27a4b589e1cf8d8c37b0506b Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 27 Oct 2024 14:05:20 -0400 Subject: [PATCH] js: Remove a stale /save reference, and exercise re-saving an app in the test. --- core/core.js | 2 -- tools/autotest.py | 12 ++++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/core/core.js b/core/core.js index 961f549c..e74ff182 100644 --- a/core/core.js +++ b/core/core.js @@ -1080,8 +1080,6 @@ loadSettings() (match = /^\/([&\%][^\.]{44}(?:\.\w+)?)(\/?.*)/.exec(request.uri)) ) { return blobHandler(request, response, match[1], match[2]); - } else if ((match = /^(.*)(\/(?:save)?)$/.exec(request.uri))) { - return blobHandler(request, response, match[1], match[2]); } }); let port = httpd.start(tildefriends.http_port); diff --git a/tools/autotest.py b/tools/autotest.py index ae424b88..7a7b6a07 100755 --- a/tools/autotest.py +++ b/tools/autotest.py @@ -67,6 +67,7 @@ try: except: pass + driver.switch_to.default_content() driver.find_element(By.TAG_NAME, 'tf-navigation').shadow_root.find_element(By.LINK_TEXT, 'edit').click() editor = driver.find_element(By.ID, 'editor').find_element(By.CLASS_NAME, 'cm-content') editor.click() @@ -77,6 +78,17 @@ try: driver.switch_to.frame(driver.find_element(By.ID, 'document')) wait.until(expected_conditions.presence_of_element_located((By.ID, 'test-div'))) + driver.switch_to.default_content() + editor = driver.find_element(By.ID, 'editor').find_element(By.CLASS_NAME, 'cm-content') + editor.click() + editor.clear() + editor.send_keys('app.setDocument("
Hello, world, again!
")'); + driver.find_element(By.ID, 'save').click() + + wait.until(expected_conditions.presence_of_element_located((By.ID, 'document'))) + driver.switch_to.frame(driver.find_element(By.ID, 'document')) + wait.until(expected_conditions.presence_of_element_located((By.ID, 'test-div2'))) + driver.switch_to.default_content() driver.find_element(By.ID, 'delete').click() wait.until(expected_conditions.alert_is_present()).accept()