Disassociate Hosts Coverage [SAT-31029] - #1909
Merged
vsedmik merged 4 commits intoJul 8, 2025
Merged
Conversation
Contributor
Reviewer's GuideThis PR adds Airgun test coverage for the “Disassociate hosts” bulk action on the All Hosts page by implementing a new API method to drive the workflow and introducing a corresponding modal view. Sequence diagram for disassociating hosts via AllHostsEntitysequenceDiagram
actor Tester
participant AllHostsEntity
participant AllHostsTableView
participant DisassociateHostsModal
Tester->>AllHostsEntity: disassociate_hosts(host_names, select_all_hosts)
AllHostsEntity->>AllHostsTableView: navigate_to('All')
AllHostsTableView->>AllHostsTableView: wait_displayed()
alt select_all_hosts
AllHostsEntity->>AllHostsTableView: select_all.fill(True)
else select specific hosts
AllHostsEntity->>AllHostsTableView: search(host_name)
AllHostsTableView->>AllHostsTableView: table[0][0].widget.fill(True)
end
AllHostsEntity->>AllHostsTableView: bulk_actions_kebab.click()
AllHostsTableView->>AllHostsTableView: bulk_actions_menu.item_select('Disassociate hosts')
AllHostsEntity->>DisassociateHostsModal: instantiate modal
DisassociateHostsModal->>DisassociateHostsModal: confirm_btn.click()
Class diagram for DisassociateHostsModal and AllHostsEntity changesclassDiagram
class AllHostsEntity {
...
+disassociate_hosts(host_names, select_all_hosts=False)
}
class DisassociateHostsModal {
OUIA_ID
title
close_btn
confirm_btn
cancel_btn
+is_displayed
}
AllHostsEntity --> DisassociateHostsModal : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey @LadislavVasina1 - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `airgun/entities/all_hosts.py:520` </location>
<code_context>
raise Exception("Repository count not matches")
view.review.set_content_overrides.click()
+ def disassociate_hosts(self, host_names, select_all_hosts=False):
+ """
+ Navigate to the Disassociate hosts modal for selected hosts and disassociate them.
</code_context>
<issue_to_address>
Parameter name in docstring does not match function signature.
The docstring should use 'host_names' to match the parameter name and avoid confusion.
</issue_to_address>
### Comment 2
<location> `airgun/entities/all_hosts.py:544` </location>
<code_context>
+ if not isinstance(host_names, list):
+ host_names = [host_names]
+ for host_name in host_names:
+ view.search(host_name)
+ view.table[0][0].widget.fill(True)
+
+ view.bulk_actions_kebab.click()
</code_context>
<issue_to_address>
Selecting hosts by always using the first row may not be robust.
Selecting view.table[0][0] directly may not reliably select the intended host if the table structure or search results change. Please ensure the selected row matches the searched host.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
LadislavVasina1
requested review from
a team,
ColeHiggins2,
Gauravtalreja1,
damoore044,
pnovotny,
pondrejk,
sambible and
vijaysawant
July 1, 2025 12:20
Contributor
Author
|
PRT passed in SatelliteQE/robottelo#18859 |
vijaysawant
approved these changes
Jul 2, 2025
vijaysawant
left a comment
Contributor
There was a problem hiding this comment.
Non-blocking: request for change in doc strig with additional suggestion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds airgun coverage for Disassociate hosts function coming to stream on All hosts page.
See SAT-31029.
Needed by: SatelliteQE/robottelo#18859
Summary by Sourcery
Add Airgun test coverage for the Disassociate Hosts function on the All hosts page, including navigation, selection logic, and modal interactions.
New Features:
Enhancements: