diff options
author | [Aron Schueler] <aron.schueler@dass-it.de> | 2018-04-12 19:04:07 +0300 |
---|---|---|
committer | Frank Bergkemper <frank.bergkemper@bareos.com> | 2018-04-20 13:55:16 +0300 |
commit | ab9156bfee0c2afd4b7c98d820f3fec20552bb74 (patch) | |
tree | 4edb8d4fa8e753ef3bf75c4d16d08c8eb6b65ba1 | |
parent | 41c4b88bc7f373af697c36e286284fe1faf38c95 (diff) |
Minor job_cancel fix
Signed-off-by: Frank Bergkemper <frank.bergkemper@bareos.com>
-rwxr-xr-x | tests/selenium/webui-selenium-test.py | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/tests/selenium/webui-selenium-test.py b/tests/selenium/webui-selenium-test.py index 664466d..3c3b481 100755 --- a/tests/selenium/webui-selenium-test.py +++ b/tests/selenium/webui-selenium-test.py @@ -266,15 +266,10 @@ class WebuiSeleniumTest(unittest.TestCase): return b def job_cancel(self, id): - # Go to job list - self.wait_and_click(By.ID, 'menu-topnavbar-job') - # Click on the object that has id in its url - self.wait_and_click(By.ID, 'btn-1') - #self.wait_for_url_and_click('/bareos-webui/job/details/%s' % id) - # Wait for the cancel button to load - #self.wait_for_element(By.XPATH, '//*[@title="Cancel"]') - # Click on cancel button - #self.wait_and_click(By.XPATH, '//*[@title="Cancel"]') + # Wait for the cancel button + self.wait_for_element(By.ID, "//a[@id='btn-1'][@title='Cancel']") + # Click the cancel button + self.wait_and_click(By.ID, "//a[@id='btn-1'][@title='Cancel']") def job_start_configured(self): driver = self.driver @@ -299,15 +294,6 @@ class WebuiSeleniumTest(unittest.TestCase): self.wait_and_click(By.CSS_SELECTOR, 'span.input-group-addon') # Submit the job self.wait_and_click(By.ID, 'submit') - # After the now-generated site has loaded, save the job id - self.wait_for_spinner_absence() - # Count how many digits are at the end of the url / how long the id is - job_id = driver.current_url.split('/')[-1] - # If the current URL doesn't end with a digit we didn't start the job properly. - if not job_id.isdigit(): - raise BadJobException - - return job_id def login(self): driver = self.driver |