Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bareos/bareos-webui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author[Aron Schueler] <aron.schueler@dass-it.de>2018-03-15 18:18:10 +0300
committerFrank Bergkemper <frank.bergkemper@bareos.com>2018-03-15 19:08:45 +0300
commitd80f2968535110cbaaf453efffc9a79c29328a95 (patch)
tree6bef88d23c5e5f0a5f8505d64f3990670faad98e
parentbfbab4388c2d61713213a159ee5313c8764ee717 (diff)
Fix logout, a job test and wrong env variable
Signed-off-by: Frank Bergkemper <frank.bergkemper@bareos.com>
-rw-r--r--tests/selenium/README.md2
-rwxr-xr-xtests/selenium/webui-selenium-test.py8
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/selenium/README.md b/tests/selenium/README.md
index 60be403..16a94be 100644
--- a/tests/selenium/README.md
+++ b/tests/selenium/README.md
@@ -27,7 +27,7 @@ To run the test you must set certain environment variables:
BAREOS_BASE_URL=http://127.0.0.1/bareos-webui/
BAREOS_USERNAME=admin
BAREOS_PASSWORD=linuxlinux
-BAREOS_CLIENT=bareos-fd
+BAREOS_CLIENT_NAME=bareos-fd
BAREOS_RESTOREFILE=/etc/passwd
BAREOS_LOG_PATH=/tmp/selenium-logs/
BAREOS_DELAY=1
diff --git a/tests/selenium/webui-selenium-test.py b/tests/selenium/webui-selenium-test.py
index 0d0f4dc..ce23bad 100755
--- a/tests/selenium/webui-selenium-test.py
+++ b/tests/selenium/webui-selenium-test.py
@@ -160,7 +160,7 @@ class WebuiSeleniumTest(unittest.TestCase):
self.wait_and_click(By.ID, 'menu-topnavbar-job')
self.wait_and_click(By.LINK_TEXT, 'Run')
- Select(driver.find_element_by_id('job')).select_by_visible_text('backup-%s' % self.client)
+ Select(driver.find_element_by_id('job')).select_by_visible_text('backup-bareos-fd')
Select(driver.find_element_by_id('client')).select_by_visible_text(self.client)
Select(driver.find_element_by_id('level')).select_by_visible_text('Incremental')
# Clears the priority field and enters 5.
@@ -180,6 +180,7 @@ class WebuiSeleniumTest(unittest.TestCase):
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
@@ -255,10 +256,7 @@ class WebuiSeleniumTest(unittest.TestCase):
self.wait_for_spinner_absence()
def logout(self):
- if self.browser == 'chrome':
- self.wait_and_click(By.CSS_SELECTOR, 'a.dropdown-toggle')
- else:
- self.wait_and_click(By.LINK_TEXT, self.username)
+ self.wait_and_click(By.CSS_SELECTOR, 'a.dropdown-toggle')
self.wait_and_click(By.LINK_TEXT, 'Logout')
sleep(self.sleeptime)