chore: replaced inviting people to community by another method (#15226)

This commit is contained in:
Valentina1133 2024-06-20 17:18:10 +07:00 committed by GitHub
parent c8eb48cf04
commit c3112e9f23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 26 additions and 17 deletions

View File

@ -18,6 +18,7 @@ closeCrossPopupButton = {"container": statusDesktop_mainWindow_overlay, "objectN
mainWindow_RighPanel = {"container": statusDesktop_mainWindow, "type": "ColumnLayout", "objectName": "mainRightView", "visible": True} mainWindow_RighPanel = {"container": statusDesktop_mainWindow, "type": "ColumnLayout", "objectName": "mainRightView", "visible": True}
# Navigation Panel # Navigation Panel
mainWindow_scrollView_StatusScrollView = {"container": mainWindow_StatusWindow, "id": "scrollView", "type": "StatusScrollView", "unnamed": 1, "visible": True}
mainWindow_StatusAppNavBar = {"container": statusDesktop_mainWindow, "type": "StatusAppNavBar", "unnamed": 1, "visible": True} mainWindow_StatusAppNavBar = {"container": statusDesktop_mainWindow, "type": "StatusAppNavBar", "unnamed": 1, "visible": True}
messages_navbar_StatusNavBarTabButton = {"checkable": True, "container": mainWindow_StatusAppNavBar, "objectName": "Messages-navbar", "type": "StatusNavBarTabButton", "visible": True} messages_navbar_StatusNavBarTabButton = {"checkable": True, "container": mainWindow_StatusAppNavBar, "objectName": "Messages-navbar", "type": "StatusNavBarTabButton", "visible": True}
mainWindow_statusMainNavBarListView_ListView = {"container": statusDesktop_mainWindow, "objectName": "statusMainNavBarListView", "type": "ListView", "visible": True} mainWindow_statusMainNavBarListView_ListView = {"container": statusDesktop_mainWindow, "objectName": "statusMainNavBarListView", "type": "ListView", "visible": True}
@ -28,6 +29,7 @@ mainWindow_ProfileNavBarButton = {"container": statusDesktop_mainWindow, "object
mainWindow_statusCommunityMainNavBarListView_ListView = {"container": statusDesktop_mainWindow, "objectName": "statusCommunityMainNavBarListView", "type": "ListView", "visible": True} mainWindow_statusCommunityMainNavBarListView_ListView = {"container": statusDesktop_mainWindow, "objectName": "statusCommunityMainNavBarListView", "type": "ListView", "visible": True}
statusCommunityMainNavBarListView_CommunityNavBarButton = {"checkable": True, "container": mainWindow_statusCommunityMainNavBarListView_ListView, "objectName": "CommunityNavBarButton", "type": "StatusNavBarTabButton", "visible": True} statusCommunityMainNavBarListView_CommunityNavBarButton = {"checkable": True, "container": mainWindow_statusCommunityMainNavBarListView_ListView, "objectName": "CommunityNavBarButton", "type": "StatusNavBarTabButton", "visible": True}
invite_People_StatusMenuItem = {"container": statusDesktop_mainWindow_overlay, "enabled": True, "objectName": "invitePeople", "type": "StatusMenuItem", "visible": True} invite_People_StatusMenuItem = {"container": statusDesktop_mainWindow_overlay, "enabled": True, "objectName": "invitePeople", "type": "StatusMenuItem", "visible": True}
scrollView_Add_members_StatusButton = {"checkable": False, "container": mainWindow_scrollView_StatusScrollView, "objectName": "CommunityWelcomeBannerPanel_AddMembersButton", "type": "StatusButton", "visible": True}
# Banners # Banners
secureYourSeedPhraseBanner_ModuleWarning = {"container": statusDesktop_mainWindow, "objectName": "secureYourSeedPhraseBanner", "type": "ModuleWarning", "visible": True} secureYourSeedPhraseBanner_ModuleWarning = {"container": statusDesktop_mainWindow, "objectName": "secureYourSeedPhraseBanner", "type": "ModuleWarning", "visible": True}

View File

@ -10,6 +10,7 @@ from constants import UserChannel, ColorCodes
from driver.objects_access import walk_children from driver.objects_access import walk_children
from gui.components.community.community_category_popup import NewCategoryPopup, EditCategoryPopup, CategoryPopup from gui.components.community.community_category_popup import NewCategoryPopup, EditCategoryPopup, CategoryPopup
from gui.components.community.community_channel_popups import EditChannelPopup, NewChannelPopup from gui.components.community.community_channel_popups import EditChannelPopup, NewChannelPopup
from gui.components.community.invite_contacts import InviteContactsPopup
from gui.components.community.welcome_community import WelcomeCommunityPopup from gui.components.community.welcome_community import WelcomeCommunityPopup
from gui.components.context_menu import ContextMenu from gui.components.context_menu import ContextMenu
from gui.components.delete_popup import DeletePopup, DeleteCategoryPopup from gui.components.delete_popup import DeletePopup, DeleteCategoryPopup
@ -208,6 +209,7 @@ class LeftPanel(QObject):
communities_names.scrollView_addButton_StatusChatListCategoryItemButton) communities_names.scrollView_addButton_StatusChatListCategoryItemButton)
self._more_button = Button(communities_names.scrollView_menuButton_StatusChatListCategoryItemButton) self._more_button = Button(communities_names.scrollView_menuButton_StatusChatListCategoryItemButton)
self._arrow_button = Button(communities_names.scrollView_toggleButton_StatusChatListCategoryItemButton) self._arrow_button = Button(communities_names.scrollView_toggleButton_StatusChatListCategoryItemButton)
self._add_members_button = Button(names.scrollView_Add_members_StatusButton)
@property @property
@allure.step('Get community logo') @allure.step('Get community logo')
@ -380,6 +382,11 @@ class LeftPanel(QObject):
def right_click_on_panel(self): def right_click_on_panel(self):
super(LeftPanel, self).right_click() super(LeftPanel, self).right_click()
@allure.step('Invite people to community')
def invite_people_to_community(self, contacts: typing.List[str], message: str):
self._add_members_button.click()
InviteContactsPopup().wait_until_appears().invite(contacts, message)
class Chat(QObject): class Chat(QObject):

View File

@ -176,10 +176,10 @@ def test_community_admin_kick_member_and_delete_message(multiple_instances):
settings = main_screen.left_panel.open_settings() settings = main_screen.left_panel.open_settings()
settings.left_panel.open_advanced_settings().enable_creation_of_communities() settings.left_panel.open_advanced_settings().enable_creation_of_communities()
main_screen.create_community(community_params['name'], community_params['description'], community = main_screen.create_community(community_params['name'], community_params['description'],
community_params['intro'], community_params['outro'], community_params['intro'], community_params['outro'],
community_params['logo']['fp'], community_params['banner']['fp']) community_params['logo']['fp'], community_params['banner']['fp'])
main_screen.left_panel.invite_people_in_community([user_one.name], 'Message', community_params['name']) community.left_panel.invite_people_to_community([user_one.name], 'Message')
main_screen.hide() main_screen.hide()
with step(f'User {user_one.name}, accept invitation from {user_two.name}'): with step(f'User {user_one.name}, accept invitation from {user_two.name}'):

View File

@ -95,11 +95,11 @@ def test_add_a_contact_from_community_member_list(multiple_instances):
with step('Enable creation of community option'): with step('Enable creation of community option'):
settings = main_screen.left_panel.open_settings() settings = main_screen.left_panel.open_settings()
settings.left_panel.open_advanced_settings().enable_creation_of_communities() settings.left_panel.open_advanced_settings().enable_creation_of_communities()
main_screen.create_community(community_params['name'], community_params['description'], community = main_screen.create_community(community_params['name'], community_params['description'],
community_params['intro'], community_params['outro'], community_params['intro'], community_params['outro'],
community_params['logo']['fp'], community_params['banner']['fp']) community_params['logo']['fp'], community_params['banner']['fp'])
main_screen.left_panel.invite_people_in_community([user_one.name], 'Message', community_params['name']) community.left_panel.invite_people_to_community([user_one.name], 'Message')
main_screen.left_panel.invite_people_in_community([user_three.name], 'Message', community_params['name']) community.left_panel.invite_people_to_community([user_three.name], 'Message')
main_screen.hide() main_screen.hide()
with step(f'User {user_three.name}, accept invitation from {user_two.name}'): with step(f'User {user_three.name}, accept invitation from {user_two.name}'):

View File

@ -70,10 +70,10 @@ def test_join_community_and_pin_unpin_message(multiple_instances):
with step('Enable creation of community option'): with step('Enable creation of community option'):
settings = main_screen.left_panel.open_settings() settings = main_screen.left_panel.open_settings()
settings.left_panel.open_advanced_settings().enable_creation_of_communities() settings.left_panel.open_advanced_settings().enable_creation_of_communities()
main_screen.create_community(community_params['name'], community_params['description'], community = main_screen.create_community(community_params['name'], community_params['description'],
community_params['intro'], community_params['outro'], community_params['intro'], community_params['outro'],
community_params['logo']['fp'], community_params['banner']['fp']) community_params['logo']['fp'], community_params['banner']['fp'])
main_screen.left_panel.invite_people_in_community([user_one.name], 'Message', community_params['name']) community.left_panel.invite_people_to_community([user_one.name], 'Message')
main_screen.hide() main_screen.hide()
with step(f'User {user_one.name}, accept invitation from {user_two.name}'): with step(f'User {user_one.name}, accept invitation from {user_two.name}'):

View File

@ -86,10 +86,10 @@ def test_switch_state_to_offline_online_automatic(multiple_instances):
with step('Enable creation of community option'): with step('Enable creation of community option'):
settings = main_screen.left_panel.open_settings() settings = main_screen.left_panel.open_settings()
settings.left_panel.open_advanced_settings().enable_creation_of_communities() settings.left_panel.open_advanced_settings().enable_creation_of_communities()
main_screen.create_community(community_params['name'], community_params['description'], community = main_screen.create_community(community_params['name'], community_params['description'],
community_params['intro'], community_params['outro'], community_params['intro'], community_params['outro'],
community_params['logo']['fp'], community_params['banner']['fp']) community_params['logo']['fp'], community_params['banner']['fp'])
main_screen.left_panel.invite_people_in_community([user_one.name], 'Message', community_params['name']) community.left_panel.invite_people_to_community([user_one.name], 'Message')
main_screen.hide() main_screen.hide()
with step(f'User {user_one.name}, accept invitation from {user_two.name}'): with step(f'User {user_one.name}, accept invitation from {user_two.name}'):