Commit Graph

19 Commits

Author SHA1 Message Date
Zuul 502ac4bfaa Merge "[Cleanup] Remove unused attributes" 2020-12-03 18:19:20 +00:00
manchandavishal ee667919c3 [Cleanup] Remove unused attributes
Consistency Groups and Consistency Group Snapshots support
already dropped in the horizon during train release. So this patch
removes these parameters from integration_tests/pages/navigation.py
file.

Change-Id: Ia80271f70a2f7a3228d26d5892ea14971bb4d1f2
2020-12-01 07:27:46 +00:00
manchandavishal 85d75107cf Add integration-test for Volume Group Type
This patch adds integration-tests for volume group-type.

Change-Id: I032bfb10ce6cccfed63b963437392576c9fbb488
Closes-Bug: #1892679
2020-11-26 11:05:31 +00:00
Ivan Kolodyazhny d870b40583 Remove six usage from openstack_dashboard package
We don't support Python 2 anymore so we don't need this
compatibility library.

six.reraise usages are left as is until it'll be moved to some
base lib like oslo.utils to not re-implenent this method in
Horizon.

This patch also removes Python2-specific base test case methods
assertItemsEqual and assertNotRegexpMatches in flavor of new
Python 3 analogues.

Change-Id: I26a59176be9e9f213128e4945a58b9459334b626
2020-01-15 12:47:48 +02:00
Ivan Kolodyazhny 43f8c3b1f5 Switch integration tests to run with python3
tox env for the integration tests is now renamed to 'integration'
as it is no longer run under python 2.7.

__hash__() method is now defined in integration_tests.helpers.BaseTestCase
to avoid unhashable error during loading django test runner. This is
originally caused by the fact that the base testcase class for integration
tests is implemented on top of testtools and testtools does not define
__hash__() method. In Python 3, __hash__() method must be defined
if a class (re)defines __eq__() method to make the class hashable [1].
Ideally integration base TestCase class can be implemented on top of
Django test case, but the current implementation depends on features
from testtools a lot, so it seems better to add __hash__() method
as a workaround.

Unbound methods don't exist in Python 3[2], so six.create_unbound_method
doesn' work as expected. To dynamic method generation we have to use new
descriptors interface [3] or just generate new
functools.partialmethod [4] function introduced in Python 3.4 to
generate class methods with pre-defined 'path' argument and pass 'self'
as a first function argument for class instance.

[1] https://docs.python.org/3.5/reference/datamodel.html#object.__hash__
[2] https://six.readthedocs.io/#six.create_unbound_method
[3] https://docs.python.org/3/howto/descriptor.html
[4] https://docs.python.org/3/library/functools.html#functools.partialmethod

Change-Id: I5c3078bdc66e33fe676d431bb28d92b35faaf479
2019-03-05 09:10:01 +00:00
panneer.smn 15574cad5c Integration test fixes
* fixed 37 tests in total
* restructured and renamed test modules as per horizon
* fixed page navigation & updated method calls
* fixed css selector and xpaths as per horizon
* Removed decorators.skip for working tests
* included decorators.skip for non - working tests
* updated description for tests as per horizon navigation
* removed *update flavor info* and *update flavor access* test, as feature unavailable on horizon
* updated table column name references in page modules
* updated bind table action names as per horizon
* included help page navigation checkpoint
* fixed rc file download drop down selection
* updated page titles in test modules
* included calls as required for spinner disappearance
* updated form fields as per test needs
* updated default ipv4 and subnet for router interfaces
* included string conversion as required for comparisons
* updated cirros image name in horizon.conf

Change-Id: I9fdc810b37443b616bbb82956d1c90a0fa5ebd6b
2018-06-21 10:59:31 +03:00
Akihiro Motoki eac3e7032a Drop Heat related code from horizon
Orchestration tab in the admin info panel needs a discussion.
It seems not to be covered by heat-dashboard yet.

blueprint heat-dashboard-split-out

Change-Id: I56e6edb1f2ac72e2f42d0e9f3291308e67f24cad
2017-12-05 07:38:55 +00:00
Akihiro Motoki e6b78f92f2 Use flake8-import-order plugin
In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
This flake8 plugin is already used in tempest.
It enforces loose checking so it sounds good to use.

Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.

Change-Id: I8ccd05eb70350a2441cc2a4d1eafc09ee690b83b
2017-07-03 08:02:23 +00:00
Erik Olof Gunnar Andersson 72e154e7d0 Fixing types.MethodType signature for Python 3.5
The signature for MethodType has changed in Python 3,
and the current implementation won't work, to fix this
we are replacing it with the py 2/3 compatible
python-six equivalent, six.create_unbound_method.
http://six.readthedocs.io/#six.create_unbound_method

This is causing the Python 3.5 tests to fail for the
octavia-dashboard when importing the navigation.py
file, throwing the following error.
> TypeError: method expected 2 arguments, got 3

The following review to fix the gate for the
octavia-dashboard is depending on this patch.
https://review.openstack.org/#/c/471611/

This can also be reproduced by simply executing
navigation.py using Python 3.5.
> python3.5 nagivation.py

Change-Id: Iebca15ae962a1aa0825c6ba6d482206531726696
2017-06-07 12:22:57 -07:00
Cady_Chen 51fe944449 Replace six.iteritems(iter) with iter.items()
As mentioned in [1], we should avoid using six.iteritems(iter) to
achieve iterators. We can use iter.items() instead, as it will
return iterators in PY3 as well.

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: Ieadd5fa69b3f6058c0641a5b96ef3e8e1e3f6cc2
2016-12-14 11:13:20 +08:00
Georgy Dyuldin 257546e2a4 Fix bug with tabs navigation
This patch limit tab switch link search to main content only

Change-Id: Ia2a0f38b823f1b38823d3899c4c3ab56a89a7cf4
Closes-Bug: 1549635
2016-02-26 09:51:31 +03:00
Jenkins 78cbb5eec2 Merge "Add test for create/delete Namespace inside "Metadata Definitions"" 2016-02-10 09:27:44 +00:00
Alexander Koryagin d0faff8b5a Add test for create/delete Namespace inside "Metadata Definitions"
Implements blueprint: horizon-integration-tests-coverage
Change-Id: I04fda1a6c97e8d59c758c705c1b6861f8e347240
2016-02-09 16:01:57 +03:00
Timur Sufiev f93c392586 Fix i9n tests pluggable nav structure
Since JSON converted into Python object contains only dicts and lists,
when searching for leaf-nodes in sidebar nav structure we should treat
lists the same way as tuples. Also remove 'Data Processing' section
from CORE_PAGE_STRUCTURE which hid this issue before with 2 initlal
sahara-dashboard tests.

Change-Id: I5b84fd3b769ae559cea484319b6b8956b80f99ae
Closes-Bug: #1540245
2016-02-01 16:46:05 +03:00
Jenkins bd189bc2e9 Merge "Make integration tests pluggable" 2015-12-31 01:24:29 +00:00
Timur Sufiev 4dad7c5004 Fix 3-components accessors for TabbedTables in i9n tests
When using just 2 last segments of the path to table for generating
accessor method name it's possible that resulting names will clash,
say for Project->Compute->Volumes->Volumes and for
Admin->System->Volumes->Volumes. To avoid this situation, we need to
use 3 components name for tables which are at 4th level of nesting.

Change-Id: If63ae14a99f4c53030927f96a69b7189bd83c4e5
Closes-Bug: #1467615
2015-12-17 08:51:28 +00:00
David Lyle 28e14b7141 Make integration tests pluggable
There are 2 possible setups when running integration tests for
Horizon plugins.

The first setup, which we suggest to be used in gate of *-dashboard
plugins is to get horizon as a dependency of a plugin and then run
integration tests using horizon.conf config file inside plugin
repo. This way plugin augments the location of Horizon built-in Page
Objects with the location of its own Page Objects, contained within
`plugin_page_path` option and the Horizon built-in nav structure with
its own nav structure contained within `plugin_page_structure`. Then
plugin integration tests are run against core Horizon augmented with
just this particular plugin content.

The second setup may be used when we need to run integration tests for
Horizon + several plugins. In other words, content from several
plugins is merged into core Horizon content, then the combined
integration tests from core Horizon and all the involved plugins are
run against the resulting dashboards. To make this possible both
options `plugin_page_path` and `plugin_page_structure` have
MultiStrOpt type. This means that they may be defined several times
and all the specified values will be gathered in a list, which is
iterated when running integration tests. In this setup it's easier to
run the tests from Horizon repo, using horizon.conf file within it.

Keep in mind that `plugin_page_structure` needs to be a strict JSON
string, w/o trailing commas etc.

This patch as well removes leftfovers of sahara integration tests from
Horizon repo, in order for core Horizon integration tests to
pass. Sahara integration tests are moved to the CR
https://review.openstack.org/#/c/253614

Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Change-Id: I99718970af78feeafc25dbb3aa9639ea2cf401ad
2015-12-08 07:34:52 +00:00
Victor Stinner 070bde3e21 Replace dict.iteritems() with six.iteritems(dict)
The iteritems() method of Python 2 dictionaries was renamed to items()
on Python 3. The overhead of creating a temporary list for items() on
Python 2 is negligible.

Replace also dict.itervalues() with six.itervalues(dict) in
horizon/test/utils.py.

Partial-Implements: blueprint porting-python3
Change-Id: Ib2d62236be2620c4626099ce80e6c8a9397a4533
2015-07-24 12:20:56 +02:00
Tomas Novacik bace1f573f Add navigation among pages
Add navigation module that provides navigation across pages.
Modify existing test cases so they can benefit from the navigation module.

* Navigation class - navigation mixin that adds navigation
  functionality to PageObject class

* BaseNavigationPage - base class for pages that want to use
  navigation

Partially implements blueprint: selenium-integration-testing

Change-Id: I7a2145a599fe22613a6d5bfd6feaabd116ec0279
2014-12-21 10:07:04 +02:00