~ubuntu-branches/ubuntu/vivid/horizon/vivid

« back to all changes in this revision

Viewing changes to openstack_dashboard/test/integration_tests/helpers.py

  • Committer: Package Import Robot
  • Author(s): Corey Bryant, Chuck Short, Corey Bryant, James Page
  • Date: 2015-01-05 16:42:06 UTC
  • mfrom: (0.10.1) (1.3.1) (76.1.1 vivid-proposed)
  • Revision ID: package-import@ubuntu.com-20150105164206-r1f68jciur8psblv
Tags: 1:2015.1~b1-0ubuntu1
[ Chuck Short ]
* Open for Kilo.
* d/control: Update bzr branches 
* d/patches/embedded-xstatic.patch: Refreshed
* d/patches/add-juju-environment-download.patch: Temporarily disabled.

[ Corey Bryant ]
* New upstream release.
  - d/control: Align requirements with upstream.
  - d/watch: Update uversionmangle for kilo beta naming.
* d/control: Bumped Standards-Version to 3.9.6.

[ James Page ]
* d/bundle-xstatic.sh: Tweak grep to be case insensitive.
* d/p/add-juju-environment-download.patch: Rebase for kilo-1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
import os
14
14
 
15
 
import selenium
16
15
from selenium.webdriver.support import ui
17
16
import testtools
18
17
import xvfbwrapper
19
18
 
20
19
from openstack_dashboard.test.integration_tests import config
21
20
from openstack_dashboard.test.integration_tests.pages import loginpage
 
21
from openstack_dashboard.test.integration_tests import webdriver
22
22
 
23
23
 
24
24
class BaseTestCase(testtools.TestCase):
30
30
                self.vdisplay = xvfbwrapper.Xvfb(width=1280, height=720)
31
31
                self.vdisplay.start()
32
32
            # Start the Selenium webdriver and setup configuration.
33
 
            self.driver = selenium.webdriver.Firefox()
 
33
            self.driver = webdriver.WebDriverWrapper()
34
34
            self.driver.maximize_window()
35
35
            self.conf = config.get_config()
36
 
            self.driver.implicitly_wait(self.conf.dashboard.page_timeout)
 
36
            self.driver.implicitly_wait(self.conf.selenium.implicit_wait)
 
37
            self.driver.set_page_load_timeout(self.conf.selenium.page_timeout)
37
38
        else:
38
39
            msg = "The INTEGRATION_TESTS env variable is not set."
39
40
            raise self.skipException(msg)
64
65
        self.home_pg.go_to_home_page()
65
66
        self.home_pg.log_out()
66
67
        super(TestCase, self).tearDown()
 
68
 
 
69
 
 
70
class AdminTestCase(BaseTestCase):
 
71
    def setUp(self):
 
72
        super(AdminTestCase, self).setUp()
 
73
        self.login_pg = loginpage.LoginPage(self.driver, self.conf)
 
74
        self.login_pg.go_to_login_page()
 
75
        self.home_pg = self.login_pg.login(
 
76
            user=self.conf.identity.admin_username,
 
77
            password=self.conf.identity.admin_password)
 
78
 
 
79
    def tearDown(self):
 
80
        self.home_pg.log_out()
 
81
        super(AdminTestCase, self).tearDown()