Skip to content

Commit 3901425

Browse files
dpageclaude
andcommitted
Fix feature test failures caused by AI preferences category
The new "AI" preference category sorts alphabetically before "Browser", changing the default selection in the Preferences dialog. Tests that waited for the "Show system objects?" label (only visible under "Browser > Display") now wait for the preference tree container instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 45f8aaa commit 3901425

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

web/regression/feature_tests/keyboard_shortcut_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ def _update_preferences(self):
9494
self.page.click_tab("Preferences")
9595

9696
# Wait till the preference dialogue box is displayed by checking the
97-
# visibility of Show System Object label
97+
# visibility of the preference tree
9898
wait.until(EC.presence_of_element_located(
9999
(By.XPATH,
100-
PreferencesLocaltors.show_system_objects_pref_label_xpath))
100+
PreferencesLocaltors.tree_container_xpath))
101101
)
102102

103103
keyboard_node = self.page.find_by_xpath(

web/regression/feature_tests/pg_utilities_backup_restore_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,10 @@ def _update_preferences(self):
258258
self.page.click_tab("Preferences")
259259

260260
# Wait till the preference dialogue box is displayed by checking the
261-
# visibility of Show System Object label
261+
# visibility of the preference tree
262262
wait.until(EC.presence_of_element_located(
263-
(By.XPATH, PreferencesLocaltors.
264-
show_system_objects_pref_label_xpath))
263+
(By.XPATH,
264+
PreferencesLocaltors.tree_container_xpath))
265265
)
266266

267267
binary_path = self.page.find_by_xpath(

web/regression/feature_tests/test_copy_sql_to_query_tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ def _update_preferences_setting(self):
105105
self.page.click_tab("Preferences")
106106

107107
# Wait till the preference dialogue box is displayed by checking the
108-
# visibility of Show System Object label
108+
# visibility of the preference tree
109109
wait.until(EC.presence_of_element_located(
110110
(By.XPATH,
111-
PreferencesLocaltors.show_system_objects_pref_label_xpath))
111+
PreferencesLocaltors.tree_container_xpath))
112112
)
113113

114114
option_node = self.page.find_by_xpath(

web/regression/feature_utils/locators.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ class PreferencesLocaltors:
116116
show_system_objects_pref_label_xpath = \
117117
"//label[contains(text(), 'Show system objects?')]"
118118

119+
tree_container_xpath = "//*[@id='treeContainer']"
120+
119121
specified_preference_tree_node_xpath = \
120122
("//*[@id='treeContainer']//div[contains(@class,'PgTree-nodeLabel')]"
121123
"[text()='{0}']")

0 commit comments

Comments
 (0)