It seems that our testing environment is becoming slower and slower
every day, and we are now getting test errors because a page didn't
load in time, or a modal didn't load. Increasing the timeouts should
help with that.
Change-Id: Ib2fc75ae87cdcbfc2da77bead75c71aba387ad3a
This is a patch to start work on re-writing the integration tests
using pytest syntax and several improvements, as proposed on the
upstream meeting, and summarized at https://etherpad.opendev.org/p/horizon-pytest
The new tests are to eventually replace the existing integration
tests. At the moment they don't run automatically, you have to explicitly run them using tox or pytest. When the new tests are complete, we will switch to them on the gate.
Change-Id: Iea38e4f9771ff3cae7ae8675863e9c488f3f6d8a
The jquery-migrate 3 requires newer jquery than we have.
Also added all the other fixes for integration tests to see
if that resolves our problems.
This needs to be merge first so that patch which update the
upper bump of XStatic-JQuery in openstack/requiremensts [1]
can be merged.
Note: This patch also make horizon-integration job to non-voting
so that we can merge this patch and once openstack/requirements
[1] patch is merged, we will make horizon-integartion job voting
again
[1] https://review.opendev.org/c/openstack/requirements/+/887933
Co-Author-By: manchandavishal <manchandavishal143@gmail.com>
Change-Id: I9b8a5e8abe734e7fd99aa0066ede0377e34fbf44
Check and close all the popup messages in one step
and return all the levels of present messages.
There is no longer necessary to use a separate step for checking
presence/absence of Success message, Error message, etc.
Change-Id: I15a0dbe99282f00c5970d9d7d5c9b480989e9e14
The way we were handling attaching video in integration tests, it would
not attach it if the error happened in a cleanup, not in the main body
of the test. This should fix that.
Change-Id: I356e6849892ed87b2827740e265fcf15fc076cb5
Add wait until checkbox is in active state.
Fix edit_image_description_and_name test.
Add wait until the name text box is filled by default name (is not empty).
In the other case selenium write new name into text box faster than default
name is written there so default name then rewrite the new name.
Change-Id: I56803e19dd80180cc432ca872a28a7ee7f41290d
There's an implementation of navigation modules for pages written
in Angular.
Legacy tests for images page are rewritten to work with the new
navigation.
Change-Id: Ib8a40f0adb0a46c9d646c6796a4242988eefa6e3
We have a place in the form-handling code where we look for the
blue form submit button, and if it's not found, we look for the
red form submit button. It looks correct at first glance, however
it takes 10 seconds to throw NoSuchElementException, because there
is a delay that makes sure that the page loads fully before raising
that exception. Replacing this with a selector that finds both the
blue and the red buttons in one query speeds the whole integration
tests suite by half an hour, because there is no more waiting on
every delete confirmation dialog.
Change-Id: Ie256118c0a84a8868393018b25b0aa049582a17d
The most elegant way to add pagination is to refactor the table using
<hz-dynamic-table> which already contains pagination instead of wiring
it to the existing table framework.
This solution adds the pagination and makes the code more readable.
Partial-Bug: #1859423
Change-Id: I18d6b4f33b274dadc90d73d8fd10efa5b09cb4d2
Added pagination support to the networks page under
Project and Admin Dashboard.
To accomplish so, the method network_list_for_tenant
in api/neutron.py that is used for listing networks under
the Project Dashboard was refactored to merge the different
requests for shared, non-shared and external networks while
tracking the pagination for each of those requests, so for
instance when all the shared networks are listed and paginated
then the non-shared networks are queried and so on.
For the Admin dashboard all network types are retrieved under
a single request so it is a simpler pagination logic.
Partial-Bug: #1746184
Change-Id: I96a2d6cabed47c89bdc02ec922d7f9451e5ec025
The tacker-horizon integration test framework has been implemented[1]
While adding integration test cases a selenium exception [2] was
observed for test cases under directory [3].
Tacker-horizon UI Details:
* Most of the Horizon plugins, such as manila-ui and vitrage-dashboard
support integration tests, these plugins reside under "Project" tab.
* Whereas, tacker-horizon, mistral-dashboard are horizon plugins which
have their dashboard anchored directly at the top-level alongside
"Project" tab.
* The tacker-horizon has two-panel groups,
* VNF Management
* NFV Orchestration
* The "VNF Management" is a default panel and remains expanded in NFV
dashboard, whereas "NFV Orchestration" is collapsed initially.
Selenium Exception Details:
* The horizon framework reports an exception
ElementNotInteractableException, while opening pages under
"NFV Orchestration" panel group.
* This error occurs when an element is not clicked or it is not visible
yet.
* The menu item expansion code in the horizon integration framework
expands only those menu items (level first, second or third) if only
the previous menu item at the same level was expanded earlier.
* For example, in order to open a page[4] under NVF Orchestration panel
group, the framework collapses "Project" tab and clicks "NFV"
dashboard.
But it never expands "NFV Orchestration" panel as in second-level no
such transition occured hence it remains collapsed. So test case fails
to find desired page.
On the other hand, test cases for pages under "VNF Management" succeed
as the panel group by default remains open.
This patch adds functionality to detect collapsed menu items and expand
the items.
[1] https://review.opendev.org/c/openstack/tacker-horizon/+/790958
[2] https://zuul.opendev.org/t/openstack/build/b8bd1618206945b68ebdbcdc7f1bdf10/console
[3] tacker_horizon/test/integration/pages/nfv/nfv_orchestration/
[4] tacker_horizon/test/integration/pages/nfv/nfv_orchestration/vimmanagementpage.py
Change-Id: I8fec54eb5f2a9bf218ee36e9c0a1ce9c15c97a26
Looks like the popup that comes up after creating instances is no
longer a SUCCESS, but instead it's INFO.
This patch fixes integration tests which were using the incorrect
message class and revisits all other tests skipped with the same
bug number reason.
Change-Id: I0e2976b56513df3cb45ea00e0f9f05603a8743a8
Closes-bug: #1774697
Previously the router interface test in the integration tests
checked the status of an added router interface, but the initial
status varies depending on a network backend used in neutron.
In case of neutron L3 agent, a new router interface has "Down" status,
but in case of OVN a new router interface has "Active" status.
This caused the integration test failure after DevStack switched
the default network backend from ML2/OVS to ML2/OVN.
The initial status of a new router interface depends on a network
backend and the neutron API does not define the initial status,
so it is too strict for the horizon integration tests to check
the status. This commit drops the status check.
It is sufficient to check the existence of a new router interface.
Change-Id: Idfd4a9206e85558ba17e476a47b38ee9c1f566fa
Closes-Bug: #1930405
Most units (KB, MB, GB, TB, PB) are shown in an abbreviated format.
The exception were bytes, which where shown as "Bytes". This commit
resolves this inconsistency by showing "B" for byte units.
Change-Id: Ied94c777a70bf8955f5a328ffcb63d98a7a2befd
Closes-Bug: 1411595
Signed-off-by: Iago Estrela <hiagoestrelas@gmail.com>
Also, rename instance_id field to proper port_id.
Before this change, when instance_id was passed from the Instances
page in the URL, the information would be lost on form submission,
and if the form contained an error, the it would be redisplayed with
the port drop-down containing all ports from all instances. This also
made submitting this form slow, as the drop-down would be populated
with all ports on form validation.
It also creates a bug, where if there are more instances than Nova's
pagination allows, the ports from newer instances would no longer
appear in the drop-down, and the form would fail to validate, even
though the choice of port on initial form was correct.
Closes-bug: #1920010
Change-Id: I3ab26c19dc9ea1ed23fcff790d0db919039099eb
Due to this change I12e0bdb3699e5343592ab834468ba6b2fcdcaaf4
our integration job is failing. This patch update cirror image
version to fix our CI.
Change-Id: I991fb9750ab9e35b67b06154764487375dd11d73
Collections Abstract Base Classes have been moved to the
collections.abc module, which was part of the collections
module before[1] [2]. Usage from the collections module
directly is deprecated and will be removed from 3.10.
This commit updates to import abc module explicitly
wherever required as the same will no longer be visible/directly
used from the collections module.
[1] https://docs.python.org/3/library/collections.abc.html
[2] http://paste.openstack.org/show/802512/
Change-Id: I173f4d647474c21c5d062280bd5703edffb4978e
All strings are considered as unicode strings in python 3,
so we no longer need "u" prefix (u'...').
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I796d2fcdca066475bbf29d25cbf2aa67b2b2178b
Firefox will throw an "HTTP method not allowed" error randomly when
trying to retrieve the browser log. This change will prevent the
selenium test from failing when that happens, and instead logs
the exact exception that happened as the content of that log.
Change-Id: I3384c3cfdf87f475bf62b2df6b895569723eb187
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
This patch removes test-data to run integration test for heat
but heat is no longer a part of the horizon as it has a separate
plugin heat-dashboard. So this patch removes heat test-data.
Change-Id: Id2427c26dd8708b06b941fdd4e3cba0b2dd98808
In python3, super() does not always require a class and self reference.
In other words, super() is enough for most cases.
This is much simpler and it is time to switch it to the newer style.
pylint provides a check for this.
Let's enable 'super-with-arguments' check.
NOTE: _prepare_mappings() method of FormRegion in
openstack_dashboard/test/integration_tests/regions/forms.py is refactored.
super() (without explicit class and self referece) does not work when
a subclass method calls a same method in a parent class multiple times.
It looks better to prepare a separate method to provide a common logic.
Change-Id: Id9512a14be9f20dbd5ebd63d446570c7b7c825ff
Adds allow_delete_snapshot_before_volume config option, that controls
whether to test only situation where first test deletes volume and
then snapshot or also second situation, where first test deletes
snapshot and then volume. Second situation is impossible with Ceph [1].
[1] https://docs.openstack.org/cinder/ussuri/drivers.html#rbddriver
Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Change-Id: Ib422331892f077d78e3f2efbdd88abafc4c52b9a
* Add fetch-video-output role based on fetch-tox-output
* Fix test log collection to work with Python3
* Fix page HTML source log
Change-Id: I2e865cc5544d6e77bc3af5e413cbaedceb6df1c1
Fixes image and flavor selecting when creating instances.
Before this patch, selenium selected wrong column to compare
image names. This is reproduced when table consists of two or
more images, and the first image in table is not the one, that
we are looking for.
Change-Id: Iaedcdaaabb63c5f60d057fbd7927556a6038b89c
Due to this change I6ccd646f1c22a99bed0bebf6e363d2190241b667
our integration job is failing. This patch update cirror image
version to fix our CI.
Change-Id: Ie56fada7c58b73d55efb8b140fea4d6cca79ba31
The aim of this PS is to remove hardcoded test_reports dir path
so test run can get screenshot dir from the specified configuration.
Change-Id: I454ccdccbed93b831c41199481caf8b5eb302337
The aim of this PS is to fix existing skipped instances
integration tests listed below:
- TestAdminInstances.test_create_delete_instance
- TestInstances.test_create_delete_instance
This PS also resolves Partial-Bug: #1774697
Change-Id: I9c2385274a2725409f61137ae201d868d24a56b4
since other test are using pytest.mark.skip
see [1] for a list of test that use that approach
for bug 1774697
This allow skip summary report to group like skip
reason to work.
[1] https://github.com/openstack/horizon/search?q=1774697&unscoped_q=1774697
Change-Id: I6a4cd0e472225baca70bd00a1df89060209b04e5
Switching the test runner to pytest in horizon assumes pytest is always
installed, but horizon test helpers are used in horizon plugin tests and
pytest is not used in horizon plugin tests. As a result, all horizon plugin
tests are now broken.
This commit considers a case where pytest does not exist.
A wrapper decorator for pytest.mark.xxxx is introduced and
it acts as a null decorator if pytest is not installed.
Change-Id: I80736b108f5ae9a36c0e756bf386468879be3293
Closes-Bug: #1873532
Changes test invocation from `manage.py test` to `pytest`. Adds addtitional
test requirements like pytest, pytest-django, pytest-html. Adds
`pytest.mark` alongside django's test `tag`. Adds posibility to export test
results into xml and html formats.
Depends-On: https://review.opendev.org/#/c/712315/
Related-Bug: #1866666
Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Change-Id: Idb6e63cd23ca2ba8ca56f36eb8b63069bd211944