From e979c176e343c1ef125fd75e23e3609cbdfded70 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 23 Oct 2024 18:48:42 -0400 Subject: [PATCH] test: Exercise nominally creating and deleting an app. --- tools/autotest.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tools/autotest.py b/tools/autotest.py index 534764bf..e738de4b 100755 --- a/tools/autotest.py +++ b/tools/autotest.py @@ -57,6 +57,25 @@ try: driver.find_element(By.TAG_NAME, 'tf-auth').shadow_root.find_element(By.ID, 'confirm').send_keys('test_password') driver.find_element(By.TAG_NAME, 'tf-auth').shadow_root.find_element(By.ID, 'loginButton').click() + wait.until(expected_conditions.presence_of_element_located((By.ID, 'document'))) + driver.get('http://localhost:8888/~testuser/test/') + wait.until(expected_conditions.presence_of_element_located((By.ID, 'document'))) + 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() + editor.send_keys('app.setDocument("
Hello, world!
")'); + 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-div'))) + + driver.switch_to.default_content() + driver.find_element(By.ID, 'delete').click() + wait.until(expected_conditions.alert_is_present()).dismiss() + + driver.get('http://localhost:8888') + 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.LINK_TEXT, 'identity')))