Feature test fixes:

The query tool element while running on jenkins, is present on the DOM but not visible due to comparatively small page size. So handle it , would work in both cases(if element is visible or not).
The tab name handles XSS characters due to which table name <h1> is shown modified accordingly in the tab name.
This commit is contained in:
Usman Muzaffar 2019-06-27 10:19:57 -04:00 committed by Dave Page
parent 0d42f8026c
commit bdb8f20aed

View File

@ -66,9 +66,8 @@ class CheckForXssFeatureTest(BaseFeatureTest):
self._check_xss_in_query_tool()
self._check_xss_in_query_tool_history()
self.page.close_query_tool()
# Query tool view/edit data
self.page.open_view_data(self.test_table_name)
self.page.open_view_data(self.test_db)
self._check_xss_view_data()
self.page.close_data_grid()
@ -189,7 +188,6 @@ class CheckForXssFeatureTest(BaseFeatureTest):
"\n\tChecking the query tool history for the XSS",
file=sys.stderr, end=""
)
self.page.fill_codemirror_area_with(
"select '<script>alert(1)</script>"
)
@ -212,9 +210,8 @@ class CheckForXssFeatureTest(BaseFeatureTest):
)
# Check for history details message
history_ele = self.page.find_by_css_selector(
".query-detail .content-value"
)
history_ele = self.driver\
.find_element_by_css_selector(".query-detail .content-value")
source_code = history_ele.get_attribute('innerHTML')