From b9c7a9e887d9aaa3d52ef6e756641b8c97458396 Mon Sep 17 00:00:00 2001 From: Aditya Toshniwal Date: Wed, 4 Dec 2019 18:02:53 +0530 Subject: [PATCH] =?UTF-8?q?Fix=20the=20feature=20tests=20which=20were=20fa?= =?UTF-8?q?iling=20after=20the=20accessibility=20commit.=C2=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reason being, the span elements which was used to show properties tab data are changed to input now as per accessibility requirements. --- .../xss_checks_panels_and_query_tool_test.py | 16 ---------------- web/regression/feature_utils/pgadmin_page.py | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/web/pgadmin/feature_tests/xss_checks_panels_and_query_tool_test.py b/web/pgadmin/feature_tests/xss_checks_panels_and_query_tool_test.py index 15aad7be9..71b58c013 100644 --- a/web/pgadmin/feature_tests/xss_checks_panels_and_query_tool_test.py +++ b/web/pgadmin/feature_tests/xss_checks_panels_and_query_tool_test.py @@ -64,7 +64,6 @@ class CheckForXssFeatureTest(BaseFeatureTest): self.page.add_server(self.server) self._tables_node_expandable() self._check_xss_in_browser_tree() - self._check_xss_in_properties_tab() self._check_xss_in_sql_tab() # sometime the tab for dependent does not show info, so refreshing @@ -121,21 +120,6 @@ class CheckForXssFeatureTest(BaseFeatureTest): "Browser tree" ) - def _check_xss_in_properties_tab(self): - print( - "\n\tChecking the Properties tab for XSS vulnerabilities", - file=sys.stderr, end="" - ) - self.page.click_tab("Properties") - source_code = self.page.find_by_xpath( - "//span[contains(@class,'uneditable-input')]" - ).get_attribute('innerHTML') - self._check_escaped_characters( - source_code, - "<h1>X", - "Properties tab (Backform Control)" - ) - def _check_xss_in_sql_tab(self): print( "\n\tChecking the SQL tab for for XSS vulnerabilities", diff --git a/web/regression/feature_utils/pgadmin_page.py b/web/regression/feature_utils/pgadmin_page.py index 09fc30ac8..d3b089832 100644 --- a/web/regression/feature_utils/pgadmin_page.py +++ b/web/regression/feature_utils/pgadmin_page.py @@ -977,7 +977,7 @@ class PgadminPage: def element_if_it_exists(driver): try: element = find_method_with_args(driver) - if element.is_displayed() and element.is_enabled(): + if element.is_displayed(): return True except (NoSuchElementException, StaleElementReferenceException): return False