diff --git a/constants/messaging.py b/constants/messaging.py index fade62d..c0240e8 100644 --- a/constants/messaging.py +++ b/constants/messaging.py @@ -8,4 +8,5 @@ class Messaging(Enum): NEW_CONTACT_REQUEST = 'New Contact Request' MESSAGE_NOTE_IDENTITY_REQUEST = 'Ask a question only they can answer' YOU_NEED_TO_BE_A_MEMBER = 'You need to be a member of this group to send messages' - \ No newline at end of file + ID_VERIFICATION_REQUEST_SENT = 'ID verification request sent' + ID_VERIFICATION_REPLY_SENT = 'ID verification reply sent' diff --git a/gui/components/social_links_popup.py b/gui/components/social_links_popup.py index 8c74975..8e03ebc 100644 --- a/gui/components/social_links_popup.py +++ b/gui/components/social_links_popup.py @@ -20,8 +20,8 @@ class SocialLinksPopup(BasePopup): self._add_button = Button(names.social_links_add_StatusBackButton) @allure.step('Get social link') - def _get_list_item(self, title: str) -> QObject: - self._add_social_link_list_item.real_name['title'] = title + def _get_list_item(self, index: int) -> QObject: + self._add_social_link_list_item.real_name['index'] = index return self._add_social_link_list_item @allure.step('Get social link field') @@ -35,8 +35,8 @@ class SocialLinksPopup(BasePopup): return self._social_link_text_field @allure.step('Add link to link field') - def add_link(self, network: str, links: typing.List[str]): - self._get_list_item(network).click() + def add_link(self, index: int, links: typing.List[str]): + self._get_list_item(index).click() time.sleep(0.5) for occurrence, link in enumerate(links): self._get_text_field(occurrence).text = link diff --git a/gui/objects_map/communities_names.py b/gui/objects_map/communities_names.py index 18b339a..1161fa9 100644 --- a/gui/objects_map/communities_names.py +++ b/gui/objects_map/communities_names.py @@ -37,7 +37,7 @@ add_channels_StatusButton = {"checkable": False, "container": mainWindow_scrollV scrollView_general_StatusChatListItem = {"container": mainWindow_scrollView_StatusScrollView, "objectName": "general", "type": "StatusChatListItem", "visible": True} # Tool Bar -mainWindow_statusToolBar_StatusToolBar = {"container": mainWindow_communityLoader_Loader, "objectName": "statusToolBar", "type": "StatusToolBar", "visible": True} +mainWindow_statusToolBar_StatusToolBar = {"container": mainWindow_StatusWindow, "objectName": "statusToolBar", "type": "StatusToolBar", "visible": True} statusToolBar_chatToolbarMoreOptionsButton = {"container": mainWindow_statusToolBar_StatusToolBar, "objectName": "chatToolbarMoreOptionsButton", "type": "StatusFlatRoundButton", "visible": True} delete_Channel_StatusMenuItem = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "enabled": True, "objectName": "deleteOrLeaveMenuItem", "type": "StatusMenuItem", "visible": True} edit_Channel_StatusMenuItem = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "enabled": True, "objectName": "editChannelMenuItem", "type": "StatusMenuItem", "visible": True} diff --git a/gui/objects_map/names.py b/gui/objects_map/names.py index 9bc7fe4..80ee198 100644 --- a/gui/objects_map/names.py +++ b/gui/objects_map/names.py @@ -349,7 +349,7 @@ reEncryptRestartButton = {"container": statusDesktop_mainWindow_overlay, "object reEncryptionComplete = {"container": statusDesktop_mainWindow_overlay, "objectName": "statusListItemSubTitle", "type": "StatusTextWithLoadingState", "visible": True} # Social Links Popup -socialLink_StatusListItem = {"container": statusDesktop_mainWindow_overlay, "type": "StatusListItem", "title": "", "visible": True} +socialLink_StatusListItem = {"container": statusDesktop_mainWindow_overlay, "index": 1, "type": "StatusListItem", "unnamed": 1, "visible": True} placeholder_StatusBaseText = {"container": statusDesktop_mainWindow_overlay, "id": "placeholder", "type": "StatusBaseText", "unnamed": 1, "visible": True} social_links_back_StatusBackButton = {"container": statusDesktop_mainWindow_overlay, "type": "StatusBackButton", "unnamed": 1, "visible": True} social_links_add_StatusBackButton = {"container": statusDesktop_mainWindow_overlay, "type": "StatusButton", "unnamed": 1, "visible": True} diff --git a/gui/screens/settings_profile.py b/gui/screens/settings_profile.py index cf8e244..15c5c3d 100644 --- a/gui/screens/settings_profile.py +++ b/gui/screens/settings_profile.py @@ -79,18 +79,18 @@ class ProfileSettingsView(QObject): @allure.step('Set social links') def social_links(self, links): links = { - 'Twitter': [links[0]], - 'Personal site': [links[1]], - 'Github': [links[2]], - 'YouTube channel': [links[3]], - 'Discord handle': [links[4]], - 'Telegram handle': [links[5]], - 'Custom link': [links[6], links[7]], + 0: [links[0]], + 1: [links[1]], + 2: [links[2]], + 3: [links[3]], + 4: [links[4]], + 5: [links[5]], + 6: [links[6], links[7]], } - for network, link in links.items(): + for index, link in links.items(): social_links_popup = self.open_social_links_popup() - social_links_popup.add_link(network, link) + social_links_popup.add_link(index, link) @allure.step('Verify social links') def verify_social_links(self, links): @@ -108,12 +108,12 @@ class ProfileSettingsView(QObject): actual_links = self.social_links - assert actual_links['Twitter'] == twitter - assert actual_links['Personal site'] == personal_site + assert actual_links['X (Twitter)'] == twitter + assert actual_links['Personal'] == personal_site assert actual_links['Github'] == github - assert actual_links['YouTube channel'] == youtube - assert actual_links['Discord handle'] == discord - assert actual_links['Telegram handle'] == telegram + assert actual_links['YouTube'] == youtube + assert actual_links['Discord'] == discord + assert actual_links['Telegram'] == telegram assert actual_links[custom_link_text] == custom_link @allure.step('Open social links form') diff --git a/tests/settings/settings_messaging/test_messaging_settings_identity_verification.py b/tests/settings/settings_messaging/test_messaging_settings_identity_verification.py index ad5d3b0..a0bd1e7 100644 --- a/tests/settings/settings_messaging/test_messaging_settings_identity_verification.py +++ b/tests/settings/settings_messaging/test_messaging_settings_identity_verification.py @@ -69,6 +69,10 @@ def test_messaging_settings_identity_verification(multiple_instance, user_data_o assert verify_identity_popup.message_note == Messaging.MESSAGE_NOTE_IDENTITY_REQUEST.value assert not verify_identity_popup.is_send_verification_button_enabled verify_identity_popup.type_message('Hi. Is that you?').send_verification() + + with step('Verify toast message about sent ID verification request'): + toast_messages = main_window.wait_for_notification() + assert Messaging.ID_VERIFICATION_REQUEST_SENT.value in toast_messages main_window.hide() with step(f'Check incoming identity request for {user_two.name}'): @@ -78,6 +82,6 @@ def test_messaging_settings_identity_verification(multiple_instance, user_data_o respond_identity_popup = contacts_settings.open_more_options_popup(user_one.name).respond_to_id_request() respond_identity_popup.type_message('Hi. Yes, its me').send_answer() - with step(f'Answer has been sent {user_two.name}'): - assert respond_identity_popup.is_change_answer_button_visible - respond_identity_popup.close() + with step('Verify toast message about sent ID verification reply'): + toast_messages = main_window.wait_for_notification() + assert Messaging.ID_VERIFICATION_REPLY_SENT.value in toast_messages