Commit Graph

31 Commits

Author SHA1 Message Date
Tatiana Ovchinnikova b31bfe3b91 Add pagination to Flavors table in Launch Instance wizard
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
2022-03-21 12:42:49 -05:00
Manpreet Kaur 3230e1fb15 Changes for tacker-horizon integration tests
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
2021-08-27 09:07:18 +05:30
Oleksii Petrenko 85503a7c51 Fix instance integration tests
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
2020-07-21 10:41:39 +00: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 bc59d73ee0 Fix menu navigation for slow loading pages
The aim of this PS is to fix menu navigation for
slow loading pages. When we access 3rd level menu
item which actually point to particular webpage;
modal dialog appears during loading of page.
Currently there is no wait condition available
which waits till modal dialog disappear and webpage
loaded fully; which further breaks navigation and
eventually tests fail. Thereby adding condition in
menu navigation which checks whether page fully loaded
before clicking on 3rd level menu items.

Change-Id: I545789aa8d693b68d398b2bcc923d7d1283e1b1a
2020-02-26 23:14:19 -06: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 6c14f60491 Fix navigation hang issue
This PS solves navigation hang issue when previously
selected element text value is empty. This normally occurs
when second-level menu is already collapsed so no need to
collapse it again.

Change-Id: I86aee44c34ec03718f746d786a678bca907e933c
2019-09-07 21:51:00 +05:30
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
panneer.smn 0258199be7 Fixed dropdown menu locator and active class for user & project
This patch also fixes:
* integration test test_login
* project selection steps

Change-Id: I1f459be3adc199d04f89e159c691a33bb073bb1f
2018-06-09 04:08:49 +00:00
Akihiro Motoki b9d0243c33 Fix H405 (multi line docstring) warnings (openstack_dashboard)
H405: multi line docstring summary not separated with an empty line

Closes-Bug: #1696996

Change-Id: Id895695663b19522d9cdc22f8b012e49680d708b
2017-06-09 16:05:31 +00:00
zhurong b1a9078404 Update the access_and_security url
Since this bp reorganise-access-and-security,
move access_and_security to separate panel,
there are some places url need to change too.

Closes-Bug: #1679895

Change-Id: I59560c479ad77d2452484b2138065a003451f376
2017-04-05 03:33:50 +00:00
Rob Cresswell 837587fe73 Improve Horizon nav sidebar
- Make menu responsive (hides on smaller screens, e,g, 1/2 laptop screen,
  tablet, mobile)
- Add aria parameters for accessibility
- Show current focus when navigating (accessibility)
- Remove the blue outline when clicking links in Chrome
- Makes menu less hideous

Change-Id: I1cdfa079f0b371d1afddefa67d8a21e93abde9ee
Implements: blueprint navigation-improvements
Closes-Bug: 1315488
Closes-Bug: 1628274
2016-11-23 16:17:13 +00:00
Timur Sufiev fe04af039f Fix dropdowns sometimes not opening in integration tests
Since most probable cause of dropdowns not opening intermittently is
Bootstrap initialization code not having enough time to complete
before test tries to open dropdown, make test wait a specified timeout
before clicking it (by means of setting a CSS class after that
timeout, which test in turn waits before clicking the dropdown).

Closes-Bug: #1594926
Change-Id: I32625caa4433f4af0de72c94b61e85ab4e16b1f9
2016-06-22 16:19:08 +03:00
Jenkins 17d284e469 Merge "Provide an integration test for dynamic themes" 2016-06-08 21:47:08 +00:00
Jenkins c116704394 Merge "Provide integration test for managing a project's members" 2016-05-04 10:11:23 +00:00
Sergei Chipiga bee35b5f42 Wait for user menu items to become visible before clicking them
Change-Id: I312e63eafa7a92ce05028de3505f37547a0bc139
Closes-Bug: #1574734
2016-04-26 15:57:29 +03:00
Sergei Chipiga 79fcc65491 Fix pre_test_hook fail and sidebar menu fail
It fixes two small but important bugs:
- remove apache restart, because it fails pre_test_hook, which fails
  test build (the latter implication was introduced recently in a
  devstack-gate scripts);
- fix sidebar menu item click before prev item was collapsed, because
  in this case menu item won't be expanded (supposedly a result of
  recent update of one of XStatic dependencies).

Change-Id: If463c4c8b16b54f033e2a2ee33ba995ca7844f2b
Closes-Bug: #1573726
2016-04-22 18:21:58 +00: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
Timur Sufiev 96fedc1b8f Provide an integration test for dynamic themes
Change-Id: I7a0bed9586058ffc458c8a1eee69034f43c18dd4
2016-03-23 18:12:23 +03:00
Diana Whitten 54b9506ed5 Branding: Create Network should inherit from theme
Create network is different than all other workflows, and it has a
lot of unnecessary style associated with it. This inhibits
themability. It should just use standard nav-pills.

partial-bug: #1551492
Closes-bug: #1553781

Change-Id: I6896df03b86ae0c4388ac15246739aeea5365a95
2016-03-16 13:00:43 +00: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
Timur Sufiev 14ce229259 Eliminate ambiguity when matching panel in i9n tests
To do so, an argument `src_elem` is added to _click_menu_item()
method. Whenever dashboard or a panel group is clicked, its wrapper is
returned to be used as `src_elem` in a subsequent call for clicking
third-level item.  This way the set of panel labels being matched is
restricted to the descendants of that particular dashboard or panel
group.

Change-Id: I54f3febed645b6bf2faddfbe27690ceb0944cd12
Closes-Bug: #1533160
2016-01-12 14:35:35 +03:00
Timur Sufiev 4c2bd81364 Prevent the click loss at navbar accordion in integration tests
Simplify code for handling the navbar in integration tests, replace
the loop with explicit waits for the menu items to receive the proper
classes (which mark collapsed/expanded/in-transit states). Besides
fixing intermittent failures this also clarifies the overall logic.

Change-Id: I7a58a59be66264ce6e3c05f78033961954f0c553
Closes-Bug: #1505320
2015-10-16 17:05:27 +03:00
Jenkins 57d50b4f51 Merge "Adapt integration tests to recent devstack and page layout changes" 2015-08-22 01:27:28 +00:00
Timur Sufiev 964342fa38 Adapt integration tests to recent devstack and page layout changes
This patch:
* re-enables 3 previously disabled integration tests for users
  crate/delete, keypairs and floating ips
* updates selectors for sidebar menu and user context menu
* adds some selenium specific classes to different sidebar menus in
  order integration tests could check open/closed state of
  dashboard/panel group sections (horizon.selenium.js)
* updates default path to horizon (which is now /dashboard at
  devstack)
* temporarily disables Sahara integration tests

Related-Bug: #1467950
Implements blueprint: integration-tests-hardening
Change-Id: I688eb7d72d5504cb55b977d85435019e3f69323f
2015-08-20 14:36:37 +03:00
Victor Stinner b46b67eb2b py3: replace xrange() with range()
xrange() has been removed in Python 3.

Partial-Implements: blueprint porting-python3
Change-Id: Icdb86b98eb396e9d58fe737f8229218a15805aa9
2015-08-19 17:25:08 -07:00
Vlad Okhrimenko c6d4bc459a Add project-dropdown
Add model of project-dropdown menu

Partially implements blueprint: selenium-integration-testing

Change-Id: I71756f263c8e2d9dcdfb20138f1379daadb22f95
2015-04-02 11:37:18 +03:00
Tomas Novacik e3e25a6e8b Add TabbedFormRegion to Integration tests
* TabbedFormRegion - that should be used for forms that are divided into tabs,
  the manipulation with the form is then the same as with the regular Form
  region, tabs are switched automatically

* TabbedMenuRegion - support for another type of menu, that is for
  example located in certain forms or under the Project/Compute/access
  & security page

* Also _default_src_locator is added to BaseRegion class, that makes it
  possible for every component to have its own default locator, so it is
  not necessary to specify region source element all over again

Partially implements blueprint: selenium-integration-testing

Change-Id: If302385d7d0f8b84512e710fbd70cdbd5bcdffea
2014-12-27 11:32:04 +01: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
Tomáš Nováčik 34e959e006 Fix dropdown menu does not open with firefox 34
Firefox update changed behaviour of the selenium tests, it is not
enough to click on the div representing dropdown menu region,
one must click on the first child (which is now button, but i suppose
it can change over time to input or anything else) in order to open the
dropdown menu.

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

Change-Id: If9aed4b547f843d16ba729f84cb2c02acb2a0a4d
2014-12-04 23:53:22 +01:00
Tomas Novacik d36aa21e6c Add menu regions to integration tests
Adding menu regions.

* DropDownMenuRegion - base drop down menu region class
* UserDropDownMenuRegion - menu located in the top right corner

Partially implements blueprint: selenium-integration-testing

Change-Id: I611b46153d0f38a588ee931c954f771306802f14
2014-11-27 22:21:38 +01:00