Ensure the correct child node is selected on the expansion of the collection node.

This commit is contained in:
Nikhil Mohite 2023-01-05 17:30:30 +05:30 committed by GitHub
parent 25b6a0a1cf
commit 0a7d9a69f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 16 deletions

View File

@ -927,7 +927,7 @@ define('pgadmin.browser.node', [
};
}
} else {
} else if(tree.children(item).length == 1) {
const first_child = tree.first(item);
tree.select(first_child);
}

View File

@ -68,23 +68,23 @@ class CheckForXssFeatureTest(BaseFeatureTest):
self._tables_node_expandable()
self._check_xss_in_browser_tree()
self._check_xss_in_sql_tab()
self._check_xss_in_dependents_tab()
# sometime the tab for dependent does not show info, so refreshing
# the page and then again collapsing until the table node
retry = 2
while retry > 0:
try:
self.page.refresh_page()
self.page.wait_for_spinner_to_disappear()
self._tables_node_expandable()
self._check_xss_in_dependents_tab()
retry = 0
except WebDriverException as e:
print("Exception in dependent check {0}".format(retry),
file=sys.stderr)
if retry == 1:
raise e
retry -= 1
# retry = 2
# while retry > 0:
# try:
# self.page.refresh_page()
# self.page.wait_for_spinner_to_disappear()
# self._tables_node_expandable()
# self._check_xss_in_dependents_tab()
# retry = 0
# except WebDriverException as e:
# print("Exception in dependent check {0}".format(retry),
# file=sys.stderr)
# if retry == 1:
# raise e
# retry -= 1
# Query tool
self.page.open_query_tool()