Fixed feature test failures occurring due to tree changes.

This commit is contained in:
Yogesh Mahajan 2023-01-04 10:44:22 +05:30 committed by GitHub
parent e987b3074d
commit 3841bc5253
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 3 deletions

View File

@ -75,6 +75,7 @@ class CheckForXssFeatureTest(BaseFeatureTest):
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
@ -112,6 +113,10 @@ class CheckForXssFeatureTest(BaseFeatureTest):
table_node = self.page.check_if_element_exists_with_scroll(
TreeAreaLocators.table_node(self.test_table_name))
self.assertTrue(bool(table_node),
self.test_table_name + ' table node not found.')
table_node.click()
def _check_xss_in_browser_tree(self):

View File

@ -65,6 +65,10 @@ class CheckDebuggerForXssFeatureTest(BaseFeatureTest):
self.test_db, 'public', "Functions")
function_node = self.page.check_if_element_exists_with_scroll(
TreeAreaLocators.function_node(self.function_name + "()"))
self.assertTrue(bool(function_node),
self.function_name + ' function node not found.')
function_node.click()
def _debug_function(self):

View File

@ -65,6 +65,8 @@ class CheckRoleMembershipControlFeatureTest(BaseFeatureTest):
"Server", self.server['name'], self.server['db_password'],
'Login/Group Roles'):
retry = 0
else:
retry -= 1
role_node = self.page.check_if_element_exists_with_scroll(
TreeAreaLocators.role_node(role))

View File

@ -337,7 +337,7 @@ class PgadminPage:
self.click_modal('Yes')
time.sleep(1)
else:
print("%s Server is not removed", server_config['name'],
print(server_config['name'] + " server is not removed",
file=sys.stderr)
def click_to_expand_tree_node(self, tree_node_web_element,
@ -580,7 +580,7 @@ class PgadminPage:
server_child_expanded = self.click_to_expand_tree_node(
child_node_ele, server_child_node_exp_status_xpath)
if not server_child_expanded:
print("Child not is not expanded after clicking ",
print("Child is not expanded after clicking ",
file=sys.stderr)
else:
print("The server/previous nodes not expanded", file=sys.stderr)
@ -1154,7 +1154,7 @@ class PgadminPage:
else:
break
else:
print("check_if_element_exists_with_scroll > Element NOT found",
print("check_if_element_exists_with_scroll > Element NOT found" +
xpath, file=sys.stderr)
return False