Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(@e2e): create smoke run #17002

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions test/e2e/gui/screens/settings_messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(self):
self._pending_request_received_panel = QObject(
settings_names.settingsContentBaseScrollView_receivedRequests_ContactsListPanel)
self._contacts_panel = QObject(settings_names.settingsContentBaseScrollView_mutualContacts_ContactsListPanel)
self._invite_friends_button = QObject(settings_names.settingsContentBaseScrollView_Invite_friends_StatusButton)
self.invite_friends_button = QObject(settings_names.settingsContentBaseScrollView_Invite_friends_StatusButton)
self._no_friends_item = QObject(settings_names.settingsContentBaseScrollView_NoFriendsRectangle)
# more options on contact
self._verify_identity_item = QObject(settings_names.verify_Identity_StatusMenuItem)
Expand Down Expand Up @@ -156,11 +156,6 @@ def contacts_list_title(self) -> str:
def no_friends_item_text(self) -> str:
return self._no_friends_item.object.text

@property
@allure.step('Get state of invite friends button')
def is_invite_friends_button_visible(self) -> bool:
return self._invite_friends_button.is_visible

@allure.step('Open pending requests tab')
def open_pending_requests(self):
self._pending_request_tab.click()
Expand Down
1 change: 1 addition & 0 deletions test/e2e/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ addopts = --disable-warnings -p no:logging

markers =
critical: Critical checks for every PR
smoke: Tests that we use for release smoke checks
settings_all: All tests related to the settings
settings_keycard: Tests related to Keycard settings
settings_messaging: Tests related to messaging settings
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/tests/communities/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import pytest

marks = pytest.mark.communities
5 changes: 1 addition & 4 deletions test/e2e/tests/communities/test_communities_categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
from tests import test_data
from gui.components.context_menu import ContextMenu
from gui.main_window import MainWindow
from . import marks

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703272', 'Member role cannot add category')
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703273', 'Member role cannot edit category')
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703274', 'Member role cannot remove category')
@pytest.mark.case(703272, 703273, 703274)
@pytest.mark.communities
@pytest.mark.parametrize('user_data', [configs.testpath.TEST_USER_DATA / 'squisher'])
@pytest.mark.parametrize('user_account', [constants.user.user_account_one])
def test_member_role_cannot_add_edit_or_delete_category(main_screen: MainWindow):
Expand Down Expand Up @@ -53,7 +51,6 @@ def test_member_role_cannot_add_edit_or_delete_category(main_screen: MainWindow)
@pytest.mark.parametrize('category_name, general_checkbox',
[pytest.param('Category in general', True)])
def test_clicking_community_category(main_screen: MainWindow, category_name, general_checkbox):

enable_community_creation(main_screen)

with step('Create community and select it'):
Expand Down
4 changes: 1 addition & 3 deletions test/e2e/tests/communities/test_communities_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
from gui.screens.messages import MessagesScreen
from helpers.SettingsHelper import enable_community_creation
from scripts.utils.parsers import remove_tags
from . import marks

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703049', 'Create community channel')
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703050', 'Edit community channel')
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703051', 'Delete community channel')
@pytest.mark.case(703049, 703050, 703051)
@pytest.mark.communities
@pytest.mark.parametrize(
'channel_name, channel_description, channel_emoji, channel_emoji_image, channel_color, new_channel_name, '
'new_channel_description, new_channel_emoji',
Expand Down
5 changes: 1 addition & 4 deletions test/e2e/tests/communities/test_communities_kick_ban.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@
from gui.screens.messages import MessagesScreen
from helpers.SettingsHelper import enable_community_creation
from scripts.utils.generators import random_text_message
from . import marks

import configs.testpath
from gui.main_window import MainWindow

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703252', 'Kick user')
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703254', 'Edit chat - Delete any message')
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/736991', 'Owner can ban member')
@pytest.mark.case(703252, 703252, 736991)
@pytest.mark.communities
@pytest.mark.skip(reason='Not possible to get floating buttons on hover for list item')
def test_community_admin_ban_kick_member_and_delete_message(multiple_instances):
user_one: UserAccount = RandomUser()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@
from allure_commons._allure import step

import configs
import constants
import driver
from constants import permission_data_member, RandomCommunity
from constants.community import LimitWarnings
from gui.main_window import MainWindow
from helpers.SettingsHelper import enable_community_creation
from . import marks

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/739309',
'Can create up to 5 member role permissions')
@pytest.mark.case(739309)
@pytest.mark.communities
def test_add_5_member_role_permissions(main_screen: MainWindow):
enable_community_creation(main_screen)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@
from gui.main_window import MainWindow
from helpers.SettingsHelper import enable_community_creation
from scripts.utils.generators import random_text_message
from . import marks
import configs
from constants import ColorCodes, UserAccount, RandomUser, RandomCommunity
from gui.screens.community_settings import CommunitySettingsScreen
from gui.screens.messages import MessagesScreen

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703255',
'Edit chat - Add pinned message (when any member can pin is disabled)')
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703256',
'Edit chat - Remove pinned message (when any member can pin is disabled)')
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703510', 'Join community via owner invite')
@pytest.mark.case(703255, 703256, 703510)
@pytest.mark.case(703255, 703256, 703510, 738743, 738754, 738798, 738799)
@pytest.mark.communities
@pytest.mark.smoke
def test_join_community_and_pin_unpin_message(multiple_instances):
user_one: UserAccount = RandomUser()
user_two: UserAccount = RandomUser()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@

from constants import RandomCommunity
from helpers.SettingsHelper import enable_community_creation
from . import marks

from constants.community import AirdropsElements, TokensElements, PermissionsElements
from constants.images_paths import AIRDROPS_WELCOME_IMAGE_PATH, TOKENS_WELCOME_IMAGE_PATH, PERMISSION_WELCOME_IMAGE_PATH
from gui.main_window import MainWindow

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703198',
'Manage community: Manage Permissions screen overview')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@
from gui.main_window import MainWindow
from helpers.SettingsHelper import enable_community_creation
from scripts.utils.generators import random_text_message
from . import marks
import configs
from constants import UserAccount, RandomUser, RandomCommunity

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/736170',
"Add a contact from community's member list")
@pytest.mark.case(736170)
@pytest.mark.case(736170, 738776, 738777)
@pytest.mark.smoke
@pytest.mark.communities
def test_communities_send_accept_decline_request_remove_contact_from_profile(multiple_instances):
user_one: UserAccount = RandomUser()
user_two: UserAccount = RandomUser()
Expand Down Expand Up @@ -52,7 +51,8 @@ def test_communities_send_accept_decline_request_remove_contact_from_profile(mul
contact_request_popup.send(chat_key, f'Hello {user_two.name}')
main_screen.hide()

with step(f'User {user_two.name}, accept contact request from {user_one.name} and send contact request to {user_three.name} '):
with step(
f'User {user_two.name}, accept contact request from {user_one.name} and send contact request to {user_three.name} '):
aut_two.attach()
main_screen.prepare()
settings = main_screen.left_panel.open_settings()
Expand Down Expand Up @@ -133,14 +133,16 @@ def test_communities_send_accept_decline_request_remove_contact_from_profile(mul
assert driver.waitFor(lambda: not community_screen.left_panel.is_join_community_visible,
configs.timeouts.UI_LOAD_TIMEOUT_MSEC), 'Join community button not hidden'

with step(f'User {user_one.name} send contact request to {user_three.name} from user profile from members list'):
with step(
f'User {user_one.name} send contact request to {user_three.name} from user profile from members list'):
community_screen = main_screen.left_panel.select_community(community.name)
profile_popup = community_screen.right_panel.click_member(user_three.name)
profile_popup.send_request().send(f'Hello {user_three.name}')
ProfilePopupFromMembers().wait_until_appears()
main_screen.hide()

with step(f'User {user_three.name}, accept contact request from {user_one.name} from user profile from members list'):
with step(
f'User {user_three.name}, accept contact request from {user_one.name} from user profile from members list'):
aut_three.attach()
main_screen.prepare()
community_screen = main_screen.left_panel.select_community(community.name)
Expand Down
3 changes: 0 additions & 3 deletions test/e2e/tests/crtitical_tests_prs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
import pytest

marks = pytest.mark.critical
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,18 @@
import pytest
from allure import step

from constants import RandomUser
from constants.wallet import WalletNetworkSettings
from helpers.WalletHelper import authenticate_with_password
from . import marks

import constants
from driver.aut import AUT
from gui.components.signing_phrase_popup import SigningPhrasePopup
from gui.main_window import MainWindow

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/704459',
'User can add one more account after restarting the app')
@pytest.mark.case(704459)
@pytest.mark.case(704459, 738724, 738782, 738786)
@pytest.mark.parametrize('name, color, emoji, emoji_unicode,',
[
pytest.param('GenAcc1', '#2a4af5', 'sunglasses', '1f60e')
Expand All @@ -30,6 +26,7 @@
pytest.param('GenAcc2', '#2a4af5', 'sunglasses', '1f60e')
])
@pytest.mark.critical
@pytest.mark.smoke
def test_add_generated_account_restart_add_again(
aut: AUT, main_screen: MainWindow, user_account,
color: str, emoji: str, emoji_unicode: str, name: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@
import pytest
from allure_commons._allure import step

from constants import RandomUser
from helpers.WalletHelper import authenticate_with_password
from . import marks

import driver
from constants.wallet import WalletAccountSettings, DerivationPathValue
from gui.components.signing_phrase_popup import SigningPhrasePopup
from gui.main_window import MainWindow
from gui.screens.settings_wallet import WalletSettingsView

pytestmark = marks


@pytest.mark.critical
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/704454',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@
import pytest
from allure_commons._allure import step

from constants import RandomUser
from helpers.WalletHelper import authenticate_with_password
from scripts.utils.generators import random_wallet_acc_keypair_name

import constants
import driver
from gui.components.signing_phrase_popup import SigningPhrasePopup
from gui.main_window import MainWindow
from . import marks

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703033', 'Manage a generated account')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
import pytest
from allure_commons._allure import step

import constants
from constants import RandomCommunity
from gui.main_window import MainWindow
from helpers.SettingsHelper import enable_community_creation
from . import marks

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703226', 'Add category')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@
from scripts.utils.browser import get_response, get_page_content
from scripts.utils.generators import random_community_name, random_community_description, random_community_introduction, \
random_community_leave_message
from . import marks

import configs.testpath
from gui.main_window import MainWindow

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703057', 'Edit community')
@pytest.mark.case(703057)
@pytest.mark.case(703057, 738790, 738751)
@pytest.mark.critical
@pytest.mark.smoke
def test_create_edit_community(main_screen: MainWindow):
enable_community_creation(main_screen)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@
from allure_commons._allure import step

import configs
import constants
import driver
from constants import permission_data, RandomCommunity
from constants.community import ToastMessages, PermissionsElements
from gui.components.changes_detected_popup import PermissionsChangesDetectedToastMessage
from gui.components.delete_popup import DeletePermissionPopup
from gui.main_window import MainWindow
from gui.screens.community_settings import PermissionsIntroView
from helpers.SettingsHelper import enable_community_creation
from . import marks

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703632',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
from gui.main_window import MainWindow
from scripts.utils.generators import random_text_message
from scripts.utils.parsers import remove_tags
from . import marks

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703087', '1-1 Chat')
@pytest.mark.case(703087)
@pytest.mark.case(703087, 738732, 738734, 738742, 738744, 738745)
@pytest.mark.critical
@pytest.mark.smoke
def test_1x1_chat_add_contact_in_settings(multiple_instances):
user_one: UserAccount = RandomUser()
user_two: UserAccount = RandomUser()
Expand Down Expand Up @@ -260,4 +258,4 @@ def test_1x1_chat_add_contact_in_settings(multiple_instances):
main_window.prepare()
assert driver.waitFor(lambda: user_two.name in messages_screen.left_panel.get_chats_names,
timeout), f'{chat} is present in chats list'
main_window.hide()
main_window.hide()
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@
from gui.main_window import MainWindow
from gui.screens.messages import MessagesScreen, ToolBar
from scripts.utils.generators import random_text_message
from . import marks

pytestmark = marks


@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703014', 'Create a group and send messages')
@pytest.mark.case(703014)
@pytest.mark.case(703014, 738735, 738736, 738739, 738740)
@pytest.mark.timeout(timeout=315)
@pytest.mark.critical
@pytest.mark.smoke
@pytest.mark.parametrize('community_name, domain_link, domain_link_2',
[pytest.param('Status', 'status.app', 'github.com')
])
# TODO: add clearing chat history action
def test_group_chat_add_contact_in_ac(multiple_instances, community_name, domain_link, domain_link_2):
user_one: UserAccount = RandomUser()
user_two: UserAccount = RandomUser()
Expand Down Expand Up @@ -214,7 +213,9 @@ def test_group_chat_add_contact_in_ac(multiple_instances, community_name, domain
messages_screen.group_chat.type_message(message)

with step('Wait until link preview is ready'):
assert driver.waitFor(lambda: domain_link_2 == messages_screen.group_chat.get_link_preview_bubble_description(), configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
assert driver.waitFor(
lambda: domain_link_2 == messages_screen.group_chat.get_link_preview_bubble_description(),
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)

with step(f'Paste image to the same message'):
messages_screen.group_chat.choose_image(str(path))
Expand Down
Loading