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

Registering a view in a new module is not listed as a destination #8210

Open
john-dupuy opened this issue Nov 28, 2018 · 0 comments
Open

Registering a view in a new module is not listed as a destination #8210

john-dupuy opened this issue Nov 28, 2018 · 0 comments

Comments

@john-dupuy
Copy link
Contributor

john-dupuy commented Nov 28, 2018

When you try to register a view in a new module, it is not picked up as a destination for what it is registered against. For instance, consider the following code:

@navigator.register(Server)
class MonitorAlertsAll(CFMENavigateStep):
    VIEW = MonitorAlertsAllView
    prerequisite = NavigateToSibling("LoggedIn")

    def step(self):
        self.prerequisite_view.navigation.select("Monitor","Alerts","All Alerts")

Running

In [1]: from cfme.utils.appliance.implementations.ui import navigator
In [2]: from cfme.base import Server
In [4]: x = navigator.list_destinations(Server)
In [5]: app = store.current_appliance
In [6]: y = app.server.list_destinations()['UI']

The destination (MonitorAlertsAll) does not appear in either x or y, unless the file is imported manually or from a file that has a reference to Server elsewhere. Note that this behavior is known, so this issue is really an enhancement. It would be nice to have the module be automatically imported, without having to register the view in a specific location.

This issue also highlights another behavior that is perhaps undesirable. Namely, continuing the code from above:

In [8]: x == y
Out[8]: False

So the destinations registered against the class Server are different than the destinations registered against the object store.current_appliance.server. It would be good to have these return equivalent destinations.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants