Skip to content

Commit

Permalink
use SearchableViewMixinPF4 instead of SubscriptionSearchableViewMixin…
Browse files Browse the repository at this point in the history
… in class SearchableViewMixinPF4
  • Loading branch information
vijaysawant committed Jan 22, 2025
1 parent 8f4dffa commit 92d85b8
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions airgun/views/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,9 @@
ItemsListReadOnly,
ProgressBar,
SatTable,
Search,
)


# Search field and button on Subscriptions page uses different locators,
# so subclass it and use it in our custom SearchableViewMixin
class SubscriptionSearch(Search):
search_field = TextInput(locator=(".//input[starts-with(@id, 'downshift-')]"))
search_button = Button('Search')


class SubscriptionSearchableViewMixin(SearchableViewMixinPF4):
searchbox = SubscriptionSearch()


class DeleteSubscriptionConfirmationDialog(ConfirmationDialog):
confirm_dialog = Button('Delete')
cancel_dialog = Button('Cancel')
Expand Down Expand Up @@ -115,7 +103,7 @@ def fill(self, values):
self.close()


class SubscriptionListView(BaseLoggedInView, SubscriptionSearchableViewMixin):
class SubscriptionListView(BaseLoggedInView, SearchableViewMixinPF4):
"""List of all subscriptions."""

table = SatSubscriptionsViewTable(
Expand Down

0 comments on commit 92d85b8

Please sign in to comment.