e2e: updated join communities flow

This commit is contained in:
Yevheniia Berdnyk 2023-09-06 11:11:56 +03:00
parent d63b1240d7
commit 56b13cbdca
No known key found for this signature in database
GPG Key ID: 0642C73C66214825
2 changed files with 5 additions and 4 deletions

View File

@ -1227,7 +1227,7 @@ class TestCommunityMultipleDeviceMergedTwo(MultipleSharedDeviceTestCase):
control_message_1_1_chat = "it is just a message text"
self.chat_2.send_message(control_message_1_1_chat)
self.chat_2.chat_element_by_text(community_name).view_community_button.click()
self.community_2.join_community()
self.community_2.join_community(open_community=False)
self.home_1.just_fyi("Device 1 accepts the community request")
self.home_1.jump_to_communities_home()

View File

@ -411,16 +411,17 @@ class CommunityView(HomeView):
#### NEW UI
# Communities initial page
self.community_description_text = Text(self.driver, accessibility_id="community-description-text")
self.community_status_joined = Text(self.driver, accessibility_id="status-tag-positive")
def join_community(self, password=common_password):
def join_community(self, password=common_password, open_community=True):
self.driver.info("Joining community")
self.join_button.click()
self.checkbox_button.scroll_to_element()
self.checkbox_button.enable()
self.join_community_button.scroll_and_click()
self.password_input.set_value(password)
Button(self.driver,
xpath="//*[@content-desc='password-input']/../following-sibling::*//*[@text='Join Community']").click()
if open_community:
self.community_status_joined.wait_for_visibility_of_element(60)
def get_channel(self, channel_name: str):
self.driver.info("Getting %s channel element in community" % channel_name)