Commit Graph

46 Commits

Author SHA1 Message Date
Zuul 7896fd8c77 Merge "Increase the default explicit_wait and page_timeout values" 2023-09-01 20:17:10 +00:00
Radomir Dopieralski e001a590db Increase the default explicit_wait and page_timeout values
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
2023-08-14 11:36:58 +02:00
Radomir Dopieralski 36536272ff Add pytest-based selenium tests
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
2023-08-08 11:45:20 +00:00
Radomir Dopieralski 480aba9422 Bump XStatic-JQuery to make it work with jquery-migrate
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
2023-07-10 18:15:18 +05:30
Tatiana Ovchinnikova 4743c6c748 Integration test navigation machinery for Angular pages
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
2022-09-26 14:19:50 -05:00
manchandavishal a42235f6f7 Update cirros image to cirros-0.5.2-x86_64
Due to this change I12e0bdb3699e5343592ab834468ba6b2fcdcaaf4
our integration job is failing. This patch update cirror image
version to fix our CI.

Change-Id: I991fb9750ab9e35b67b06154764487375dd11d73
2021-03-16 17:11:06 +05:30
Oleksii Petrenko 97797197af Add allow_delete_snapshot_before_volume config option
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
2020-09-17 16:57:26 +03:00
manchandavishal e7c17fd9e0 Update cirros image to cirros-0.5.1-x86_64
Due to this change I6ccd646f1c22a99bed0bebf6e363d2190241b667
our integration job is failing. This patch update cirror image
version to fix our CI.

Change-Id: Ie56fada7c58b73d55efb8b140fea4d6cca79ba31
2020-05-28 08:26:10 +00:00
Pallav Gupta 039b208f7f remove hardcoded test_reports dir
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
2020-05-20 16:41:08 -05:00
Akihiro Motoki 4ef9ba94c0 Avoid duplicated maintenance of integration test config
Configurations of the integration tests are maintained both
in horizon.conf and in-code configuration. It is redundant.

Configurations of the integration tests are defined by oslo.config.
We can use default values from them and generate a sample config file
using oslo-config-generator.

This commit drops horizon.conf and generates the sample config.
We no longer have horizon.conf, so the logic to load the config files
is updated accordingly.

Also makes the usage of single and double quotes in config.py consistent.

Change-Id: Id16c9fd4114316ade63c74097e486623d0c5be9f
2020-01-10 00:55:43 +09:00
Zuul 99ade30436 Merge "Fix volumes and volume_snapshots integration tests" 2019-12-02 20:13:30 +00:00
Pallav Gupta 7b7cabd071 Fix volumes and volume_snapshots integration tests
The aim of this PS is to fix existing skipped integration
tests related to volumes and volume_snapshots listed below:
  - TestAdminVolumes.test_volume_create_edit_delete
  - TestVolumesActions.test_volume_extend
  - TestVolumesBasic.test_volume_create_edit_delete
  - TestAdminVolumes.test_volumes_pagination
  - TestVolumesBasic.test_volumes_pagination
  - TestVolumeSnapshotsAdmin.test_create_edit_delete_volume_snapshot
  - TestVolumeSnapshotsBasic.test_create_edit_delete_volume_snapshot
  - TestVolumeSnapshotsAdmin.test_volume_snapshots_pagination
  - TestVolumeSnapshotsAdvanced.test_create_volume_from_snapshot
  - TestVolumeSnapshotsBasic.test_volume_snapshots_pagination

This PS also resolves Partial-Bug: #1792028

Change-Id: I31a8d681f87d22ce8486de38ba6c01be9c9cc469
2019-10-12 13:42:51 -05:00
Pallav Gupta f77656cd43 Fix add member integration test
The aim of this PS is to fix skipping add_member
integration test and fixes bugs listed below:
  - Related-Bug: #1777359
  - Partial-Bug: #1774697

Change-Id: I225f9934383c368b03aad00e59d2c7545e144d1e
2019-10-10 10:24:59 -05:00
Pallav Gupta 558f6701ab Fix router integration tests
The aim of this PS is to fix skipped router integration tests
listed below:
  - test_router_add_delete_interface (Partial-Bug: #1792028)
  - test_router_delete_interface_by_row (Partial-Bug: #1792028)
  - test_router_overview_data (Partial-Bug: #1792028)
  - test_router_create_admin (Partial-Bug: #1792028)

Change-Id: I82b15d347831762808b17fbda8c944a1ee5de564
2019-10-04 06:00:57 +00:00
Pallav Gupta a945d41812 Fix skipped integration tests for securitygroup, namespace, usersettings
The aim of this PS is to fix existing skipped integration
tests listed below:
 - test_namespace_create_delete (Partial-Bug: #1774697)
 - test_securitygroup_create_delete (Partial-Bug: #1792028)
 - test_managerules_create_delete_by_table (Partial-Bug: #1792028)
 - test_managerules_create_delete_by_row (Partial-Bug: #1792028)
 - test_password_change (Related-Bug: #1776678)
 - test_show_message_after_logout (Related-Bug: #1776678)

Change-Id: Ifcbab546e81059f90b500337df565c20ac50bbbb
2019-09-26 13:03:06 +05:30
nicolas 78e382c3a5 Selenium tests fail when response is slow.
Increased implicit wait on message pop ups.
Gives time for slow connections to wait for message.

Find_elements retry. Gives an additional opportuninty
for elements to be found.

Additional attempts for _execute gives time for
elements to move or dissapear when collision is a
problem.

Change-Id: I94670628c179f7291162f2c25947673f03106fc2
Closes-Bug: #1813670
2019-08-09 10:44:50 +00:00
Ivan Kolodyazhny 35e9338672 Align default integration config values with code
Let's make default config as an example and keep it in consistency with
a code.

Change-Id: I869c31d617e4a3e5be5d69714e59770c38458d33
2019-02-04 20:47:35 +02:00
nicolas fe69104738 Add domain support for specialized test login
Some test servers require the domain parameter for login.
This small change provides support for servers that require
this additional login step.

Change-Id: Ia9f94b687ee6d3318fa61ad3f446b21ed6cfea6a
Closes-Bug: #1802343
2018-11-12 21:06:37 +00:00
Akihiro Motoki 64b67ac9e9 Update the doc links to the newest ones
The docstring of getExtensions service in cinder.service.js
was a copy from nova service and not correct. The docstring was
updated based on the current cinder v2 API.

Thanks to a recent improvement in reno, touching release notes
in older releases in the master branch no longer polute the rendered
release notes. Changing URLs (or other things) in the master branch
does not affect the rendered release notes, but updating URLs to the
latest would help avoiding mechanical patches of updating links :)

Change-Id: I2aec3adeb400323d42a3a5083f8bc0798eeff917
2018-03-20 16:22:05 +09: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
Matt Borland e8e84c2db4 Flavors panel can switch to Angular
This patch enables all of the features for the Flavors panel to use Angular but
disables it, so that it is easy to switch on/off.

Note that we add integration test switches since it can't read the Django
conf.

Note that I changed the common tests to allow for testing of api calls that
don't produce error toasts, because we needed better branch coverage, and
the deleteFlavor api wasn't fully branch-tested.

Change-Id: I92b1b57bd486e5eb87179cb8d44b7551e9de2e0f
Partially-Implements: blueprint ng-flavors
2016-10-11 15:49:55 -07:00
Matt Borland 20bc6e1516 Make 'switch' between legacy and Angular Images
This patch follows on the example that the Containers set, providing
a 'switch' in the panel-enablement file that currently defaults to
'legacy' (Python-based Images panel) and allows for 'angular' (Angular-
based Images panel).

To be clear, this does NOT enable Angular Images.  It's just setting the
stage to do so at some point, or to allow deployers/devs to easily switch
between the two.

A switch both for HORIZON_CONFIG and for integration tests is necessary
due to the way integration tests operate.

Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Change-Id: I12cd33552218ed1082d2d9a2ae8982639a217a6a
Partially-Implements: blueprint angularize-images-table
2016-08-05 08:17:21 -06:00
Jenkins c116704394 Merge "Provide integration test for managing a project's members" 2016-05-04 10:11:23 +00:00
TatyanaGladysheva eda58de3f6 Added test for check stacks creation and deletion functionality
Test checks that create/delete stacks actions are executed without
errors under admin user.
Stacks page object was defined similar to other pages.

Few other modifications I've made:
* horizon.conf - service_available section with new heat option
* stack template is added as separate file

Depends-On: I1f5dc1220aee39103289a579583095346cce0354
Implements blueprint: horizon-integration-tests-coverage
Change-Id: Ibc549f9ae4eac17d8e92d65afe1c5cee9be6e72e
2016-04-20 11:14:02 +03:00
Vlad Okhrimenko f623281b29 Provide integration test for managing a project's members
A new MembershipMenuRegion was implemented specifically for the task
of dealing with Users being assigned to a Projects. It may be re-used
in other tests as well, which deal with the same membership concept
(e.g., Flavor Access control).

The checker method .is_the_current_page() is changed to act either as
a boolean method, or as an internal assert method.

Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Implements blueprint: horizon-integration-tests-coverage
Change-Id: Ie661a1522951e1e86c461c6ec284fcf4a3e6d6fb
2016-04-20 07:48:27 +00:00
AlexandraAllakhverdieva a2baaf1182 Test for images (create volume/launch instance from image)
Added test_create_volume_from_image()
Added test_launch_instance_from_image()

Implements blueprint: horizon-integration-tests-coverage
Change-Id: Ib127e8516596c0bcf0259f9cc6054d6171a26ee2
2016-02-16 12:02:09 +00:00
Jenkins 5af1205c9d Merge "Add configuration mechanism to turn off browser maximisation" 2016-02-11 12:05:06 +00:00
Richard Jones af505dacd1 Add configuration mechanism to turn off browser maximisation
Having the window maximise during a test run makes it difficult
to work with other windows, especially on a single-monitor
computer. This patch removes the maximisation call.

This patch also adds a "local" configuration mechanism to allow
developers to have local configuration of the integration test
environment without it affecting the git repository.

Change-Id: I8a7acbe40deaec5cca904526e3f3c8bc3357744c
Closes-Bug: 1540719
2016-02-11 07:05:22 +11:00
Timur Sufiev 0419b0e2e6 Ensure that integration tests are being run in proper project
Admin users run tests in an admin project, regular users run them in a
demo project. That should prevent situations when tests don't have an
access to a resources created in a project different from the current
one.

Closes-Bug: #1542211
Change-Id: I497648ce5126e187744b5795bd524b7aba22c7a6
2016-02-10 09:40:52 +00:00
dkorn 91c385d0b3 Integration tests - networkspage and test
Added the networkspage based on the new regions. The method
test_network_create uses the new page navigation and checks basic
private network creation and deletion.

A few other modifications being made:
* horizon.conf:
  * the network section, containing network_cidr, The cidr block to
    allocate tenant ipv4 subnets from, same as in tempest.conf
  * added neutron to service_available section
* config.py:
  * 'network_cidr' under the new NetworkGroup
  * 'neutron' under AvailableServiceGroup, default=True

Implements blueprint: horizon-integration-tests-coverage
Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Change-Id: Ia4a499bc93ac79aaf03c291c7bdbc96ccea93351
2016-02-08 14:32:36 +00:00
AlexandraAllakhverdieva 600a67301d Add test_images_pagination()
Test for images pagination has been added.
Changes of TableRegion class:
1) Locators of 'Next' and 'Prev' links are added
2) Methods is_next_link_available() and is_prev_link_available()
3) Methods for pages navigation added: next_page() and prev_page()a
4) update assert_definition method to have list instead of srt for
'Names' key
5) change 'next' locator
6) Minor changes: remove unused class,
rename next_page/prev_page methods

Implements blueprint: horizon-integration-tests-coverage
Change-Id: Ibaf9dd02a06cf9d945bc9b894394695512a934b9
2016-02-06 06:51:23 +00:00
Serhii Vasheka abad2d3af4 Added tests for check volumes management functionality
Tests check that create/edit/delete volumes actions are executed without
errors under admin and non-admin user.
Volumes page object was defined similar to other pages.
'volume' section is added to horizon.conf

Implements blueprint: horizon-integration-tests-coverage
Change-Id: Ib2c2bcb98bd010232fea404e565591cf6140383f
2016-01-30 09:18:12 +00:00
Timur Sufiev 596fa7623a Remove redundant dashboard.login_url setting from horizon.conf
It can be easily derived from dashboard.dashboard_url setting.

Implements blueprint: integration-tests-improvements-part1
Change-Id: Ia5cd8fef334fa3d53ac978cd7c32c316e5c61e05
2016-01-18 21:51:32 +03: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
mavinagi faa6324280 Integration tests - Instances tests
Added instancespage based on the new regions.
test_instances checks the instance createion and deletion.

Few other modifications I've made:
* forms:
- removed "div >" from checkbox locator, to identify "default" checkbox in
  "launch_instance->Access & Security ->default"
*horizon.conf
- Added [launch_instances] to include instances attributes from config file
*config
- Added InstancesGroup to include [launch_instances] from horizon.conf

Partially implements blueprint: integration-tests-hardening

Change-Id: I7d58a970fd36ff86021f3f050c5d01586a26599c
2015-10-17 07:44:09 +00:00
Serhii Vasheka bc109d33ed Add _save_screenshot functionality to helpers.
Having screenshot of failed test might increase speed of
understanding the failure reason.

partially-implements blueprint: selenium-integration-testing

Depends-On: I0fd89ede7a3d04ce9b4bd4c8fba0789770048d40
Change-Id: Ibc4a6235423736e5938fb348bbe83211917b08d1
2015-09-16 12:40:38 +03:00
Martin Pavlasek 81eb5113df Use default values in horizon.conf
Default values in horizon.conf and config.py differs.

Closes-Bug: 1433123
Partially implements blueprint: selenium-integration-testing
Change-Id: I2975ca696949969eabd7213f99229ff4d139bec4
2015-06-17 21:14:11 +00:00
Tomas Novacik 7b16bbf920 Add test_sahara_image_registry
Add simple test for page under /Project/Data Processing/Image Registry,
that registers and unregisters an image in the Sahara registry.

Infrastructure changes needed by the test:
 - new page object with basic handling of the Image Registry page;
 - new ssh_user config option with the cloud-init username for the
   image (named after the corresponding tempest option);
 - new parameter in get_row() table method for exact match;
 - add "wait-until-active" method for the Image page;
 - enable sahara service by default in horizon.conf.

Partially implements blueprint: selenium-integration-testing
Co-Authored-By: Luigi Toscano <ltoscano@redhat.com>

Change-Id: I1e389f0baff655f8f06a0a6cbb4a10b9a68dd444
2015-03-05 11:36:00 +01:00
Masco Kaliyamoorthy 193e66792f adopt namespace-less oslo imports
oslo.config is now deprecated, so switching
from oslo.config to right package oslo_config.

similarly oslo.serialization also deprecated, it
is also switched to oslo_serialization from
oslo.serialization.

Change-Id: I52eff48a17a555750379e4ca6bb024fc71a4efeb
Closes-Bug: #1409733
2015-01-21 12:15:07 +05:30
dkorn edfa9e2229 Integration tests - Imagespage and test
The images page is based on tnovacik's regions patches.
test_image_create_delete uses the new page navigation and checks basic
image creation and deletion.

Few other modifications I've made:
* horizon.conf - the image section, containing http accessible image,
  same as in tempest.conf.
* config.py - 'http_image' under the new ImageGroup

Partially implements blueprint: selenium-integration-testing

Change-Id: I554fdd3e4690be8acc1be1dbdc2f3180297f8be4
2015-01-15 16:32:19 +02:00
Tomas Novacik e5ab83caf3 Add _wait_till_text_present_in_element method
* add selenium configuration group
* add implicit/explicit wait and set page timeout

Partially implements blueprint: selenium-integration-testing

Change-Id: If39a5dcbac45635ad9988edfdc1830aeabc663a4
2014-12-07 15:48:31 +01:00
Jenkins 92f18fa443 Merge "Add test skip decorator when service not available" 2014-08-06 15:23:34 +00:00
Tomas Novacik 043dea952c Add test skip decorator when service not available
Adding services_required decorator that can be used for decorating test classes
as well as test methods. Decorator expects as arguments services that
should be available during test execution.

Skipping decorators are not available in the nose python library,
therefore custom skipping decorator has to be made.

Partially implements blueprint: selenium-integration-testing

Change-Id: I6de4ec75ef9dc56f1ed11057d8b30bb0a782c6e3
2014-08-06 15:25:08 +02:00
Daniel Korn afeba92fb9 Verify Help button redirects to the right URL
When choosing "Help", in the top bar user drop-down menu,
the browser should redirect to http://docs.openstack.org/
Different distributions might customize the redirection URL,
but the above should be the default.

I added test_dashboard_help_redirection.py, go_to_help_page
method in basepage and the help_url value to horizon.conf
(also forced a change in config.py)

Partially implements blueprint: selenium-integration-testing
Closes-Bug #1350408

Change-Id: I64e661690ee9c26eb9d69092024465ab1c15b8a1
2014-07-31 16:33:13 +03:00
He Yongli e790ac070e Remove extraneous vim configuration comments
Remove vim setting:
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4

at the top of source code files, except for files in
openstack/common.

Change-Id: I9a5c6b17c6ef7ecec601f4503dfc7b31fc72e90a
Close-bug: #1229324
2014-05-06 15:30:10 +08:00
Julie Pichon b4b0e1a887 Integration tests - running the tests
Initial setup for running the integration tests. A basic test is
included to ensure this works, although it will be rewritten to follow
the Page Object pattern. Thanks to Daniel Korn for the initial test.

https://wiki.openstack.org/wiki/Horizon/Testing/UI

Implements blueprint: selenium-integration-testing

Change-Id: Id5b62cdeac5295667a3922f7bed1db3c7617f841
2014-02-26 10:45:21 +00:00