Skip to content
This repository was archived by the owner on Aug 13, 2024. It is now read-only.

Commit 7a8a367

Browse files
committed
Revert "chore: make set_in method abstract and change locator"
This reverts commit 6571520.
1 parent 6571520 commit 7a8a367

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

gui/objects_map/communities_names.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
o_TokenItem = {"container": statusDesktop_mainWindow_overlay, "index": 0, "type": "TokenItem", "unnamed": 1, "visible": True}
122122
add_StatusButton = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "type": "StatusButton", "unnamed": 1, "visible": True}
123123
customPermissionListItem = {"container": statusDesktop_mainWindow_overlay, "objectName": "becomeAdmin", "type": "CustomPermissionListItem", "visible": True}
124-
communityItem_CommunityListItem = {"container": statusDesktop_mainWindow_overlay, "objectName": RegularExpression("communityListItem_*"), "type": "CommunityListItem", "visible": True}
124+
communityItem_CommunityListItem = {"container": statusDesktop_mainWindow_overlay, "id": "communityItem", "type": "CommunityListItem", "unnamed": 1, "visible": True}
125125
editPermissionView_switchItem_StatusSwitch = {"checkable": True, "container": mainWindow_editPermissionView_EditPermissionView, "objectName": "switchItem", "type": "StatusSwitch", "visible": True}
126126
editPermissionView_Create_permission_StatusButton = {"checkable": False, "container": mainWindow_editPermissionView_EditPermissionView, "text": "Create permission", "type": "StatusButton", "unnamed": 1, "visible": True}
127127
mainWindow_PermissionsView = {"container": statusDesktop_mainWindow, "type": "PermissionsView", "unnamed": 1, "visible": True}

gui/screens/community_settings.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def __init__(self):
448448
self._who_holds_amount_field = TextEdit(communities_names.inputValue_StyledTextField)
449449
self._asset_item = QObject(communities_names.o_TokenItem)
450450
self._is_allowed_to_option_button = Button(communities_names.customPermissionListItem)
451-
self._in_channel_button = Button(communities_names.communityItem_CommunityListItem)
451+
self._in_general_button = Button(communities_names.communityItem_CommunityListItem)
452452
self._hide_permission_checkbox = CheckBox(communities_names.editPermissionView_switchItem_StatusSwitch)
453453
self._create_permission_button = Button(communities_names.editPermissionView_Create_permission_StatusButton)
454454
self._add_button = Button(communities_names.add_StatusButton)
@@ -522,15 +522,15 @@ def set_who_holds_asset_and_amount(self, asset: str, amount: str):
522522
def set_is_allowed_to(self, name):
523523
self.open_is_allowed_to_context_menu()
524524
self._is_allowed_to_option_button.real_name['objectName'] = name
525-
self._is_allowed_to_option_button.click()
525+
self._is_allowed_to_option_button.wait_until_appears().click()
526526
self.click_add_button()
527527

528528
@allure.step('Choose channel from In context menu')
529-
def set_in(self, channel):
530-
self.open_in_context_menu()
531-
self._in_channel_button.real_name['objectName'] = 'communityListItem_' + channel
532-
self._in_channel_button.click()
533-
self.click_add_button()
529+
def set_in(self, in_general):
530+
if in_general == '#general':
531+
self.open_in_context_menu()
532+
self._in_general_button.wait_until_appears().click()
533+
self.click_add_button()
534534

535535
@allure.step('Click add button')
536536
def click_add_button(self, attempt: int = 2):

0 commit comments

Comments
 (0)