Skip to content

Commit

Permalink
Fix hardware model delete functionality (SatelliteQE#1231)
Browse files Browse the repository at this point in the history
The Actions header in the table was removed
The delete action is now accessible via an svg
  • Loading branch information
dosas authored Feb 20, 2024
1 parent 1e766d6 commit faac944
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion airgun/entities/hardware_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def delete(self, entity_name, err_message=''):
"""
view = self.navigate_to(self, 'All')
view.search(entity_name)
view.table.row(name=entity_name)['Actions'].widget.click()
view.table.row(name=entity_name)[4].widget.item_select("Delete")
view.delete_dialog.confirm()
if err_message:
view.flash.assert_message(f"Danger alert: {err_message}")
Expand Down
9 changes: 5 additions & 4 deletions airgun/views/hardware_model.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from widgetastic.widget import Text, TextInput
from widgetastic_patternfly import BreadCrumb, Button
from widgetastic_patternfly import BreadCrumb
from widgetastic_patternfly4 import Dropdown

from airgun.views.common import BaseLoggedInView, SearchableViewMixinPF4
from airgun.widgets import ConfirmationDialog, SatTable
from airgun.widgets import Pf4ConfirmationDialog, SatTable


class DeleteHardwareModelDialog(ConfirmationDialog):
class DeleteHardwareModelDialog(Pf4ConfirmationDialog):
confirm_dialog = Text(".//button[contains(normalize-space(.),'Delete')]")
cancel_dialog = Text(".//button[normalize-space(.)='Cancel']")

Expand All @@ -18,7 +19,7 @@ class HardwareModelsView(BaseLoggedInView, SearchableViewMixinPF4):
'.//table',
column_widgets={
'Name': Text('.//a'),
'Actions': Button('Delete'),
4: Dropdown(),
},
)

Expand Down

0 comments on commit faac944

Please sign in to comment.