mirror of
https://github.com/status-im/status-react.git
synced 2025-02-23 08:08:33 +00:00
e2e: new checks and fixes
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
parent
0469419f9a
commit
ec319974bd
@ -89,6 +89,7 @@ class TestWalletManagement(SingleDeviceTestCase):
|
|||||||
self.driver.fail('Transaction hash was not copied')
|
self.driver.fail('Transaction hash was not copied')
|
||||||
|
|
||||||
@marks.testrail_id(5346)
|
@marks.testrail_id(5346)
|
||||||
|
@marks.flaky
|
||||||
@marks.high
|
@marks.high
|
||||||
def test_collectible_from_wallet(self):
|
def test_collectible_from_wallet(self):
|
||||||
passphrase = wallet_users['F']['passphrase']
|
passphrase = wallet_users['F']['passphrase']
|
||||||
|
@ -423,4 +423,4 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
|
|||||||
if not group_info_view.element_by_text_part('20 members').is_element_displayed():
|
if not group_info_view.element_by_text_part('20 members').is_element_displayed():
|
||||||
self.errors.append('Amount of users is not shown on Group info screen')
|
self.errors.append('Amount of users is not shown on Group info screen')
|
||||||
|
|
||||||
self.errors.verify_no_errors()
|
self.errors.verify_no_errors()
|
@ -201,7 +201,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
|
|||||||
def test_edit_delete_message_in_one_to_one_and_public_chats(self):
|
def test_edit_delete_message_in_one_to_one_and_public_chats(self):
|
||||||
self.create_drivers(2)
|
self.create_drivers(2)
|
||||||
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
|
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
|
||||||
home_1, home_2 = device_1.create_user(), device_2.create_user()
|
home_1, home_2 = device_1.create_user(enable_notifications=True), device_2.create_user()
|
||||||
|
|
||||||
device_2.just_fyi("Create public chat on Device1, send message and edit it then")
|
device_2.just_fyi("Create public chat on Device1, send message and edit it then")
|
||||||
public_key_1, username_1 = home_1.get_public_key_and_username(return_username=True)
|
public_key_1, username_1 = home_1.get_public_key_and_username(return_username=True)
|
||||||
@ -248,6 +248,17 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
|
|||||||
if home_1.element_by_text(message_after_edit_1_1).is_element_displayed():
|
if home_1.element_by_text(message_after_edit_1_1).is_element_displayed():
|
||||||
self.errors.append("Deleted message is shown on chat element on home screen")
|
self.errors.append("Deleted message is shown on chat element on home screen")
|
||||||
|
|
||||||
|
device_2.just_fyi("Send one more message and check that PN will be deleted with message deletion")
|
||||||
|
message_to_delete = 'DELETE ME'
|
||||||
|
home_1.put_app_to_background()
|
||||||
|
chat_private_2.send_message(message_to_delete)
|
||||||
|
home_1.open_notification_bar()
|
||||||
|
home_1.get_pn(message_to_delete).wait_for_element(30)
|
||||||
|
chat_private_2.delete_message_in_chat(message_to_delete)
|
||||||
|
if not home_1.get_pn(message_to_delete).is_element_disappeared(30):
|
||||||
|
self.errors.append("Push notification was not removed after initial message deletion")
|
||||||
|
home_1.click_system_back_button(2)
|
||||||
|
|
||||||
chat_private_2.just_fyi("Check for that edited message is shown for Device 2 and delete message in public chat")
|
chat_private_2.just_fyi("Check for that edited message is shown for Device 2 and delete message in public chat")
|
||||||
[home.home_button.double_click() for home in (home_1, home_2)]
|
[home.home_button.double_click() for home in (home_1, home_2)]
|
||||||
public_chat_1, public_chat_2 = home_1.get_chat('#%s' %chat_name).click(), home_2.join_public_chat(chat_name)
|
public_chat_1, public_chat_2 = home_1.get_chat('#%s' %chat_name).click(), home_2.join_public_chat(chat_name)
|
||||||
|
@ -258,7 +258,7 @@ class TestUpgradeMultipleApplication(MultipleDeviceTestCase):
|
|||||||
home.upgrade_app()
|
home.upgrade_app()
|
||||||
home = device_1.sign_in()
|
home = device_1.sign_in()
|
||||||
|
|
||||||
device_1.just_fyi("**Check messages in 1-1 chat**")
|
device_1.just_fyi("Check messages in 1-1 chat")
|
||||||
command_username = 'Royal Defensive Solenodon'
|
command_username = 'Royal Defensive Solenodon'
|
||||||
messages = chat_data.chats[command_username]['messages']
|
messages = chat_data.chats[command_username]['messages']
|
||||||
home.swipe_up()
|
home.swipe_up()
|
||||||
|
@ -153,7 +153,7 @@ class BaseElement(object):
|
|||||||
self.driver.swipe(500, size["height"]*0.25, 500, size["height"]*0.8)
|
self.driver.swipe(500, size["height"]*0.25, 500, size["height"]*0.8)
|
||||||
else:
|
else:
|
||||||
raise NoSuchElementException(
|
raise NoSuchElementException(
|
||||||
"Device %s: %s by %s:* `%s` is not found on the screen" % (self.driver.number, self.name, self.by, self.locator)) from None
|
"Device %s: %s by %s: `%s` is not found on the screen" % (self.driver.number, self.name, self.by, self.locator)) from None
|
||||||
|
|
||||||
def scroll_and_click(self, direction='down'):
|
def scroll_and_click(self, direction='down'):
|
||||||
self.scroll_to_element(direction=direction)
|
self.scroll_to_element(direction=direction)
|
||||||
@ -171,6 +171,12 @@ class BaseElement(object):
|
|||||||
except TimeoutException:
|
except TimeoutException:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def is_element_disappeared(self, sec=20):
|
||||||
|
try:
|
||||||
|
return self.wait_for_invisibility_of_element(sec)
|
||||||
|
except TimeoutException:
|
||||||
|
return False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def text(self):
|
def text(self):
|
||||||
return self.find_element().text
|
return self.find_element().text
|
||||||
|
@ -751,8 +751,9 @@ class ChatView(BaseView):
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
def chat_element_by_text(self, text):
|
def chat_element_by_text(self, text):
|
||||||
self.driver.info("Looking for a message by text: %s" % text)
|
chat_element = ChatElementByText(self.driver, text)
|
||||||
return ChatElementByText(self.driver, text)
|
self.driver.info("Looking for a message by text: %s" % chat_element.exclude_emoji(text))
|
||||||
|
return chat_element
|
||||||
|
|
||||||
def verify_message_is_under_today_text(self, text, errors):
|
def verify_message_is_under_today_text(self, text, errors):
|
||||||
self.driver.info("Verifying that '%s' is under today" % text)
|
self.driver.info("Verifying that '%s' is under today" % text)
|
||||||
|
@ -175,10 +175,12 @@ class SignInView(BaseView):
|
|||||||
self.driver.info("## Creating new multiaccount (password:'%s', keycard:'%s')" % (password, str(keycard)), device=False)
|
self.driver.info("## Creating new multiaccount (password:'%s', keycard:'%s')" % (password, str(keycard)), device=False)
|
||||||
if not second_user:
|
if not second_user:
|
||||||
self.accept_tos_checkbox.click()
|
self.accept_tos_checkbox.click()
|
||||||
self.get_started_button.click()
|
self.get_started_button.click_until_presence_of_element(self.generate_key_button)
|
||||||
|
if not self.generate_key_button.is_element_displayed():
|
||||||
|
[button.click() for button in
|
||||||
|
[self.accept_tos_checkbox, self.get_started_button, self.generate_key_button]]
|
||||||
self.generate_key_button.click()
|
self.generate_key_button.click()
|
||||||
if not self.next_button.is_element_displayed():
|
|
||||||
[button.click() for button in [self.accept_tos_checkbox, self.get_started_button,self.generate_key_button]]
|
|
||||||
self.next_button.click_until_absense_of_element(self.element_by_translation_id("intro-wizard-title2"))
|
self.next_button.click_until_absense_of_element(self.element_by_translation_id("intro-wizard-title2"))
|
||||||
if keycard:
|
if keycard:
|
||||||
keycard_flow = self.keycard_storage_button.click()
|
keycard_flow = self.keycard_storage_button.click()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user