js: Remove a stale /save reference, and exercise re-saving an app in the test.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 15m36s

This commit is contained in:
Cory McWilliams 2024-10-27 14:05:20 -04:00
parent 863e50203e
commit 4b1ebf02e1
2 changed files with 12 additions and 2 deletions

View File

@ -1080,8 +1080,6 @@ loadSettings()
(match = /^\/([&\%][^\.]{44}(?:\.\w+)?)(\/?.*)/.exec(request.uri)) (match = /^\/([&\%][^\.]{44}(?:\.\w+)?)(\/?.*)/.exec(request.uri))
) { ) {
return blobHandler(request, response, match[1], match[2]); 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); let port = httpd.start(tildefriends.http_port);

View File

@ -67,6 +67,7 @@ try:
except: except:
pass pass
driver.switch_to.default_content()
driver.find_element(By.TAG_NAME, 'tf-navigation').shadow_root.find_element(By.LINK_TEXT, 'edit').click() 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 = driver.find_element(By.ID, 'editor').find_element(By.CLASS_NAME, 'cm-content')
editor.click() editor.click()
@ -77,6 +78,17 @@ try:
driver.switch_to.frame(driver.find_element(By.ID, 'document')) driver.switch_to.frame(driver.find_element(By.ID, 'document'))
wait.until(expected_conditions.presence_of_element_located((By.ID, 'test-div'))) 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("<div id=\'test-div2\'>Hello, world, again!</div>")');
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.switch_to.default_content()
driver.find_element(By.ID, 'delete').click() driver.find_element(By.ID, 'delete').click()
wait.until(expected_conditions.alert_is_present()).accept() wait.until(expected_conditions.alert_is_present()).accept()