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

[WIP] Fixed Ansible Service tests. #9076

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
40 changes: 40 additions & 0 deletions cfme/services/myservice/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,26 @@ def is_displayed(self):
self.title.text == 'Service "{}"'.format(self.context['object'].name))


class MyServiceRetiredView(MyServicesView):
""" is_displayed for Retired view. """

@property
def is_displayed(self):
return self.in_myservices and self.myservice.is_opened


class MyServiceRetiredDetailsView(MyServiceDetailView):
""" is_displayed for RetiredDetails view. """

@property
def is_displayed(self):
return (
self.in_myservices
and self.myservice.is_opened
and self.title.text == f'Service "{self.context["object"].name}"'
)


class EditMyServiceView(ServiceEditForm):
title = Text('#explorer_title_text')

Expand Down Expand Up @@ -422,6 +442,26 @@ def step(self, *args, **kwargs):
'Set Retirement Dates for this Service')


@navigator.register(MyService, 'Retired')
class MyServiceRetired(CFMENavigateStep):
VIEW = MyServiceRetiredView

prerequisite = NavigateToSibling('All')

def step(self, *args, **kwargs):
self.prerequisite_view.myservice.tree.click_path('Retired Services')


@navigator.register(MyService, 'RetiredDetails')
class MyServiceRetiredDetails(CFMENavigateStep):
VIEW = MyServiceRetiredDetailsView

prerequisite = NavigateToSibling('Retired')

def step(self, *args, **kwargs):
self.prerequisite_view.entities.get_entity(name=self.obj.name, surf_pages=True).click()


@navigator.register(MyService, 'Reconfigure')
class MyServiceReconfigure(CFMENavigateStep):
VIEW = ReconfigureServiceView
Expand Down
Loading