Skip to content

Commit

Permalink
subscription page search field ui selector update (#1702)
Browse files Browse the repository at this point in the history
* subscription page search field ui selector update

* implemented PF4 related comments

* use SearchableViewMixinPF4 instead of SubscriptionSearchableViewMixin in class SearchableViewMixinPF4

(cherry picked from commit 4441e8d)
  • Loading branch information
vijaysawant authored and web-flow committed Jan 22, 2025
1 parent 2f83ed7 commit 0b64903
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions airgun/views/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,15 @@
from widgetastic_patternfly import BreadCrumb, Button

from airgun.exceptions import ReadOnlyWidgetError
from airgun.views.common import BaseLoggedInView, SatTab, SearchableViewMixin
from airgun.views.common import BaseLoggedInView, SatTab, SearchableViewMixinPF4
from airgun.widgets import (
ConfirmationDialog,
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(SearchableViewMixin):
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 0b64903

Please sign in to comment.