chore(@e2e): enable toast verification for accepting contact request

This commit is contained in:
Anastasiya Semenkevich 2024-10-30 10:41:09 +03:00 committed by Anastasiya
parent c5a046933e
commit f1ae8a2652
3 changed files with 10 additions and 11 deletions

View File

@ -1,3 +1,3 @@
import pytest import pytest
marks = pytest.mark.critical marks = pytest.mark.critical

View File

@ -11,7 +11,7 @@ from constants.images_paths import HEART_EMOJI_PATH, ANGRY_EMOJI_PATH, THUMBSUP_
LAUGHING_EMOJI_PATH, SAD_EMOJI_PATH LAUGHING_EMOJI_PATH, SAD_EMOJI_PATH
from constants.messaging import Messaging from constants.messaging import Messaging
from constants.wallet import WalletAddress from constants.wallet import WalletAddress
from gui.screens.messages import MessagesScreen, ToolBar from gui.screens.messages import MessagesScreen
import configs.testpath import configs.testpath
from constants import RandomUser, UserAccount from constants import RandomUser, UserAccount
@ -80,14 +80,13 @@ def test_1x1_chat_add_contact_in_settings(multiple_instances):
assert user_one.name == contacts_settings.contact_items[0].contact assert user_one.name == contacts_settings.contact_items[0].contact
assert len(contacts_settings.contact_items) == 1 assert len(contacts_settings.contact_items) == 1
# TODO https://github.com/status-im/desktop-qa-automation/issues/346 with step('Verify toast message about new contact request received'):
# with step('Verify toast message about new contact request received'): toast_messages = main_window.wait_for_notification()
# toast_messages = main_window.wait_for_notification() assert len(toast_messages) == 1, \
# assert len(toast_messages) == 1, \ f"Multiple toast messages appeared"
# f"Multiple toast messages appeared" message = toast_messages[0]
# message = toast_messages[0] assert message == Messaging.NEW_CONTACT_REQUEST.value, \
# assert message == Messaging.NEW_CONTACT_REQUEST.value, \ f"Toast message is incorrect, current message is {message}"
# f"Toast message is incorrect, current message is {message}"
with step(f'User {user_two.name}, accept contact request from {user_one.name}'): with step(f'User {user_two.name}, accept contact request from {user_one.name}'):
contacts_settings.accept_contact_request(user_one.name) contacts_settings.accept_contact_request(user_one.name)

View File

@ -2,7 +2,7 @@ import allure
import pytest import pytest
from allure_commons._allure import step from allure_commons._allure import step
from constants import UserAccount, RandomUser from constants import UserAccount
from scripts.utils.generators import random_password_string from scripts.utils.generators import random_password_string
from gui.components.change_password_popup import ChangePasswordPopup from gui.components.change_password_popup import ChangePasswordPopup
from tests.settings.settings_profile import marks from tests.settings.settings_profile import marks