test: Exercise the flag menu option slightly.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 9m19s

This commit is contained in:
2025-11-29 13:25:48 -05:00
parent cd34c127d1
commit 07c879f5f5
2 changed files with 12 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ def select(driver, path, action = None, keep_trying = False):
elif node == 'shadow_root':
context = context.shadow_root
else:
context = context.find_element(By.TAG_NAME, node)
context = context.find_element(By.CSS_SELECTOR, node)
if action is not None:
if action[0] == 'click':
context.click()
@@ -89,6 +89,16 @@ try:
select(driver, ['//button[text()="✅ Allow"]'], ('click',))
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#edit'], ('send_keys', 'We made it to the ssb app.'))
driver.get('http://localhost:8888/')
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#edit'], ('send_keys', 'Hello, world!'))
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#submit'], ('click',))
select(driver, ['//button[text()="✅ Allow"]'], ('click',))
driver.get('http://localhost:8888/')
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', 'tf-tab-news-feed', 'shadow_root', 'tf-news', 'shadow_root', 'tf-message', 'shadow_root', 'button'], ('click',))
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', 'tf-tab-news-feed', 'shadow_root', 'tf-news', 'shadow_root', 'tf-message', 'shadow_root', '#button_flag'], ('click',))
wait.until(expected_conditions.alert_is_present()).send_keys('cusswords')
wait.until(expected_conditions.alert_is_present()).accept()
driver.get('http://localhost:8888/~core/admin/')
select(driver, ['#document', 'frame', '#gs_room_name'], ('send_keys', 'test room'))
select(driver, ['#document', 'frame', '//*[@id="gs_room_name"]/following-sibling::button'], ('click',))