Commit 530fd2ed by Csók Tamás Committed by Bach Dániel

selenium: changed line order error

parent 52f2a704
...@@ -286,11 +286,11 @@ class CircleSeleniumMixin(SeleniumMixin): ...@@ -286,11 +286,11 @@ class CircleSeleniumMixin(SeleniumMixin):
def save_template_from_vm(self, name): def save_template_from_vm(self, name):
try: try:
url_save = self.get_url()
WebDriverWait(self.driver, self.conf.wait_max_sec).until( WebDriverWait(self.driver, self.conf.wait_max_sec).until(
ec.element_to_be_clickable(( ec.element_to_be_clickable((
By.CSS_SELECTOR, By.CSS_SELECTOR,
"a[href$='/op/deploy/']"))) "a[href$='/op/deploy/']")))
url_save = self.get_url()
self.click_on_link(self.get_link_by_href("/op/deploy/")) self.click_on_link(self.get_link_by_href("/op/deploy/"))
fallback_url = "%sop/deploy/" % url_save fallback_url = "%sop/deploy/" % url_save
self.wait_and_accept_operation( self.wait_and_accept_operation(
...@@ -625,7 +625,8 @@ class CircleSeleniumMixin(SeleniumMixin): ...@@ -625,7 +625,8 @@ class CircleSeleniumMixin(SeleniumMixin):
recent_remove_disk = self.recently( recent_remove_disk = self.recently(
self.get_timeline_elements( self.get_timeline_elements(
"vm.Instance.remove_disk", url_save)) "vm.Instance.remove_disk", url_save))
if not self.check_operation_result(recent_remove_disk): if not self.check_operation_result(
recent_remove_disk, "a[href*='#activity']"):
logger.warning("Selenium cannot delete disk " logger.warning("Selenium cannot delete disk "
"of the chosen template") "of the chosen template")
raise Exception('Cannot delete disk') raise Exception('Cannot delete disk')
...@@ -738,7 +739,8 @@ class CircleSeleniumMixin(SeleniumMixin): ...@@ -738,7 +739,8 @@ class CircleSeleniumMixin(SeleniumMixin):
recent_destroy_vm = self.recently( recent_destroy_vm = self.recently(
self.get_timeline_elements( self.get_timeline_elements(
"vm.Instance.destroy", url_save)) "vm.Instance.destroy", url_save))
if not self.check_operation_result(recent_destroy_vm): if not self.check_operation_result(
recent_destroy_vm, "a[href*='#activity']"):
logger.warning("Selenium cannot destroy " logger.warning("Selenium cannot destroy "
"the chosen %(id)s vm" % { "the chosen %(id)s vm" % {
'id': pk}) 'id': pk})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment