diff --git a/test/e2e/gui/objects_map/settings_names.py b/test/e2e/gui/objects_map/settings_names.py index 4b5ae1c94f..f3e41bf8d4 100644 --- a/test/e2e/gui/objects_map/settings_names.py +++ b/test/e2e/gui/objects_map/settings_names.py @@ -48,10 +48,12 @@ never_show_radioButton_StatusRadioButton = {"container": settingsContentBase_Scr mainWindow_ContactsView = {"container": statusDesktop_mainWindow, "type": "ContactsView", "unnamed": 1, "visible": True} mainWindow_Send_contact_request_to_chat_key_StatusButton = {"checkable": False, "container": mainWindow_ContactsView, "objectName": "ContactsView_ContactRequest_Button", "type": "StatusButton", "visible": True} contactsTabBar_Pending_Requests_StatusTabButton = {"container": mainWindow_ContactsView, "objectName": "ContactsView_PendingRequest_Button", "type": "StatusTabButton", "visible": True} -settingsContentBaseScrollView_ContactListPanel = {"container": mainWindow_ContactsView, "objectName": "ContactListPanel_ListView", "type": "StatusListView", "visible": True} +settingsContentBaseScrollView_ContactListPanel = {"container": settingsContentBase_ScrollView, "objectName": "ContactListPanel_ListView", "type": "ContactsListPanel", "visible": True} settingsContentBaseScrollView_Item = {"container": mainWindow_ContactsView, "type": "Item", "unnamed": 1, "visible": True} -settingsContentBaseScrollView_sentRequests_ContactsListPanel = {"container": mainWindow_ContactsView, "objectName": "sentRequests_ContactsListPanel", "type": "ContactsListPanel", "visible": True} -contactsTabBar_Contacts_StatusTabButton = {"container": mainWindow_ContactsView, "id": "contactsBtn", "type": "StatusTabButton", "unnamed": 1, "visible": True} +settingsContentBaseScrollView_sentRequests_ContactsListPanel = {"container": mainWindow_ContactsView, "objectName": "ContactListPanel", "type": "ContactsListPanel", "visible": True} +settingsContentBaseScrollView_ContactListPanel_Header = {"container": settingsContentBase_ScrollView, "type": "SectionComponent", "unnamed": 1, "visible": True} +mainWindow_contactsTabBar_StatusTabBar = {"container": statusDesktop_mainWindow, "id": "contactsTabBar", "type": "StatusTabBar", "unnamed": 1, "visible": True} +contactsTabBar_Contacts_StatusTabButton = {"checkable": True, "container": mainWindow_contactsTabBar_StatusTabBar, "objectName": "ContactsView_Contacts_Button", "type": "StatusTabButton", "visible": True} settingsContentBaseScrollView_receivedRequests_ContactsListPanel = {"container": mainWindow_ContactsView, "objectName": "ContactsListPanel", "type": "ContactsListPanel", "visible": True} settingsContentBaseScrollView_mutualContacts_ContactsListPanel = {"container": mainWindow_ContactsView, "id": "mutualContacts", "type": "ContactsListPanel", "unnamed": 1, "visible": True} settingsContentBaseScrollView_Invite_friends_StatusButton = {"container": mainWindow_ContactsView, "type": "StatusButton", "unnamed": 1, "visible": True} diff --git a/test/e2e/gui/screens/settings_messaging.py b/test/e2e/gui/screens/settings_messaging.py index e0696984f8..9d5487dac1 100644 --- a/test/e2e/gui/screens/settings_messaging.py +++ b/test/e2e/gui/screens/settings_messaging.py @@ -59,17 +59,16 @@ class ContactItem: return self.contact def init_ui(self): + self.contact = str(self.object.userName) for child in walk_children(self.object): if str(getattr(child, 'id', '')) == 'iconOrImage': self.icon = Image(driver.objectMap.realName(child)) - elif str(getattr(child, 'id', '')) == 'menuButton': + elif str(getattr(child, 'objectName', '')) == 'moreBtn': self._open_canvas_button = Button(real_name=driver.objectMap.realName(child)) elif str(getattr(child, 'objectName', '')) == 'acceptBtn': self._accept_button = Button(real_name=driver.objectMap.realName(child)) elif str(getattr(child, 'objectName', '')) == 'declineBtn': self._reject_button = Button(real_name=driver.objectMap.realName(child)) - elif str(getattr(child, 'id', '')) == 'statusListItemTitle': - self.contact = str(child.text) elif str(getattr(child, 'objectName', '')) == 'chat-icon': self._chat_button = Button(real_name=driver.objectMap.realName(child)) @@ -110,6 +109,7 @@ class ContactsSettingsView(QObject): self._contacts_items_list = List(settings_names.settingsContentBaseScrollView_ContactListPanel) self._pending_request_sent_panel = QObject( settings_names.settingsContentBaseScrollView_sentRequests_ContactsListPanel) + self.section_header = QObject(settings_names.settingsContentBaseScrollView_ContactListPanel_Header) self._pending_request_received_panel = QObject( settings_names.settingsContentBaseScrollView_receivedRequests_ContactsListPanel) self._contacts_panel = QObject(settings_names.settingsContentBaseScrollView_mutualContacts_ContactsListPanel) diff --git a/test/e2e/tests/crtitical_tests_prs/test_messaging_1x1_chat.py b/test/e2e/tests/crtitical_tests_prs/test_messaging_1x1_chat.py index 0815c6375d..cfbb18009f 100644 --- a/test/e2e/tests/crtitical_tests_prs/test_messaging_1x1_chat.py +++ b/test/e2e/tests/crtitical_tests_prs/test_messaging_1x1_chat.py @@ -67,7 +67,7 @@ def test_1x1_chat_add_contact_in_settings(multiple_instances): contacts_settings.open_pending_requests() assert Messaging.CONTACT_REQUEST_SENT.value == contacts_settings.contact_items[0].object.contactText assert len(contacts_settings.contact_items) == 1 - assert contacts_settings.pending_request_sent_list_title == 'Sent' + assert str(contacts_settings.section_header.object.text) == 'Sent' main_window.hide() with step(f'Verify that contact request was received by {user_two.name}'): @@ -77,7 +77,7 @@ def test_1x1_chat_add_contact_in_settings(multiple_instances): messaging_settings = settings.left_panel.open_messaging_settings() contacts_settings = messaging_settings.open_contacts_settings() contacts_settings.open_pending_requests() - assert contacts_settings.pending_request_received_list_title == 'Received' + assert str(contacts_settings.section_header.object.text) == 'Received' assert user_one.name == contacts_settings.contact_items[0].contact assert len(contacts_settings.contact_items) == 1 @@ -96,7 +96,7 @@ def test_1x1_chat_add_contact_in_settings(multiple_instances): with step(f'Verify that contact appeared in contacts list of {user_two.name} in messaging settings'): contacts_settings = main_window.left_panel.open_settings().left_panel.open_messaging_settings().open_contacts_settings() contacts_settings.open_contacts() - assert contacts_settings.contacts_list_title == 'Contacts' + assert str(contacts_settings.section_header.object.text) == 'Contacts' assert user_one.name == contacts_settings.contact_items[0].contact assert len(contacts_settings.contact_items) == 1 main_window.hide() @@ -106,7 +106,7 @@ def test_1x1_chat_add_contact_in_settings(multiple_instances): main_window.prepare() contacts_settings = main_window.left_panel.open_settings().left_panel.open_messaging_settings().open_contacts_settings() contacts_settings.open_contacts() - assert contacts_settings.contacts_list_title == 'Contacts' + assert str(contacts_settings.section_header.object.text) == 'Contacts' assert user_two.name == contacts_settings.contact_items[0].contact assert len(contacts_settings.contact_items) == 1 diff --git a/test/ui-test/testSuites/suite_communities/shared/scripts/names.py b/test/ui-test/testSuites/suite_communities/shared/scripts/names.py index f94aa944e9..a2d47a2d89 100644 --- a/test/ui-test/testSuites/suite_communities/shared/scripts/names.py +++ b/test/ui-test/testSuites/suite_communities/shared/scripts/names.py @@ -9,3 +9,4 @@ from scripts.settings_names import * from community_names import * from community_portal_names import * from search_names import * +mainWindow_contactsTabBar_StatusTabBar = {"container": statusDesktop_mainWindow, "id": "contactsTabBar", "type": "StatusTabBar", "unnamed": 1, "visible": True} diff --git a/ui/app/AppLayouts/Profile/views/ContactsView.qml b/ui/app/AppLayouts/Profile/views/ContactsView.qml index 14b8c9f50c..2bd3164369 100644 --- a/ui/app/AppLayouts/Profile/views/ContactsView.qml +++ b/ui/app/AppLayouts/Profile/views/ContactsView.qml @@ -75,6 +75,7 @@ SettingsContentBase { StatusTabButton { readonly property int panelUsage: Constants.contactsPanelUsage.mutualContacts + objectName: "ContactsView_Contacts_Button" width: implicitWidth text: qsTr("Contacts") }