All Hosts legacy UI navigation fix - #1935
Conversation
To ensure proper test functionality, navigating to 'All' hosts goes to the now-legacy UI Hosts page. Once all functionality is covered in the new Hosts page view, this workaround can be removed.
Reviewer's GuideThis PR implements a transitional workaround by introducing a minimal new HostsView and adjusting navigation steps to ensure that selecting “All Hosts” routes through the new view before landing on the legacy UI page. It adds a dedicated navigator step for the new UI path and updates the legacy navigation to use the new step as a prerequisite. Sequence diagram for navigation to All Hosts via new and legacy UIsequenceDiagram
actor Tester
participant Navigator as navigator (ShowAllHosts)
participant NewUI as ShowAllHosts_NewUIAll
participant HostsView
participant LegacyUI
Tester->>Navigator: select 'All Hosts'
Navigator->>NewUI: prerequisite step (NewUIAll)
NewUI->>HostsView: display new HostsView
Navigator->>HostsView: actions.item_select('Legacy UI')
HostsView->>LegacyUI: transition to legacy UI page
Class diagram for new and updated navigation steps for HostsclassDiagram
class HostsView {
+title
+actions
+is_displayed
}
class ShowAllHosts {
+VIEW
+prerequisite
+step(*args, **kwargs)
}
class ShowAllHosts_NewUIAll {
+VIEW
+step(*args, **kwargs)
}
ShowAllHosts --|> NavigateStep
ShowAllHosts_NewUIAll --|> NavigateStep
HostsView --|> BaseLoggedInView
ShowAllHosts : prerequisite = NavigateToSibling('NewUIAll')
ShowAllHosts : VIEW = HostsView
ShowAllHosts_NewUIAll : VIEW = HostsView
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @pnovotny - I've reviewed your changes - here's some feedback:
- There are two ShowAllHosts classes registered under different steps; consider renaming one to avoid confusion and make their purposes clearer.
- HostsView.is_displayed only checks for the H1 title—adding validation for key page elements (e.g., the hosts table or filters) would make the view detection more robust.
- Instead of sequencing through NavigateToSibling for legacy vs. new UI, consider consolidating the toggle logic into a single navigation step or leveraging a feature flag to reduce coupling.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- There are two ShowAllHosts classes registered under different steps; consider renaming one to avoid confusion and make their purposes clearer.
- HostsView.is_displayed only checks for the H1 title—adding validation for key page elements (e.g., the hosts table or filters) would make the view detection more robust.
- Instead of sequencing through NavigateToSibling for legacy vs. new UI, consider consolidating the toggle logic into a single navigation step or leveraging a feature flag to reduce coupling.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
trigger: test-robottelo |
LadislavVasina1
left a comment
There was a problem hiding this comment.
@pnovotny ACK, looks good. Thank you very much for dealing with that!
damoore044
left a comment
There was a problem hiding this comment.
thank you for this fix, helps a lot!
hosts: navigating to 'All' goes to the legacy UI page by default
To ensure proper test functionality, navigating to 'All' hosts goes to the now-legacy UI Hosts page.
Once all functionality of the new Hosts page is covered in the new
HostsViewview, this workaround can be removed.PRT example:
Summary by Sourcery
Implement a temporary HostsView and navigation workflow so that selecting 'All Hosts' routes through the new page and defaults back to the legacy UI until full functionality is migrated.
Enhancements: