From 4fe3c9a751e7a30a518b2a1cd8b38303103831d0 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Fri, 25 Oct 2024 12:34:22 -0400 Subject: [PATCH] test: Verify that deleting apps actually does something. --- core/client.js | 4 ++-- tools/autotest.py | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/core/client.js b/core/client.js index 78621f40..50f30820 100644 --- a/core/client.js +++ b/core/client.js @@ -382,8 +382,8 @@ class TfNavigationElement extends LitElement {
- × -
ERROR:

${this.status.message}

+ × +
ERROR:

${this.status.message}

` diff --git a/tools/autotest.py b/tools/autotest.py index e738de4b..ae424b88 100755 --- a/tools/autotest.py +++ b/tools/autotest.py @@ -60,6 +60,13 @@ try: 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'))) + while True: + try: + wait.until(exists_in_shadow_root(driver.find_element(By.TAG_NAME, 'tf-navigation').shadow_root, By.ID, 'close_error')).click() + break + except: + pass + 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() @@ -72,7 +79,16 @@ try: driver.switch_to.default_content() driver.find_element(By.ID, 'delete').click() + wait.until(expected_conditions.alert_is_present()).accept() wait.until(expected_conditions.alert_is_present()).dismiss() + driver.get('http://localhost:8888/~testuser/test/') + wait.until(expected_conditions.presence_of_element_located((By.ID, 'document'))) + while True: + try: + wait.until(exists_in_shadow_root(driver.find_element(By.TAG_NAME, 'tf-navigation').shadow_root, By.ID, 'close_error')).click() + break + except: + pass driver.get('http://localhost:8888')