diff --git a/.zuul.yaml b/.zuul.yaml index 76811731..cfd851d0 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -11,6 +11,8 @@ jobs: - manila-ui-dsvm: voting: false + - manila-ui-integration-tests: + voting: false - horizon-openstack-tox-python3-django111 - horizon-openstack-tox-py27dj19 - horizon-openstack-tox-py27dj110 @@ -33,3 +35,29 @@ - openstack/manila-ui - openstack/python-manilaclient - openstack/manila-tempest-plugin + +- job: + name: manila-ui-integration-tests + parent: horizon-integration-tests + required-projects: + - name: openstack/horizon + - name: openstack/manila + - name: openstack/python-manilaclient + - name: openstack/manila-ui + - name: openstack/manila-tempest-plugin + roles: + - zuul: openstack-infra/devstack + - zuul: openstack/horizon + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ + vars: + devstack_plugins: + manila: git://git.openstack.org/openstack/manila + manila-ui: git://git.openstack.org/openstack/manila-ui + devstack_services: + horizon: true + tls-proxy: false + tox_envlist: integration + diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 00000000..144e285f --- /dev/null +++ b/bindep.txt @@ -0,0 +1,6 @@ +# selenium tests +firefox [selenium] +xvfb [selenium platform:dpkg] +# already part of xorg-x11-server on openSUSE +xorg-x11-server-Xvfb [selenium platform:redhat] + diff --git a/lower-constraints.txt b/lower-constraints.txt index b9cd1baa..2f0ed92d 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -94,6 +94,7 @@ requests==2.18.4 requestsexceptions==1.4.0 rfc3986==1.1.0 rjsmin==1.0.12 +selenium==2.50.1 semantic-version==2.6.0 simplejson==3.13.2 six==1.10.0 @@ -138,3 +139,4 @@ XStatic-smart-table==1.4.13.2 XStatic-Spin==1.2.5.2 XStatic-term.js==0.0.7.0 XStatic-tv4==1.2.7.0 +xvfbwrapper==0.1.3 diff --git a/manila_ui/tests/integration/__init__.py b/manila_ui/tests/integration/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/manila_ui/tests/integration/horizon.conf b/manila_ui/tests/integration/horizon.conf new file mode 100644 index 00000000..3fb7fca1 --- /dev/null +++ b/manila_ui/tests/integration/horizon.conf @@ -0,0 +1,4 @@ +[plugin] +is_plugin=True +plugin_page_path=manila_ui.tests.integration.pages +plugin_page_structure='{"Project": {"Share": {"_": ["Shares", "Share Snapshots", "Share Networks", "Security Services", "Share Groups", "Share Group Snapshots"]}}, "Admin": {"Share": {"_": ["Shares", "Share Snapshots", "Share Types", "Share Networks", "Security Services", "Share Servers", "Share Instances", "Share Groups", "Share Group Snapshots", "Share Group Types"]}}}' diff --git a/manila_ui/tests/integration/pages/__init__.py b/manila_ui/tests/integration/pages/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/manila_ui/tests/integration/pages/admin/__init__.py b/manila_ui/tests/integration/pages/admin/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/manila_ui/tests/integration/pages/admin/share/__init__.py b/manila_ui/tests/integration/pages/admin/share/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/manila_ui/tests/integration/pages/admin/share/securityservicespage.py b/manila_ui/tests/integration/pages/admin/share/securityservicespage.py new file mode 100644 index 00000000..c67e5ac7 --- /dev/null +++ b/manila_ui/tests/integration/pages/admin/share/securityservicespage.py @@ -0,0 +1,20 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from manila_ui.tests.integration.pages.project.share import \ + securityservicespage + + +class SecurityservicesPage(securityservicespage.SecurityservicesPage): + pass diff --git a/manila_ui/tests/integration/pages/admin/share/sharegroupsnapshotspage.py b/manila_ui/tests/integration/pages/admin/share/sharegroupsnapshotspage.py new file mode 100644 index 00000000..3e685abc --- /dev/null +++ b/manila_ui/tests/integration/pages/admin/share/sharegroupsnapshotspage.py @@ -0,0 +1,20 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from manila_ui.tests.integration.pages.project.share import \ + sharegroupsnapshotspage as sg_snapshots_page + + +class SharegroupsnapshotsPage(sg_snapshots_page.SharegroupsnapshotsPage): + pass diff --git a/manila_ui/tests/integration/pages/admin/share/sharegroupspage.py b/manila_ui/tests/integration/pages/admin/share/sharegroupspage.py new file mode 100644 index 00000000..62068dd1 --- /dev/null +++ b/manila_ui/tests/integration/pages/admin/share/sharegroupspage.py @@ -0,0 +1,19 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from manila_ui.tests.integration.pages.project.share import sharegroupspage + + +class SharegroupsPage(sharegroupspage.SharegroupsPage): + pass diff --git a/manila_ui/tests/integration/pages/admin/share/sharegroupssnapshotspage.py b/manila_ui/tests/integration/pages/admin/share/sharegroupssnapshotspage.py new file mode 100644 index 00000000..4616c951 --- /dev/null +++ b/manila_ui/tests/integration/pages/admin/share/sharegroupssnapshotspage.py @@ -0,0 +1,20 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from manila_ui.tests.integration.pages.project.share import \ + sharegroupsnapshotspage as sg_snapshots_page + + +class SharegroupssnapshotsPage(sg_snapshots_page.SharegroupssnapshotsPage): + pass diff --git a/manila_ui/tests/integration/pages/admin/share/sharegrouptypespage.py b/manila_ui/tests/integration/pages/admin/share/sharegrouptypespage.py new file mode 100644 index 00000000..ce2aa439 --- /dev/null +++ b/manila_ui/tests/integration/pages/admin/share/sharegrouptypespage.py @@ -0,0 +1,21 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from openstack_dashboard.test.integration_tests.pages import basepage + + +class SharegrouptypesPage(basepage.BaseNavigationPage): + def __init__(self, driver, conf): + super(SharegrouptypesPage, self).__init__(driver, conf) + self._page_title = "Share Group Types" diff --git a/manila_ui/tests/integration/pages/admin/share/shareinstancespage.py b/manila_ui/tests/integration/pages/admin/share/shareinstancespage.py new file mode 100644 index 00000000..00675ec1 --- /dev/null +++ b/manila_ui/tests/integration/pages/admin/share/shareinstancespage.py @@ -0,0 +1,21 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from openstack_dashboard.test.integration_tests.pages import basepage + + +class ShareinstancesPage(basepage.BaseNavigationPage): + def __init__(self, driver, conf): + super(ShareinstancesPage, self).__init__(driver, conf) + self._page_title = "Share Instances" diff --git a/manila_ui/tests/integration/pages/admin/share/sharenetworkspage.py b/manila_ui/tests/integration/pages/admin/share/sharenetworkspage.py new file mode 100644 index 00000000..f464c6e9 --- /dev/null +++ b/manila_ui/tests/integration/pages/admin/share/sharenetworkspage.py @@ -0,0 +1,19 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from manila_ui.tests.integration.pages.project.share import sharenetworkspage + + +class SharenetworksPage(sharenetworkspage.SharenetworksPage): + pass diff --git a/manila_ui/tests/integration/pages/admin/share/shareserverspage.py b/manila_ui/tests/integration/pages/admin/share/shareserverspage.py new file mode 100644 index 00000000..a2a26b76 --- /dev/null +++ b/manila_ui/tests/integration/pages/admin/share/shareserverspage.py @@ -0,0 +1,19 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from openstack_dashboard.test.integration_tests.pages import basepage + + +class ShareserversPage(basepage.BaseNavigationPage): + pass diff --git a/manila_ui/tests/integration/pages/admin/share/sharesnapshotspage.py b/manila_ui/tests/integration/pages/admin/share/sharesnapshotspage.py new file mode 100644 index 00000000..4085719b --- /dev/null +++ b/manila_ui/tests/integration/pages/admin/share/sharesnapshotspage.py @@ -0,0 +1,19 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from manila_ui.tests.integration.pages.project.share import sharesnapshotspage + + +class SharesnapshotsPage(sharesnapshotspage.SharesnapshotsPage): + pass diff --git a/manila_ui/tests/integration/pages/admin/share/sharespage.py b/manila_ui/tests/integration/pages/admin/share/sharespage.py new file mode 100644 index 00000000..425f85e9 --- /dev/null +++ b/manila_ui/tests/integration/pages/admin/share/sharespage.py @@ -0,0 +1,19 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from manila_ui.tests.integration.pages.project.share import sharespage + + +class SharesPage(sharespage.SharesPage): + pass diff --git a/manila_ui/tests/integration/pages/admin/share/sharetypespage.py b/manila_ui/tests/integration/pages/admin/share/sharetypespage.py new file mode 100644 index 00000000..c5dac138 --- /dev/null +++ b/manila_ui/tests/integration/pages/admin/share/sharetypespage.py @@ -0,0 +1,21 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from openstack_dashboard.test.integration_tests.pages import basepage + + +class SharetypesPage(basepage.BaseNavigationPage): + def __init__(self, driver, conf): + super(SharetypesPage, self).__init__(driver, conf) + self._page_title = "Share Types" diff --git a/manila_ui/tests/integration/pages/project/__init__.py b/manila_ui/tests/integration/pages/project/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/manila_ui/tests/integration/pages/project/share/__init__.py b/manila_ui/tests/integration/pages/project/share/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/manila_ui/tests/integration/pages/project/share/securityservicespage.py b/manila_ui/tests/integration/pages/project/share/securityservicespage.py new file mode 100644 index 00000000..44f0580e --- /dev/null +++ b/manila_ui/tests/integration/pages/project/share/securityservicespage.py @@ -0,0 +1,21 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from openstack_dashboard.test.integration_tests.pages import basepage + + +class SecurityservicesPage(basepage.BaseNavigationPage): + def __init__(self, driver, conf): + super(SecurityservicesPage, self).__init__(driver, conf) + self._page_title = "Security Services" diff --git a/manila_ui/tests/integration/pages/project/share/sharegroupsnapshotspage.py b/manila_ui/tests/integration/pages/project/share/sharegroupsnapshotspage.py new file mode 100644 index 00000000..7c2a9b31 --- /dev/null +++ b/manila_ui/tests/integration/pages/project/share/sharegroupsnapshotspage.py @@ -0,0 +1,21 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from openstack_dashboard.test.integration_tests.pages import basepage + + +class SharegroupsnapshotsPage(basepage.BaseNavigationPage): + def __init__(self, driver, conf): + super(SharegroupsnapshotsPage, self).__init__(driver, conf) + self._page_title = "Share Group Snapshots" diff --git a/manila_ui/tests/integration/pages/project/share/sharegroupspage.py b/manila_ui/tests/integration/pages/project/share/sharegroupspage.py new file mode 100644 index 00000000..13dca5e5 --- /dev/null +++ b/manila_ui/tests/integration/pages/project/share/sharegroupspage.py @@ -0,0 +1,21 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from openstack_dashboard.test.integration_tests.pages import basepage + + +class SharegroupsPage(basepage.BaseNavigationPage): + def __init__(self, driver, conf): + super(SharegroupsPage, self).__init__(driver, conf) + self._page_title = "Share Groups" diff --git a/manila_ui/tests/integration/pages/project/share/sharenetworkspage.py b/manila_ui/tests/integration/pages/project/share/sharenetworkspage.py new file mode 100644 index 00000000..d9b2651c --- /dev/null +++ b/manila_ui/tests/integration/pages/project/share/sharenetworkspage.py @@ -0,0 +1,21 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from openstack_dashboard.test.integration_tests.pages import basepage + + +class SharenetworksPage(basepage.BaseNavigationPage): + def __init__(self, driver, conf): + super(SharenetworksPage, self).__init__(driver, conf) + self._page_title = "Share Networks" diff --git a/manila_ui/tests/integration/pages/project/share/sharesnapshotspage.py b/manila_ui/tests/integration/pages/project/share/sharesnapshotspage.py new file mode 100644 index 00000000..b1f405a3 --- /dev/null +++ b/manila_ui/tests/integration/pages/project/share/sharesnapshotspage.py @@ -0,0 +1,21 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from openstack_dashboard.test.integration_tests.pages import basepage + + +class SharesnapshotsPage(basepage.BaseNavigationPage): + def __init__(self, driver, conf): + super(SharesnapshotsPage, self).__init__(driver, conf) + self._page_title = "Share Snapshots" diff --git a/manila_ui/tests/integration/pages/project/share/sharespage.py b/manila_ui/tests/integration/pages/project/share/sharespage.py new file mode 100644 index 00000000..fd7cb262 --- /dev/null +++ b/manila_ui/tests/integration/pages/project/share/sharespage.py @@ -0,0 +1,21 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from openstack_dashboard.test.integration_tests.pages import basepage + + +class SharesPage(basepage.BaseNavigationPage): + def __init__(self, driver, conf): + super(SharesPage, self).__init__(driver, conf) + self._page_title = "Shares" diff --git a/manila_ui/tests/integration/test_basic.py b/manila_ui/tests/integration/test_basic.py new file mode 100644 index 00000000..d20e8a3a --- /dev/null +++ b/manila_ui/tests/integration/test_basic.py @@ -0,0 +1,101 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from openstack_dashboard.test.integration_tests import helpers + + +class TestManilaDashboardInstalled(helpers.TestCase): + def test_shares_page_opened(self): + shares_page = self.home_pg.go_to_project_share_sharespage() + self.assertEqual(shares_page.page_title, + 'Shares - OpenStack Dashboard') + + def test_share_snapshots_page_opened(self): + s_snaps_page = self.home_pg.go_to_project_share_sharesnapshotspage() + self.assertEqual(s_snaps_page.page_title, + 'Share Snapshots - OpenStack Dashboard') + + def test_share_networks_page_opened(self): + s_networks_page = self.home_pg.go_to_project_share_sharenetworkspage() + self.assertEqual(s_networks_page.page_title, + 'Share Networks - OpenStack Dashboard') + + def test_security_services_page_opened(self): + sec_serv_page = self.home_pg.go_to_project_share_securityservicespage() + self.assertEqual(sec_serv_page.page_title, + 'Security Services - OpenStack Dashboard') + + def test_share_groups_page_opened(self): + share_groups_page = self.home_pg.go_to_project_share_sharegroupspage() + self.assertEqual(share_groups_page.page_title, + 'Share Groups - OpenStack Dashboard') + + def test_share_group_snapthots_page_opened(self): + sg_s_page = self.home_pg.go_to_project_share_sharegroupsnapshotspage() + self.assertEqual(sg_s_page.page_title, + 'Share Group Snapshots - OpenStack Dashboard') + + +class TestManilaAdminDashboardInstalled(helpers.AdminTestCase): + def test_shares_page_opened(self): + shares_page = self.home_pg.go_to_admin_share_sharespage() + self.assertEqual(shares_page.page_title, + 'Shares - OpenStack Dashboard') + + def test_share_snapshots_page_opened(self): + s_snapshots_page = self.home_pg.go_to_admin_share_sharesnapshotspage() + # TODO(e0ne): fix page title and test + self.assertEqual(s_snapshots_page.page_title, + 'Shares - OpenStack Dashboard') + + def test_share_snapshot_types_page_opened(self): + share_types_page = ( + self.home_pg.go_to_admin_share_sharetypespage()) + self.assertEqual(share_types_page.page_title, + 'Share Types - OpenStack Dashboard') + + def test_share_networks_page_opened(self): + s_networks_page = self.home_pg.go_to_admin_share_sharenetworkspage() + self.assertEqual(s_networks_page.page_title, + 'Share Networks - OpenStack Dashboard') + + def test_security_services_page_opened(self): + sec_serv_page = self.home_pg.go_to_admin_share_securityservicespage() + self.assertEqual(sec_serv_page.page_title, + 'Security Services - OpenStack Dashboard') + + def test_share_servers_page_opened(self): + share_serv_page = self.home_pg.go_to_admin_share_shareserverspage() + self.assertEqual(share_serv_page.page_title, + 'Share Servers - OpenStack Dashboard') + + def test_share_instences_page_opened(self): + sec_serv_page = self.home_pg.go_to_admin_share_shareinstancespage() + self.assertEqual(sec_serv_page.page_title, + 'Share Instances - OpenStack Dashboard') + + def test_share_groups_page_opened(self): + share_groups_page = self.home_pg.go_to_admin_share_sharegroupspage() + self.assertEqual(share_groups_page.page_title, + 'Share Groups - OpenStack Dashboard') + + def test_share_group_snapthots_page_opened(self): + sg_s_page = self.home_pg.go_to_admin_share_sharegroupsnapshotspage() + self.assertEqual(sg_s_page.page_title, + 'Share Group Snapshots - OpenStack Dashboard') + + def test_share_group_types_page_opened(self): + sg_types_page = self.home_pg.go_to_admin_share_sharegrouptypespage() + self.assertEqual(sg_types_page.page_title, + 'Share Group Types - OpenStack Dashboard') diff --git a/run_tests.sh b/run_tests.sh index 2b75c8aa..ae0d6347 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -331,7 +331,7 @@ function run_tests { function run_tests_subset { project=`echo $testargs | awk -F. '{print $1}'` - ${command_wrapper} python $root/manage.py test --settings=$project.tests.settings $testopts $testargs + ${command_wrapper} python $root/manage.py test --settings=$project.tests.settings --exclude-tag integration $testopts $testargs } function run_tests_all { @@ -344,7 +344,7 @@ function run_tests_all { ${command_wrapper} python -m coverage.__main__ erase coverage_run="python -m coverage.__main__ run -p" fi - ${command_wrapper} ${coverage_run} $root/manage.py test manila_ui --settings=manila_ui.tests.settings $testopts + ${command_wrapper} ${coverage_run} $root/manage.py test manila_ui --settings=manila_ui.tests.settings --exclude-tag integration $testopts # get results of the Horizon tests MANILA_UI_RESULT=$? diff --git a/test-requirements.txt b/test-requirements.txt index c3160e26..562deeed 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -13,3 +13,6 @@ testrepository>=0.0.18 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT reno>=2.5.0 # Apache-2.0 +# integration tests requirements +selenium>=2.50.1 # Apache-2.0 +xvfbwrapper>=0.1.3 #license: MIT diff --git a/tox.ini b/tox.ini index 7fe43d86..491c21fa 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,18 @@ commands = pip install {env:HORIZON_REPO:git+git://git.openstack.org/openstack/horizon} {[testenv]commands} +RIZON_INTEGRATION_TESTS_CONFIG_FILE=manila_ui/tests/integration/horizon.conf +[testenv:integration] +# Run integration tests only +passenv = AVCONV_INSTALLED +setenv = + PYTHONHASHSEED=0 + INTEGRATION_TESTS=1 + SELENIUM_HEADLESS=1 + HORIZON_INTEGRATION_TESTS_CONFIG_FILE=manila_ui/tests/integration/horizon.conf +basepython = python2.7 +commands = {envpython} {toxinidir}/manage.py test manila_ui --settings=manila_ui.tests.settings --tag integration + [testenv:pep8] basepython = python3 commands = flake8