Commit Graph

174 Commits

Author SHA1 Message Date
zhurong f91d017789 Remove six
Change-Id: I15ab42b44fbc40a66a52d1fd16087ee18c8b0494
2020-04-21 05:53:26 +00:00
zhurong 50076cf2d2 Fix selenium test test_abandon_two_environments_at_once
Change-Id: I66419001ba6fee4c2d665c5178e82905dc184831
2019-03-13 02:16:13 +00:00
Zuul eb5a03ee72 Merge "Fix selenium test test_filter_component_by_tag" 2019-03-07 11:38:46 +00:00
zhurong 0f78176c62 Fix selenium test test_filter_component_by_tag
Change-Id: I680d343f531f11c87cc04a35e9ab98a3119cb1db
2019-03-07 09:32:50 +00:00
zhurong d8891aba61 Fix selenium test test_check_env_name_validation
Change-Id: Ieea327d20eedd0f06c3fb8948f6a78631cdb6b22
2019-03-07 05:55:35 +00:00
zhurong bb138ac615 Fix selenium test test_filter_by_tag
Change-Id: Ibbccff6e56fad1c4ee79da0785c74c668e96a5e2
2019-03-04 16:14:43 +08:00
zhurong 18b276ecdf Fix python3 compatible use six
Change-Id: I0b27beefb3099f1a5a59d89ec90229a94259ebb2
2018-10-23 18:49:26 +08:00
zhurong caaa9ea88d murano-dashbord python3 fix and use standard cover tox env
Change-Id: I1d68ca7cbe325425cd1c05ff3101f19d3cb50b0a
2018-10-08 16:54:53 +08:00
Aaron 4dea571014 Removed inline_edit functionality for tables
Horizon remove the inline_edit, So murano-dashboard should remove it too.
And this cause murano-dashboard tests failed.

Change-Id: I1a0e23255de3c620a2976c1a9043f26df21a9a57
2018-04-20 13:54:24 +08:00
zhurong d76bbb9949 Revert ThemableSelectWidget for themable selects
Now horizon ThemableSelectWidget field can not display
the validation error, just make the field keep the old
can temporary fix this. Once horizon fixed,
we can revert it back.

This reverts commit 85fc5e002c.
Closes-Bug: #1711763

Change-Id: I557d38f739786597a9472c8104e1edf531e9a007
2017-08-25 10:30:42 +08:00
Felipe Monteiro 273ed4797e Update glanceclient from v1 to v2 to avoid deprecation errors.
Currently, the app-catalog/images view in Horizon is throwing
a 300 HttpMultipleChoices exception, with the details:
"Requested version of OpenStack Images API is not available."

Also, the glance v1 client is deprecated, so we should move to glance
v2 wherever possible.

This patch, therefore, removes glanceclient v1 dependency
from murano dashboard as much as possible, especially
given that Glance team intends on removing it from Pike [0].

The only remaining places where the glanceclient v1 is kept
are:
  - in _ensure_images in muranodashboard/packages/views.py,
    which uses copy_from functionality from glanceclient v1 to load
    images automatically.
  - done in ImportPackageWizard, which sets each package to
    public if the image that was uploaded was public

[0] https://review.openstack.org/#/c/328390/

Closes-Bug: #1675171
Partially-Implements blueprint: migrate-to-glance-v2
Change-Id: Id5348bc34216d5f5ed7fbb8caf71139d64db3f61
2017-04-22 20:16:23 +00:00
Felipe Monteiro 85fc5e002c Use ThemableSelectWidget for themable selects.
This is a trivial fix, meant to align with recent Horizon change
[0], and is just an aesthetic change.

The select widgets are now themable.

[0] https://review.openstack.org/#/c/440978/

Change-Id: Ia903b1d5e72ee6ce08a5bcec3e92b561fcb8b9c6
2017-04-05 00:31:05 +01:00
Felipe Monteiro be52ed8a4c [Gate fix] Fixes import big zip file test.
Currently, the Selenium test test_import_big_zip_file_negative
is throwing an error, because the wrong error message is expected [0].

Old: Error: 400 Bad Request ... (no colon)
New: Error: 400 Bad Request: ... (with colon)

This patch also adds a positive test case that checks whether a
regular zip file can be successfully imported.

[0] https://murano-ci.mirantis.com/logs/69/448369/2/check/gate-murano-client-ubuntu/77f533a/

Change-Id: I874841ec5814edf6935f6ac3a66fe5a14d1e1c15
2017-03-30 23:37:22 +00:00
Artem Tiumentcev a1bfa66a1b Add js validation for dynamic UI
We are getting a regex pattern and error message from UI definition
and paste them as an attribute to a input field for js validation

Change-Id: If6d69462ebc883f5c7ca8dbe18de7df6386d53ce
Implements: blueprint murano-dynamic-ui-custom-realtime-validation
2017-03-10 08:14:36 +00:00
Jenkins bab8c1c91e Merge "Makes test_delete_multiple_images ui test more stable." 2017-03-10 08:08:35 +00:00
Felipe Monteiro 8d9828f76e Makes test_delete_multiple_images ui test more stable.
Currently, test_delete_multiple_images in TestSuiteImages fails
irregularly but somewhat frequently. The reason is that, after
calling go_to_submenu to refresh the page with new images, the
new images are not immediately loaded in the table, so clicking
the topmost checkbox does nothing.

This patch splits delete_multiple_images into 2 tests,
one for deleting all the images one by one and one for
deleting all the images at the same time. In the latter case,
each table row is iterated over and its checbox checked, in
order to wait until the row has loaded completely.

It also renames the self.image_title in the base image class to
use 'default' as a prefix, to make debugging failed logs easier.

Change-Id: I523b690144678a3c07afe00786602b24405ffbd0
2017-03-09 17:44:38 -05:00
Jenkins 52dd7bdc01 Merge "Add UI Test for Correct # Apps by Category in Catalog View." 2017-03-08 01:46:26 +00:00
zhurong f7db98a776 Unskip test_sharing_app_without_permission
This commit [0] using rbac to control create and modify packages
public checkbox, we can unskip test_sharing_app_without_permission.

[0]: I75d1ae7cf39d1dc9156778b9910aaf35cb957753

Change-Id: I012cdc491610b00d34e77ce1af287b0e91d1ca3c
Closes-Bug: #1618266
2017-03-07 09:55:08 +08:00
zhurong 369d732ba8 Using RBAC for create and modify packages public checkbox
When create and modify packages, using RBAC to control the public checkbox.
without the policy, the checkbox will readonly and disabled.

And this patch skip test test_sharing_app_without_permission, the follow-up
patch will unskip this test.

Change-Id: I75d1ae7cf39d1dc9156778b9910aaf35cb957753
Implements: blueprint murano-dashboard-rbac
2017-03-07 09:53:24 +08:00
Felipe Monteiro 840bcd21d0 Add UI Test for Correct # Apps by Category in Catalog View.
Added UI test for the scenario:
"Show correct number of apps in a category in catalog view".

Also made the following 2 tests atomic:
  1) test_add_pkg_to_category_non_admin
  2) test_add_pkg_to_category_without_count
They were not cleaning up after themselves; they were changing
class-level package categories, which was causing the new
test to fail, when run in conjunction with the 2 tests above.

Change-Id: Iac9ba8ed168f4a8cf9144aca285159f66ccea165
Partial-Bug: #1596196
2017-03-04 23:25:27 +00:00
Felipe Monteiro 9cede6d00b Fixes test_toggle_public_package ui tests failing in tearDown.
Currently, 2 tests:
  - test_toggle_public_package
  - test_toggle_public_multiple_packages
both throw keystoneauth1.exceptions.connection.ConnectFailure
errors during tearDown [0] (this one example resulted in the
same failure 3 times in a row).

Since these are the only two tests that dynamically create
a project using keystoneclient and delete the projects
in tearDown, this patch provides a workaround by removing
the create_project function and removing the need to then
clean up the project in tearDown.

This is done by relying on the alternate project 'service'
(already used in test_sharing_app_without_permission),
instead of having to create a new project then deleting it.

Also combines https://review.openstack.org/#/c/440219/
to fix flake8 error.

[0] https://murano-ci.mirantis.com/logs/40/436240/1/check/gate-murano-dashboard-ubuntu/14801da/

Related-Bug: #1668848
Co-Authored-By: ricolin <rico.lin@easystack.cn>
Change-Id: Id77e0cc59f33fdf394e2dc25a9fda0fd13c5b4fa
Backport: stable/ocata
2017-03-03 03:23:26 +00:00
Felipe Monteiro 1b11876a95 Fix click issue with test_env_status_new_session_remove_from_two.
The test in the title is failing in the log [1] because, after
deploying the environment with 2 apps, Selenium seems to struggle
interacting with 'Delete Component' button.

This patch simply refreshes the page before clicking on
'Delete Component'.

Also added various explicit waits (which does not reduce
performance much at all) but increases compatibility with slower
machines.

[1] https://murano-ci.mirantis.com/logs/41/425341/1/check/gate-murano-client-ubuntu/34b0037/

Change-Id: Ia6590bcd7eb6e576ee0e82e0771c746ae301dd02
2017-02-03 20:17:13 +00:00
Felipe Monteiro 3bf38434fe Changes image creation/deletion in sanity_check to be atomic..
Right now, image creation/deletion is done at the class level in
ImageTestCase. Also, in TestSuiteImage relies on self.repair_image
to clean up the class-level image through the UI. This has
several potential points of failure:

 - self.repair_image is not called via self.addCleanup:
   if the test fails before repair_image is called, the image
   is not restored.
 - self.repair_image is done via UI: this can obviously fail,
   because Selenium should never be used to reliably clean up
   a resource.
 - self.image.id is used in many different classes that inherit
   from ImageTestCase: this can result in failures in other
   test suites.

This patch changes self.image to be test-level, created in
setUp instead of setUpClass and deleted in tearDown instead
of tearDownClass.

This is an example of a log that shows multiple tests failing
across different test suites because the class-level image
(probably) was already deleted and thus not found:

https://murano-ci.mirantis.com/logs/25/424525/1/check/gate-murano-dashboard-ubuntu/ca45725/

Change-Id: I0c8628c7fdf182cc512c16faa30f1dd763b8f08e
2017-01-25 13:01:49 -05:00
Jenkins f01e80b9af Merge "Add UI Tests for Various Package Scenarios." 2017-01-19 05:23:02 +00:00
Jenkins fe7f436695 Merge "Fixes new sanity_check tests deleting too many resources." 2017-01-17 00:35:36 +00:00
Felipe Monteiro ec3d246e56 Add UI Tests for Various Package Scenarios.
The following 4 scenarios were added to TestSuitePackage:
  1) Delete package.
  2) Delete multiple packages.
  3) Toggle multiple packages enabled.
  4) Toggle multiple packages public.

Also added addCleanup to delete dynamically created packages
rather than doing a manual deletion of the packages in
recently added package tests. This is better because if
any of those tests fail, the deletion will not happen,
causing other tests to potentially fail, making it much harder
to debug.

Change-Id: I2c5f9240f67cbb672eaff08d5118c8d260fbf56e
Partial-Bug: #1596196
2017-01-13 11:30:00 -05:00
Jenkins 17203b8f9e Merge "Add UI Tests for Filtering Packages by Name/Type/Keyword." 2017-01-13 03:01:23 +00:00
Felipe Monteiro fc34a1aaf5 Fixes new sanity_check tests deleting too many resources.
Because tests are run out of order, this will not always be
re-produced, but inevitably this bug will happen.

Right now, the test test_delete_multiple_images in TestSuiteImage
will delete all the images in tearDownClass -- including the
cls.image_id which is used by many other tests. If the
TestSuiteImage tests run before tests in another suite that
rely on cls.image_id, they will fail.

This same scenario can also happen with the recent addition
of filter component tests. These tests delete the resources
created by the test at the end of the test. But eventually, when
these tests fail, that code will not run, causing many other
tests to fail, making debugging very hard as well.

This patch adds addCleanup at the beginning of these tests so
that deletion always works and prevents the cls.image_id from
being deleted.

Change-Id: If199d560870a138d250bfba332da90e557693a03
2017-01-12 02:28:21 +00:00
Jenkins a73cb4b7bb Merge "Add UI tests for Deploy/Abandon Environment from Table View." 2017-01-12 01:16:39 +00:00
Jenkins f04dd79b2d Merge "Add assertions to functional test test_download_package." 2017-01-12 01:15:59 +00:00
Felipe Monteiro e6e9267fea Add UI tests for Deploy/Abandon Environment from Table View.
Scenarios for the following UI tests were added to sanity_check:
  - Deploy from table view
  - Abandon from table view

Also added helper function in base.py called
execute_action_from_table_view, which does the following:
  - Clicks the drop-down button in the table view corresponding
    to a specific environment.
  - Waits for the drop-down menu to appear.
  - Clicks the designated action button from the menu.

Change-Id: I61890d1795e92789fca0265e814914a0dc5a91ff
Partial-Bug: #1596196
2017-01-10 11:30:20 -05:00
Felipe Monteiro 5a76697f04 Add assertions to functional test test_download_package.
Currently, sanity_check.TestSuitePackages.test_download_package
lacks any assertions, which means the test isn't really a test.

This change modifies base.py to add automatic downloading of
application/octet-stream MIME type files (i.e. zip files)
to FireFox, such that now test_download_package can assert
that the file was successfully downloaded and that the right
file was downloaded.

Change-Id: I72917daae9e072bec380aac56b5d255c41794988
2017-01-10 11:14:49 -05:00
Jenkins 47ab2911fb Merge "Add UI Tests for Deleting Multiple Images." 2017-01-10 14:20:52 +00:00
Felipe Monteiro 24ee71f94e Add UI Tests for Deleting Multiple Images.
Added new scenario for deleting multiple images.

The scenario tests that each image is deleted
separately. Afterward, it tests that all the
images are deleted together.

Change-Id: Ib5292e3347101a19f5cc01dbc4999584508186c4
Partial-Bug: #1596196
2017-01-05 03:50:58 +00:00
Felipe Monteiro e507341b22 Add UI Tests for Filtering Packages by Name/Type/Keyword.
Also made the following changes:
  - Added 4 new consts related to package filtering.
  - Added sec keyword to check_element_on_page to override default
    wait time.
  - Refactored package init to use new method upload_package,
    to make dynamically creating packages possible.

Change-Id: Ia37a6789ef454cb6ec17d8b2a9bd806fdad5791f
Partial-Bug: #1596196
2017-01-04 17:28:08 -05:00
Felipe Monteiro d72f997a12 Add UI Tests for Filtering Components by Name/Tag/Description.
Added UI tests for filtering components by above attributes
in the environment details view.

Added tests for the following 4 scenarios:
  - Filter components by name.
  - Filter components by tag.
  - Filter components by description.
  - Filter components that return many results that overflow
    past the components carousel and check whether all results
    are present in the DOM.

Change-Id: I5e616ef79e9e065fd2615982ae6bec58e1171c23
Depends-On: Ifecba6563877de7d28b3d3ab4e2b77774b993c7e
2016-12-29 03:12:33 +00:00
Jenkins c4d3821ec3 Merge "Add UI Tests for Latest Deployment Log." 2016-12-27 18:15:36 +00:00
Felipe Monteiro 6792ab462e Add UI Tests for Latest Deployment Log.
Added two new scenarios:
  - Check expected output in latest deployment log after
    deploying environment.
  - Check expected output after first deployment and again
    after the second deployment of same environment, where
    the expected outputs differ each deployment.

Also added 3 new constants:
  - DeploymentHistoryLogTab: the Latest Deployment Tab in the
    environment details view.
  - EnvComponentsTab: the Consoles Tab in the environment details
    view. (Used for compatibility with add_to_env.)
  - DeploymentHistoryLogs: the logs themselves, contained in the
    Latest Deployment Tab, which contains the log statements
    for verification.

Change-Id: Iafee56df7f607fdfa40c3d2ec6d15e696b4ae7b1
Partial-Bug: #1596196
2016-12-18 02:41:47 +00:00
Felipe Monteiro 6989af8d2c Fixes test_filter_by_description failing on glare gate job.
Confirmed bug #1616856 states that filtering apps by description
currently doesn't work with glare. So, the test is skipped
if glare is being used.

Change-Id: I241a16b3c28cfc7955f95035b1c31180451e8903
Closes-Bug: #1650831
Related-Bug: #1616856
2016-12-18 00:47:32 +00:00
Jenkins 5b49dff893 Merge "Add UI Tests for Filtering Apps by Tag/Description." 2016-12-16 15:23:52 +00:00
Felipe Monteiro fb263eb3cf Add UI Tests for Filtering Apps by Tag/Description.
Also made the following changes:
  - Renamed test_check_search_option -> test_filter_by_name,
    because now that there are multiple search option tests,
    this test more precisely conveys what it is testing.
  - Added helper function wait_for_page_reload to base.py,
    because after a filter is conducted, a page refresh is
    performed; on slow machines, not waiting for page refresh
    throws error, because content hasn't loaded yet.

Change-Id: Ifecba6563877de7d28b3d3ab4e2b77774b993c7e
Partial-Bug: #1596196
2016-12-12 15:06:06 -05:00
Felipe Monteiro a1e327576f Add UI Test for Abandon Environment from Detail View.
Also removed the helper function wait_element_is_viewable,
because it is redundant; it can be substituted for the following
function instead:
  - check_element_on_page
The removed was only being used by
test_delete_environment_from_detail_view, which has been updated
to use the aforementioned function instead.

Also added 3 new constants:
 - DetailDropdownBtn: the toggle button that needs to be clicked
   on in the env detail view to toggle dropdown menu
 - DetailDropdownMenu: the menu after clicking the former
 - ModalDialog: - the confirmation modal dialog itself

Change-Id: I7e326e697413c710781d8aa5daf92aa5fbebfbb2
Partial-Bug: #1596196
2016-12-07 14:44:33 -05:00
Felipe Monteiro aaac5adf42 Add UI tests for Delete Environment from Details View.
In addition, added two helper functions to base.py:
  1) def wait_for_alert_message_to_disappear which waits for the
     alert message to completely disappear. This is needed
     because the alert message pops up directly above the
     Delete Environment button in the detail view, causing
     the click() function to fail.
  2) def wait_element_is_visible which waits for an element
     to become "present on the DOM of a page and visible"
     (from documentation). This is not absolutely needed,
     but is included as a "just-in-case".

Change-Id: I300f23fc566b40cf3f50a344e98ff94cf17bbf9e
Partial-Bug: #1596196
2016-12-05 15:55:20 -05:00
Stan Lagun 77c7010b6e Bundle import test was fixed
Incorrect package name ending with "0.1"
was used. The test started to fail when
the package validation was introduced to
python-muranoclient

Change-Id: Id53ea394c34966a9e3bccc5b8a710b9e90e5f732
2016-11-07 21:41:21 -08:00
Serg Melikyan cdc0ce4da6 Fix tests for package/bundle import
Two following tests where generating invalid package manifest and
than trying to import generated package:
* test_import_bundle_from_repo
* test_import_package_from_repo

This tests are passing but when we will add package validation on import
using openstack/murano-pkg-check they will start failing.

This commit also removes non-working validation of the versioned import
from the catalog which needs to be fixed at some point of time:

https://bugs.launchpad.net/murano/+bug/1637211

Change-Id: Iae6b56b2f7d32c75515ee92f0e33f9e3af9924e9
2016-10-27 06:51:37 -07:00
Jenkins 109984ce40 Merge "Do not use category count in UI tests with GLARE backend" 2016-10-22 23:29:15 +00:00
Kirill Zaitsev 7378be6d21 Split muranodashboard config into multiple files
This commit splits muranodashboard's config file into multiple small
file, each adding a dashboard or a panel. It also adds machinery to
allow sharing app-catalog dashboard config file between muranodashboard
and app-catalog-ui.
Renames dashboard and panels in accordance to
https://etherpad.openstack.org/p/apps-dashboard-structure

Targets bp: catalog-dashboard-reorg

Depends-On: I6d1d8c99aecf10567608d0c96de69a5309e706e3
Change-Id: I7aee5d26185cc0a7bb54f2b39b85d580daa400ae
2016-10-11 14:55:22 +03:00
Valerii Kovalchuk 667e17bfdd Do not use category count in UI tests with GLARE backend
Added test_add_delete_category_for_package_without_count test
which checks category in packages details instead of checking
category count.
test_delete_category_with_package test is simply skipped because
'Delete category' button is always displayed with GLARE and this
test makes no sence in this case.

Change-Id: Ie2af716f068a9a485ab6355e0fd55fb868f52dfd
Closes-bug: #1618228
2016-10-06 14:13:41 +03:00
Jenkins 4a4d929408 Merge "Display package name as type of service in env" 2016-10-04 16:26:41 +00:00
Valerii Kovalchuk c25d6bf422 Display package name as type of service in env
Also add UI test to check that service name and type are displayed

Change-Id: Ib1927783f1b3bec1b215347c46718e82d81ce8f9
Closes-bug: #1613671
2016-09-27 13:54:57 +03:00