mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Replace Alertify alert and confirm with React-based model dialog. Fixes #7053
This commit is contained in:
@@ -647,16 +647,15 @@ SELECT 1, pg_sleep(300)"""
|
||||
(By.CSS_SELECTOR, "td.channel"), "foo")
|
||||
)
|
||||
print("OK.", file=sys.stderr)
|
||||
self.page.clear_query_tool()
|
||||
|
||||
print("\tNotify event with data... ", file=sys.stderr, end="")
|
||||
if self._supported_server_version():
|
||||
self.page.clear_query_tool()
|
||||
self.page.execute_query("SELECT pg_notify('foo', 'Hello')")
|
||||
self.page.click_tab('Notifications')
|
||||
self.wait.until(WaitForAnyElementWithText(
|
||||
(By.CSS_SELECTOR, 'td.payload'), "Hello"))
|
||||
print("OK.", file=sys.stderr)
|
||||
self.page.clear_query_tool()
|
||||
else:
|
||||
print("Skipped.", file=sys.stderr)
|
||||
|
||||
@@ -724,8 +723,6 @@ SELECT 1, pg_sleep(300)"""
|
||||
# Search for 'Output' word in result (verbose option)
|
||||
canvas.find_element(By.XPATH, "//*[contains(string(), 'JIT')]")
|
||||
|
||||
self.page.clear_query_tool()
|
||||
|
||||
|
||||
class WaitForAnyElementWithText(object):
|
||||
def __init__(self, locator, text):
|
||||
|
||||
@@ -78,9 +78,8 @@ class CheckDebuggerForXssFeatureTest(BaseFeatureTest):
|
||||
try:
|
||||
wait = WebDriverWait(self.page.driver, 2)
|
||||
is_error = wait.until(EC.presence_of_element_located(
|
||||
(By.XPATH, "//div[contains(@class, 'alertify') and "
|
||||
"not(contains(@class, 'ajs-hidden'))]//div["
|
||||
"contains(@class,'ajs-header')]")
|
||||
(By.XPATH, "//div[@class ='MuiDialogTitle-root']"
|
||||
"//div[text()='Debugger Error']")
|
||||
))
|
||||
|
||||
except TimeoutException:
|
||||
@@ -91,11 +90,10 @@ class CheckDebuggerForXssFeatureTest(BaseFeatureTest):
|
||||
click = True
|
||||
while click:
|
||||
try:
|
||||
self.page.click_modal('OK')
|
||||
self.page.click_modal('OK', True)
|
||||
wait.until(EC.invisibility_of_element(
|
||||
(By.XPATH, "//div[contains(@class, 'alertify') and "
|
||||
"not(contains(@class, 'ajs-hidden'))]//div["
|
||||
"contains(@class,'ajs-header')]")
|
||||
(By.XPATH, "//div[@class ='MuiDialogTitle-root']"
|
||||
"//div[text()='Debugger Error']")
|
||||
))
|
||||
click = False
|
||||
except TimeoutException:
|
||||
|
||||
Reference in New Issue
Block a user