Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #9892 from mmojzis/test_storage_manager_quadicon_n…
Browse files Browse the repository at this point in the history
…umbers

[1LP][RFR]Added test_storage_manager_quadicon_numbers
  • Loading branch information
mshriver authored Jan 31, 2020
2 parents 29204cf + 53dca47 commit 5aa87c9
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions cfme/tests/storage/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from cfme import test_requirements
from cfme.cloud.provider.ec2 import EC2Provider
from cfme.cloud.provider.openstack import OpenStackProvider
from cfme.storage.manager import ObjectManagerCollection
from cfme.storage.manager import ProviderStorageManagerAllView
from cfme.storage.manager import StorageManagerDetailsView
from cfme.utils.appliance.implementations.ui import navigate_to
Expand Down Expand Up @@ -132,3 +133,41 @@ def test_storage_manager_navigation_from_cloudprovider(manager, provider):
storage_view.paginator.find_row_on_pages(storage_view.table, Name=manager.name).click()
storage_detail_view = storage_view.browser.create_view(StorageManagerDetailsView)
assert storage_detail_view.title.text == "{} (Summary)".format(manager.name)


@pytest.mark.meta(automates=[1650086])
def test_storage_manager_quadicon_numbers(manager, provider, provider_cleanup, request):
""" Test whether Storage Manager QuadIcon shows correct numbers
Bugzilla: 1650086
prerequisites:
* Storage provider
Polarion:
assignee: mmojzis
initialEstimate: 1/8h
casecomponent: Cloud
caseimportance: high
testSteps:
* Go to Cloud Provider List
* Check Quadicon
* Compare quadicon with provider's relationships
"""
view = navigate_to(manager.parent, 'All')
view.toolbar.view_selector.select("Grid View")
quad_data = view.entities.get_entities_by_keys(name=manager.name)[0].data.get('quad', {})

if isinstance(manager.parent, ObjectManagerCollection):
quad_container_count = int(quad_data["topLeft"]["text"])
view = navigate_to(manager, 'Details')
container_count = int(view.entities.relationships.get_text_of(
"Cloud object store containers"))
assert quad_container_count == container_count
else:
quad_volume_count = int(quad_data["topLeft"]["text"])
quad_snapshot_count = int(quad_data["topRight"]["text"])
view = navigate_to(manager, 'Details')
volume_count = int(view.entities.relationships.get_text_of("Cloud Volumes"))
snapshot_count = int(view.entities.relationships.get_text_of("Cloud Volume Snapshots"))
assert quad_volume_count == volume_count
assert quad_snapshot_count == snapshot_count

0 comments on commit 5aa87c9

Please sign in to comment.