mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Remove the usage of MUI makeStyles as it doesn't support React 18. #7363
This commit is contained in:
@@ -291,40 +291,25 @@ class PGUtilitiesBackupFeatureTest(BaseFeatureTest):
|
||||
server_types = default_binary_path.keys()
|
||||
path_already_set = True
|
||||
for serv in server_types:
|
||||
if serv == 'pg' and server_version is not None and \
|
||||
default_binary_path['pg'] != '':
|
||||
path_input = \
|
||||
self.page.find_by_css_selector(
|
||||
"div[class='pgrd-row-cell'][title='PostgreSQL {}']"
|
||||
"+div[class='pgrd-row-cell'] input"
|
||||
.format(server_version)
|
||||
)
|
||||
existing_path = path_input.get_property("value")
|
||||
if existing_path != default_binary_path['pg']:
|
||||
path_already_set = False
|
||||
self.page.clear_edit_box(path_input)
|
||||
path_input.click()
|
||||
path_input.send_keys(default_binary_path['pg'])
|
||||
elif serv == 'ppas' and server_version is not None and \
|
||||
default_binary_path['ppas'] != '':
|
||||
path_input = \
|
||||
self.page.find_by_xpath(
|
||||
"//div[span[text()='EDB Advanced Server {}']]"
|
||||
"/following-sibling::div//div/input".format(
|
||||
server_version))
|
||||
existing_path = path_input.get_property("value")
|
||||
if existing_path != default_binary_path['ppas']:
|
||||
path_already_set = False
|
||||
path_input = self.page.find_by_xpath(
|
||||
"//div[span[text()='EDB Advanced Server {}']]"
|
||||
"/following-sibling::div//div/input".format(
|
||||
server_version))
|
||||
self.page.clear_edit_box(path_input)
|
||||
path_input.click()
|
||||
path_input.send_keys(default_binary_path['ppas'])
|
||||
if server_version is not None:
|
||||
server_type = 'PostgreSQL' if serv == 'pg' \
|
||||
else 'EDB Advanced Server'
|
||||
path_input_css = "div[class='pgrd-row-cell ']" \
|
||||
"[title='{0} {1}']" \
|
||||
"+div[class='pgrd-row-cell '] input"\
|
||||
.format(server_type, server_version)
|
||||
path_input = self.page.find_by_css_selector(path_input_css)
|
||||
if default_binary_path[serv] != '':
|
||||
existing_path = path_input.get_property("value")
|
||||
if existing_path != default_binary_path[serv]:
|
||||
path_already_set = False
|
||||
self.page.clear_edit_box(path_input)
|
||||
path_input.click()
|
||||
path_input.send_keys(default_binary_path[serv])
|
||||
else:
|
||||
print('Binary path Key is Incorrect')
|
||||
else:
|
||||
print('Binary path Key is Incorrect or '
|
||||
'server version is None.')
|
||||
print('Server version is None.')
|
||||
|
||||
# save and close the preference dialog.
|
||||
if path_already_set:
|
||||
|
||||
@@ -360,7 +360,7 @@ class QueryToolJourneyTest(BaseFeatureTest):
|
||||
def _check_history_queries_and_icons(self, history_queries, history_icons):
|
||||
# Select first query history entry
|
||||
self.page.find_by_css_selector(
|
||||
QueryToolLocators.query_history_specific_entry.format(2)).click()
|
||||
QueryToolLocators.query_history_specific_entry.format(1)).click()
|
||||
for icon, query in zip(history_icons, history_queries):
|
||||
# Check query
|
||||
query_history_selected_item = self.page.find_by_css_selector(
|
||||
|
||||
@@ -213,7 +213,7 @@ class CheckForXssFeatureTest(BaseFeatureTest):
|
||||
# Check for history entry
|
||||
history_ele = self.page\
|
||||
.find_by_css_selector(
|
||||
QueryToolLocators.query_history_specific_entry.format(2))
|
||||
QueryToolLocators.query_history_specific_entry.format(1))
|
||||
|
||||
source_code = history_ele.get_attribute('innerHTML')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user