Fix feature tests following button tooltip changes.

pull/7/head
Khushboo Vashi 2018-01-23 10:01:20 +00:00 committed by Dave Page
parent 0ec74dfa89
commit 8df006343b
3 changed files with 6 additions and 4 deletions

View File

@ -78,7 +78,7 @@ class PGDataypeFeatureTest(BaseFeatureTest):
(By.XPATH, "//*[contains(string(), 'Show system objects?')]"))
)
self.page.find_by_css_selector(".ajs-maximize").click()
self.page.find_by_css_selector(".ajs-dialog.pg-el-container .ajs-maximize").click()
sql_editor = self.page.find_by_xpath(
"//*[contains(@class,'aciTreeLi') and contains(.,'SQL Editor')]")
@ -99,11 +99,12 @@ class PGDataypeFeatureTest(BaseFeatureTest):
# save and close the preference dialog.
self.page.find_by_xpath(
"//*[contains(@class,'btn-primary') and contains(.,'OK')]").click()
"//*[contains(@class,'pg-alertify-button') and contains(.,'OK')]").click()
self.page.wait_for_element_to_disappear(
lambda driver: driver.find_element_by_css_selector(".ajs-modal")
)
time.sleep(0.5)
def _create_enum_type(self):
query = """CREATE TYPE public.rainbow AS ENUM ('red', 'orange',

View File

@ -63,8 +63,9 @@ class CheckDebuggerForXssFeatureTest(BaseFeatureTest):
try:
wait = WebDriverWait(self.page.driver, 2)
is_error = wait.until(EC.presence_of_element_located(
(By.XPATH, "//div[contains(@class,'ajs-header')]"))
(By.XPATH, "//div[contains(@class, 'alertify') and not(contains(@class, 'ajs-hidden'))]//div[contains(@class,'ajs-header')]"))
)
except TimeoutException as e:
is_error = None

View File

@ -80,7 +80,7 @@ class CheckRoleMembershipControlFeatureTest(BaseFeatureTest):
'<h1>test</h1>',
'Role Membership Control'
)
self.page.find_by_xpath("//button[contains(.,'Cancel')]").click()
self.page.find_by_xpath("//button[contains(@type, 'cancel') and contains(.,'Cancel')]").click()
def _check_escaped_characters(self, source_code, string_to_find, source):
# For XSS we need to search against element's html code