chore: fixes for edit profile test
This commit is contained in:
parent
b32bed058f
commit
aa29339272
|
@ -125,6 +125,9 @@ change_password_button = {"container": statusDesktop_mainWindow, "type": "Status
|
||||||
bio_StatusInput = {"container": statusDesktop_mainWindow, "objectName": "bioInput", "type": "StatusInput", "visible": True}
|
bio_StatusInput = {"container": statusDesktop_mainWindow, "objectName": "bioInput", "type": "StatusInput", "visible": True}
|
||||||
bio_TextEdit = {"container": bio_StatusInput, "type": "TextEdit", "unnamed": 1, "visible": True}
|
bio_TextEdit = {"container": bio_StatusInput, "type": "TextEdit", "unnamed": 1, "visible": True}
|
||||||
addMoreSocialLinks = {"container": statusDesktop_mainWindow, "objectName": "addMoreSocialLinks", "type": "StatusLinkText", "visible": True}
|
addMoreSocialLinks = {"container": statusDesktop_mainWindow, "objectName": "addMoreSocialLinks", "type": "StatusLinkText", "visible": True}
|
||||||
|
mainWindow_profileTabBar_StatusTabBar = {"container": statusDesktop_mainWindow, "id": "profileTabBar", "type": "StatusTabBar", "unnamed": 1, "visible": True}
|
||||||
|
profileTabBar_Web_StatusTabButton = {"checkable": True, "container": mainWindow_profileTabBar_StatusTabBar, "objectName": "webTabButton", "type": "StatusTabButton", "visible": True}
|
||||||
|
profileTabBar_Identity_StatusTabButton = {"checkable": True, "container": mainWindow_profileTabBar_StatusTabBar, "objectName": "identityTabButton", "type": "StatusTabButton", "visible": True}
|
||||||
|
|
||||||
# Syncing Settings View
|
# Syncing Settings View
|
||||||
mainWindow_SyncingView = {"container": statusDesktop_mainWindow, "type": "SyncingView", "unnamed": 1, "visible": True}
|
mainWindow_SyncingView = {"container": statusDesktop_mainWindow, "type": "SyncingView", "unnamed": 1, "visible": True}
|
||||||
|
|
|
@ -23,36 +23,38 @@ class ProfileSettingsView(QObject):
|
||||||
self._bio_text_field = TextEdit('bio_TextEdit')
|
self._bio_text_field = TextEdit('bio_TextEdit')
|
||||||
self._add_more_links_label = TextLabel('addMoreSocialLinks')
|
self._add_more_links_label = TextLabel('addMoreSocialLinks')
|
||||||
self._links_list = QObject('linksView')
|
self._links_list = QObject('linksView')
|
||||||
|
self._web_tab_button = Button('profileTabBar_Web_StatusTabButton')
|
||||||
|
self._identity_tab_button = Button('profileTabBar_Identity_StatusTabButton')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@allure.step('Get display name')
|
@allure.step('Get display name')
|
||||||
def display_name(self) -> str:
|
def display_name(self) -> str:
|
||||||
self._scroll_view.vertical_scroll_to(self._display_name_text_field)
|
self._identity_tab_button.click()
|
||||||
return self._display_name_text_field.text
|
return self._display_name_text_field.text
|
||||||
|
|
||||||
@allure.step('Set user name')
|
@allure.step('Set user name')
|
||||||
def set_name(self, value: str):
|
def set_name(self, value: str):
|
||||||
self._scroll_view.vertical_scroll_to(self._display_name_text_field)
|
self._identity_tab_button.click()
|
||||||
self._display_name_text_field.text = value
|
self._display_name_text_field.text = value
|
||||||
self.save_changes()
|
self.save_changes()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@allure.step('Get bio')
|
@allure.step('Get bio')
|
||||||
def bio(self) -> str:
|
def bio(self) -> str:
|
||||||
self._scroll_view.vertical_scroll_to(self._bio_text_field)
|
self._identity_tab_button.click()
|
||||||
return self._bio_text_field.text
|
return self._bio_text_field.text
|
||||||
|
|
||||||
@bio.setter
|
@bio.setter
|
||||||
@allure.step('Set bio')
|
@allure.step('Set bio')
|
||||||
def bio(self, value: str):
|
def bio(self, value: str):
|
||||||
self._scroll_view.vertical_scroll_to(self._bio_text_field)
|
self._identity_tab_button.click()
|
||||||
self._bio_text_field.text = value
|
self._bio_text_field.text = value
|
||||||
self.save_changes()
|
self.save_changes()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@allure.step('Get social links')
|
@allure.step('Get social links')
|
||||||
def social_links(self) -> dict:
|
def social_links(self) -> dict:
|
||||||
self._scroll_view.vertical_scroll_to(self._add_more_links_label)
|
self._web_tab_button.click()
|
||||||
links = {}
|
links = {}
|
||||||
for link_name in walk_children(
|
for link_name in walk_children(
|
||||||
driver.waitForObjectExists(self._links_list.real_name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC)):
|
driver.waitForObjectExists(self._links_list.real_name, configs.timeouts.UI_LOAD_TIMEOUT_MSEC)):
|
||||||
|
@ -81,6 +83,7 @@ class ProfileSettingsView(QObject):
|
||||||
|
|
||||||
@allure.step('Verify social links')
|
@allure.step('Verify social links')
|
||||||
def verify_social_links(self, links):
|
def verify_social_links(self, links):
|
||||||
|
self._web_tab_button.click()
|
||||||
twitter = links[0]
|
twitter = links[0]
|
||||||
personal_site = links[1]
|
personal_site = links[1]
|
||||||
github = links[2]
|
github = links[2]
|
||||||
|
@ -102,7 +105,7 @@ class ProfileSettingsView(QObject):
|
||||||
|
|
||||||
@allure.step('Open social links form')
|
@allure.step('Open social links form')
|
||||||
def open_social_links_popup(self):
|
def open_social_links_popup(self):
|
||||||
self._scroll_view.vertical_scroll_to(self._add_more_links_label)
|
self._web_tab_button.click()
|
||||||
self._add_more_links_label.click()
|
self._add_more_links_label.click()
|
||||||
return SocialLinksPopup().wait_until_appears()
|
return SocialLinksPopup().wait_until_appears()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue