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

[1LP][RFR] Add new ProviderCompareHostsView and replace with CompareHostsView in… #9863

Merged
merged 2 commits into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cfme/common/host_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,18 @@ def is_displayed(self):
)


class ProviderHostsCompareView(ComputeInfrastructureHostsView):
"""Compare Host / Node page, but for a specific provider."""

@property
def is_displayed(self):
title = "Compare Host / Node"
return (self.logged_in_as_current_user and
self.title.text == title and
self.navigation.currently_selected == ['Compute', 'Infrastructure', 'Providers']
)


class ProviderAllHostsView(HostsView):
"""
This view is used in Provider and HostCollection contexts
Expand Down
5 changes: 3 additions & 2 deletions cfme/tests/infrastructure/test_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from cfme.base.credential import Credential
from cfme.common.host_views import HostsCompareView
from cfme.common.host_views import HostsEditView
from cfme.common.host_views import ProviderHostsCompareView
from cfme.common.provider_views import InfraProviderDetailsView
from cfme.common.provider_views import InfraProvidersView
from cfme.common.provider_views import ProviderNodesView
Expand Down Expand Up @@ -445,7 +446,7 @@ def test_infrastructure_hosts_navigation_after_download(

@test_requirements.infra_hosts
@pytest.mark.parametrize("num_hosts", [2, 4])
@pytest.mark.meta(blockers=[BZ(1746214, forced_streams=["5.10"])], automates=[1746214])
@pytest.mark.meta(blockers=[BZ(1746214, forced_streams=["5.10"])], automates=[1746214, 1784181])
def test_compare_hosts_from_provider_allhosts(appliance, setup_provider_min_hosts, provider,
num_hosts):
"""
Expand All @@ -464,7 +465,7 @@ def test_compare_hosts_from_provider_allhosts(appliance, setup_provider_min_host
h.ensure_checked()
hosts_view.toolbar.configuration.item_select('Compare Selected items',
handle_alert=True)
compare_hosts_view = provider.create_view(HostsCompareView)
compare_hosts_view = provider.create_view(ProviderHostsCompareView)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional: I would register one navigation destination against provider.

assert compare_hosts_view.is_displayed


Expand Down