Commit Graph

105 Commits

Author SHA1 Message Date
Jan Jasek 2964a50fd4 Stability improvement of Instance tests
Change-Id: Ia3a0d433002a1703c400c33b5901c3bca08d91bd
2023-04-25 12:58:23 +00:00
Ashish Gupta ed947b453f Unskipping test_floatingip_associate_disassociate test case
Change-Id: I31d73269364fc3a4fa26bf8759852f84ca9b25e0
2023-04-04 02:50:33 +05:30
Jan Jasek c88583e33a Change of the procedure how the popup messages are checked
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
2023-03-17 13:09:10 +01:00
Jan Jasek b14958df8b Fix instance error with attribute cells.
Selenium read data faster than the data are loaded.
Added wait until element is visible.

Change-Id: I2975ea5836a898d113a2baaab6a8f9bf8af8d742
2022-11-03 11:29:12 +01:00
Jan Jasek 01c4ab920d Fix delete image tests.
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
2022-10-17 17:13:04 +02:00
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
Rodrigo Barbieri 196de449b6 Implement pagination in admin/proj network tab
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
2022-02-16 18:15:48 -03:00
Radomir Dopieralski e53c4d8ca0 Fix the instances pagination integration tests
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
2021-07-28 21:00:05 +00:00
Radomir Dopieralski 3d82d57353 Save instace_id inside Associate Floating IP workflow
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
2021-03-18 12:39:23 +01:00
Akihiro Motoki e5d09edc20 Use python3-style super()
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
2020-10-15 14:37:20 +09:00
Pallav Gupta ad41fe5106 Fix instances integration tests
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
2020-05-20 00:20:54 -05: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 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
Akihiro Motoki cebe212d00 Bump hacking to 1.1.0
Fix the following new errors:
* E305 expected 2 blank lines after class or function definition, found 1
* E126 continuation line over-indented for hanging indent

max_line_length is set to 80 as the default value in pycodestyle is 79
but horizon uses 80 as max_line_length.

Ignore W504 and F405 by configurations.
Reasons of disabling them are explained as comments in tox.ini.

Change-Id: Iee8bcd60c30883fc8c74f08cf20af853cbb5e271
2018-11-10 16:44:25 +09: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
Zuul 3e0da5b91c Merge "Fix W503 warnings" 2018-04-24 09:48:08 +00:00
Guillaume Le Blanc e362626031 Allow OVA upload for images
Bug #1641383 was not fixed for REST API call.
The two implementation of create_image_metadata are merged
into api/glance.py.

There were minor differences in field naming and handling
(min_ vs minimum_, is_public vs public vs visibility).
This commit normalizes them to simplify the logic.

Closes-Bug: #1757136
Change-Id: I41e9d94345151bc4473d704cdc040ed77870ce45
2018-04-16 16:49:35 +02:00
Akihiro Motoki 11eb4e9d3e Fix W503 warnings
W503 line break before binary operator

Looking at the code base, it sounds okay to follow this check.

Change-Id: Id511e0104dc6de5b204021661d4a8776ca6d3658
2018-04-11 18:13:47 +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
yanghuichan 7adb3f548b Replace dict.iteritems() with dict.items() in horizon
1.As mentioned in [1], we should avoid using dict.iteritems()
to achieve iterators. We can use dict.items instead, as it will
return iterators in PY3 as well. And dict.items/keys will more
readable.
2.In py2, the performance about list should be negligible,
see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.htmls

Change-Id: Idba02079d76b529b344ae96cebb7d6161c0ecbc6
2017-08-01 08:31:49 +08: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
Ying Zuo 85df9f41b3 Remove type field and type description for create volume from a snapshot
The new volume should have the same type as the snapshot that the volume
is created from. Setting a different type will get an error from the API.

This behavior should be the same when creating a volume from the Volumes
tab and the Volume Snapshots tab.

Closes-bug: #1582458

Change-Id: I0443eb5c6cb18538ff76fc49d4018221691a2ea2
2016-10-21 17:41:54 +00:00
Jenkins 0254853577 Merge "Fixed inconsistent names set for BatchAction" 2016-09-29 02:12:59 +00:00
Akihiro Motoki b89c1abfa5 Multiple integration test fixes
This patch represents the following patches, combined:

---

integration tests: retry WebDriver instantiation when conn refused
  https://review.openstack.org/#/c/375042/

We see connection refused which leads to integration test failure randomly.
This seems to come from high load of test infra. This commit retries
WebDriver instantiation when connection refused is returned.

There is no confident this workaround works, but it would be great
if this reduces the number of failures. Let's try.

---

integration test: ensure IPv4 address is extracted
  https://review.openstack.org/#/c/374826/

In test_floatingip_associate_disassociate, IPv6 address is passed
to Floating IP associate API. This commit ensures to pick up IPv4
address of an instance.

Change-Id: Iba71d1e17e252527a82cd53c34dca35723367b28
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Partial-Bug: #1626643
Closes-Bug: #1626536
2016-09-23 17:59:48 +09:00
Ying Zuo 14ab4d1c0c Fixed inconsistent names set for BatchAction
The name of a BatchAction should be one word.

Change-Id: I5172454b23a5aab951a089f05b0f5a04e1a72ba6
Closes-bug: #1626210
2016-09-21 12:57:27 -07:00
Julie Pichon cf0aac9400 Support for Glance v2
Implements wrappers necessary for Horizon to work with either Glance
v1 or v2 and removes the dependency on the Glance v1 endpoint.
Handles the differences between setting properties with v1 and v2 and
restricts some Glance functions that aren't supported in v2.

Implements blueprint: horizon-glance-v2
Co-Authored-By: Travis Tripp <travis.tripp@hp.com>
Co-Authored-By: Brad Pokorny <Brad_Pokorny@symantec.com>
Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Co-Authored-By: Liuqing Jing <jing.liuqing@99cloud.net>

Change-Id: Icca91c53eabf18c3109b3931ed53f70eaaaa0e56
2016-09-12 11:16:33 -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 c2fc95eb48 Merge "Revert "Prevent creation of subnet via RBAC during new network creation"" 2016-07-14 21:50:31 +00:00
David Lyle 31d6e2d4dc Revert "Prevent creation of subnet via RBAC during new network creation"
The policy rule to create subnets requires a target to make the policy check. This implementation does not provide a target, so is not a proper place to use the workflow policy checks. To do this, a more involved approach needs to be used that supplies a target. However, this will be challenging because the target is the network_id that has yet to be created.

This reverts commit 3befade141.

Change-Id: I6af1cbd559034bd5635dfb4360b525714225677d
2016-07-14 18:08:17 +00:00
Jenkins d6b7b70c0d Merge "Improved table deletion efficiency" 2016-06-24 00:20:52 +00:00
jlopezgu b450a03282 Improved table deletion efficiency
Volumes and instances integration tests deleted and validated entities
one row at a time, now they are able to delete and validate multiple
rows at a time.

Change-Id: I7f8fdc7e0ccefdd0f6d71f9f92c8a2aefeec8d54
Closes-bug: #1585209
2016-06-21 14:03:58 -05:00
Timur Sufiev 3befade141 Prevent creation of subnet via RBAC during new network creation
Wire (('network', 'create_subnet'),) policy rules into the
CreateNetwork workflow, effectively hiding the steps related to
creating Subnet in case it is forbidden via Neutron policy.

Change-Id: I18c6e333e6a19a99f8154654c6455750a87e95df
closes-Bug: #1398845
2016-06-08 14:57:01 +03:00
Jenkins 7f7dbd0724 Merge "Define row in cell_getter before check cell status" 2016-06-07 01:44:52 +00:00
Diana Whitten 20c17d28d3 Horizon selects are now themable: Volumes
Horizon was using a standard select input.  Unfortunately, this
type of input is only customizable to a small extent.

I/We have created a new input type for forms to use that is a bootstrap
dropdown.  This will allow bootstrap themes to affect selects the same
way they do for check boxes and radio buttons and the like.

Material's inputs are a bit special, so custom css was added to keep
style parity with Bootswatch's Paper.

co-authored-by: brian.tully@hp.com
co-authored-by: hurgleburgler@gmail.com

ThemableSelect widget template has been modified so that shadow select
element does not contain any classes (which are usually used for
customizing appearance - since it's hidden, it doesn't need
that). Given that we could match legacy select element as 'div >
select.form-control' with no possibility that SelectFormFieldRegion
(legacy select widget region) will bind a hidden part of
ThemableSelect widget and intercept all commands send to
ThemableSelectFormFieldRegion. ThemableSelectFormFieldRegion was
modified to still use legacy widget wrapper for getting 'name' and
'value' properties, while doing all other things on its own, not using
Selenium wrapper for <select>.

Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>

Change-Id: Ie921b3adc2e1d3388d3c2aa1f76afe3af6ceb87b
Partially-implements: blueprint horizon-theme-css-reorg
2016-06-01 09:32:28 -07:00
Jenkins aba6d1f0da Merge "Improve Router integration tests coverage" 2016-05-03 12:36:22 +00:00
Sergei Chipiga 0ec6dd5fe1 Define row in cell_getter before check cell status
Closes-Bug: #1572036
Change-Id: I633cdcfca226cd94a14266baeec7ab800f22dadb
2016-04-28 10:39:20 +03:00
Jenkins c7c2291c40 Merge "Security group add/delete rules integration tests" 2016-04-23 18:41:42 +00:00
Jenkins 6c0ad2318b Merge "Check that row is defined when wait cell status" 2016-04-23 09:27:19 +00:00
jlopezgu 8d32b0a60d Security group add/delete rules integration tests
Added tests to validate add/delete rules in security groups

Change-Id: If2ec1108cdcc59d9ce7f24a07ead82e071d49ccf
Implements: blueprint horizon-integration-tests-coverage
2016-04-22 21:29:38 +00:00
Luis Daniel Castellanos 32e8561505 Improve Router integration tests coverage
Added test to verify that the Router add/delete interface functionality
is executed without errors under normal user credentials for:
Project > Network > Routers > Router panel

Added test to verify the Router delete interface by row action
functionality is executed without errors under normal user credentials

Added test to verify the Router Overveiw data is displayed as expected
and the navigation to linked resources works correctly

Implements blueprint: horizon-integration-tests-coverage

Change-Id: I65ee739b2145fe84c2d3a2f005030abdddf8339a
2016-04-21 10:51:41 -05:00
Jenkins 8475947f14 Merge "Added test remove protected image" 2016-04-20 18:10:39 +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
Yury Tregubov d2b3cf9df9 Added test remove protected image
Updated imagespage with edit row action and added one test.

Implements blueprint: horizon-integration-tests-coverage

Change-Id: Ida270f89d7f86758ac5958b7ecf2adbda5be9d0d
2016-04-20 11:13:17 +04:00
Jenkins 20a4311165 Merge "Add test for volumes attach/detach" 2016-04-19 10:29:51 +00:00
Sergei Chipiga 5d8161147e Check that row is defined when wait cell status
Change-Id: I848b2d14138a362040abc516e32061d0b3570394
Closes-Bug: #1572036
2016-04-19 12:12:04 +03:00
MikhialLaptev 84032cbede Added tests for check RC files from API Access page
test_download_rc_v2_file()
test_download_rc_v3_file()

Tests check that RC files are downloaded successfully and
some attributes of file's contents are correct.

Implements blueprint: horizon-integration-tests-coverage
Change-Id: Icef46863a6fb95600f7c98d5926cfb5b0dfa3d92
2016-04-15 16:10:05 +00:00
Sergei Chipiga 65eb9e9b8c Fix explicit waiting if instance has error status
This patches includes:
- don't wait instance launching if instance in error status
- add missed assertTrue to validate notification messages
- check that message is present and is displayed

Change-Id: If731751fa4deabdeebe373748b169ac7ac617f8c
Closes-Bug: #1569941
2016-04-15 13:21:46 +00:00
Yury Tregubov d44eebecfa Added update image metadata test
Updated forms.py with MetadataFormRegion.
Updated tables.py with method to bind anchor row column.
Added test for update image metadata.

Implements blueprint: horizon-integration-tests-coverage
Change-Id: Idd3651955b8f0e1a0c08dd43abd657aafa5a3bc2
2016-04-14 16:03:22 +04:00
AlexandraAllakhverdieva a4f3615f8a Add test for volumes attach/detach
test_volumes.py has been reworked according to approach
from https://review.openstack.org/#/c/273467/

Implements blueprint: horizon-integration-tests-coverage
Change-Id: I5fa417d9847569cf7993c850a77ddcf776d79927
2016-04-14 04:50:36 -04:00