chore: refactor community tests to use random community data
This commit is contained in:
parent
09524b925a
commit
f48eed2b28
|
@ -5,7 +5,11 @@ from dataclasses import dataclass, field
|
|||
from typing import Optional
|
||||
|
||||
import configs
|
||||
from scripts.utils.generators import random_name_string, random_password_string
|
||||
from constants import ColorCodes
|
||||
from scripts.tools.image import Image
|
||||
from scripts.utils.generators import random_name_string, random_password_string, random_community_name, \
|
||||
random_community_description, random_community_introduction, random_community_leave_message, random_community_tags, \
|
||||
random_color
|
||||
|
||||
|
||||
@dataclass
|
||||
|
@ -34,6 +38,42 @@ class ReturningUser(UserAccount):
|
|||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class CommunityChannel:
|
||||
name: str = None
|
||||
selected: bool = None
|
||||
visible: bool = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class CommunityData:
|
||||
name: str = None
|
||||
description: str = None
|
||||
members: str = None
|
||||
image: Image = None
|
||||
logo: dict = field(default_factory=dict)
|
||||
banner: dict = field(default_factory=dict)
|
||||
color: Optional[str] = None
|
||||
tags: list = field(default_factory=list)
|
||||
introduction: str = None
|
||||
leaving_message: str = None
|
||||
|
||||
|
||||
class RandomCommunity(CommunityData):
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
name=random_community_name(),
|
||||
description=random_community_description(),
|
||||
logo={'fp': configs.testpath.TEST_IMAGES / 'comm_logo.jpeg', 'zoom': None, 'shift': None},
|
||||
banner={'fp': configs.testpath.TEST_IMAGES / 'comm_banner.jpeg', 'zoom': None, 'shift': None},
|
||||
color=random_color(),
|
||||
tags=random_community_tags(),
|
||||
introduction=random_community_introduction(),
|
||||
leaving_message=random_community_leave_message()
|
||||
|
||||
)
|
||||
|
||||
|
||||
user_account_one = UserAccount('squisher', '0000000000', [
|
||||
'rail', 'witness', 'era', 'asthma', 'empty', 'cheap', 'shed', 'pond', 'skate', 'amount', 'invite', 'year'
|
||||
], '0x3286c371ef648fe6232324b27ee0515f4ded24d9')
|
||||
|
@ -41,21 +81,6 @@ user_account_two = UserAccount('athletic', '0000000000', [
|
|||
'measure', 'cube', 'cousin', 'debris', 'slam', 'ignore', 'seven', 'hat', 'satisfy', 'frown', 'casino', 'inflict'
|
||||
], '0x99C096bB5F12bDe37DE9dbee8257Ebe2a5667C46')
|
||||
|
||||
community_params = {
|
||||
'name': ''.join(random.choices(string.ascii_letters +
|
||||
string.digits, k=30)),
|
||||
'description': ''.join(random.choices(string.ascii_letters +
|
||||
string.digits, k=140)),
|
||||
'logo': {'fp': configs.testpath.TEST_IMAGES / 'comm_logo.jpeg', 'zoom': None, 'shift': None},
|
||||
'banner': {'fp': configs.testpath.TEST_IMAGES / 'comm_banner.jpeg', 'zoom': None, 'shift': None},
|
||||
'intro': ''.join(random.choices(string.ascii_letters +
|
||||
string.digits, k=200)),
|
||||
'outro': ''.join(random.choices(string.ascii_letters +
|
||||
string.digits, k=80))
|
||||
}
|
||||
|
||||
UserCommunityInfo = namedtuple('CommunityInfo', ['name', 'description', 'members', 'image'])
|
||||
UserChannel = namedtuple('Channel', ['name', 'selected', 'visible'])
|
||||
|
||||
account_list_item = namedtuple('AccountListItem', ['name', 'color', 'emoji'])
|
||||
wallet_account_list_item = namedtuple('WalletAccountListItem', ['name', 'icon_color', 'icon_emoji', 'object'])
|
||||
|
|
|
@ -6,6 +6,7 @@ import allure
|
|||
|
||||
import configs
|
||||
import driver
|
||||
from constants import RandomCommunity, CommunityData
|
||||
from gui.components.base_popup import BasePopup
|
||||
from gui.components.community.color_select_popup import ColorSelectPopup
|
||||
from gui.components.community.tags_select_popup import TagsSelectPopup
|
||||
|
@ -37,7 +38,7 @@ class CreateCommunityPopup(BasePopup):
|
|||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._scroll = Scroll(names.generalView_StatusScrollView )
|
||||
self._scroll = Scroll(names.generalView_StatusScrollView)
|
||||
self._name_text_edit = TextEdit(names.createCommunityNameInput_TextEdit)
|
||||
self._description_text_edit = TextEdit(names.createCommunityDescriptionInput_TextEdit)
|
||||
self._add_logo_button = Button(names.addButton_StatusRoundButton2)
|
||||
|
@ -95,40 +96,6 @@ class CreateCommunityPopup(BasePopup):
|
|||
self._scroll.vertical_scroll_down(self._description_text_edit)
|
||||
self._description_text_edit.text = value
|
||||
|
||||
@property
|
||||
@allure.step('Get community logo')
|
||||
def logo(self):
|
||||
return NotImplementedError
|
||||
|
||||
def _open_logo_file_dialog(self, attempt: int = 2):
|
||||
self._add_logo_button.click()
|
||||
try:
|
||||
return OpenFileDialog().wait_until_appears()
|
||||
except Exception as err:
|
||||
if attempt:
|
||||
LOG.debug(err)
|
||||
return self._open_logo_file_dialog(attempt - 1)
|
||||
else:
|
||||
raise err
|
||||
|
||||
@allure.step('Set community logo')
|
||||
def logo(self, kwargs: dict):
|
||||
self._open_logo_file_dialog().open_file(kwargs['fp'])
|
||||
PictureEditPopup().wait_until_appears().set_zoom_shift_for_picture(kwargs.get('zoom', None),
|
||||
kwargs.get('shift', None))
|
||||
|
||||
@property
|
||||
@allure.step('Get community banner')
|
||||
def banner(self):
|
||||
raise NotImplementedError
|
||||
|
||||
@allure.step('Set community banner')
|
||||
def banner(self, kwargs: dict):
|
||||
self._add_banner_button.click()
|
||||
OpenFileDialog().wait_until_appears().open_file(kwargs['fp'])
|
||||
PictureEditPopup().wait_until_appears().set_zoom_shift_for_picture(kwargs.get('zoom', None),
|
||||
kwargs.get('shift', None))
|
||||
|
||||
@allure.step('Set community logo without file upload dialog')
|
||||
def set_logo_without_file_upload_dialog(self, path):
|
||||
self._scroll.vertical_scroll_down(self._add_logo_button)
|
||||
|
@ -195,9 +162,9 @@ class CreateCommunityPopup(BasePopup):
|
|||
assert self.get_color() == color
|
||||
|
||||
@allure.step('Select tags and verify they were set correctly')
|
||||
def verify_tags(self, tags: typing.List[str]):
|
||||
def verify_tags(self, tags: typing.List[str]):
|
||||
actual_tags = self.get_tags()
|
||||
assert tags == actual_tags
|
||||
assert tags.sort(reverse=False) == actual_tags.sort(reverse=False)
|
||||
|
||||
@allure.step('Verify default values of checkboxes')
|
||||
def verify_checkboxes_values(self):
|
||||
|
@ -206,37 +173,21 @@ class CreateCommunityPopup(BasePopup):
|
|||
assert not self.is_pin_messages_checkbox_checked()
|
||||
|
||||
@allure.step('Verify community create popup fields and create community without file upload dialog usage')
|
||||
def create_community(self, name: str, description: str, intro: str, outro: str, logo, banner, color: str,
|
||||
tags_to_set: typing.List[str], tags):
|
||||
self.set_name(name)
|
||||
self.set_description(description)
|
||||
self.set_logo_without_file_upload_dialog(logo)
|
||||
def create_community(self, community_data: CommunityData):
|
||||
self.set_name(community_data.name)
|
||||
self.set_description(community_data.description)
|
||||
self.set_logo_without_file_upload_dialog(community_data.logo['fp'])
|
||||
PictureEditPopup().set_zoom_shift_for_picture(None, None)
|
||||
self.set_banner_without_file_upload_dialog(banner)
|
||||
self.set_banner_without_file_upload_dialog(community_data.banner['fp'])
|
||||
PictureEditPopup().set_zoom_shift_for_picture(None, None)
|
||||
self.set_color(color)
|
||||
self.verify_color(color)
|
||||
self.set_tags(tags_to_set)
|
||||
self.verify_tags(tags)
|
||||
self.set_color(community_data.color)
|
||||
self.verify_color(community_data.color)
|
||||
self.set_tags(community_data.tags)
|
||||
self.verify_tags(community_data.tags)
|
||||
self.verify_checkboxes_values()
|
||||
self._next_button.click()
|
||||
self.set_intro(intro)
|
||||
self.set_outro(outro)
|
||||
self._create_community_button.click()
|
||||
self.wait_until_hidden()
|
||||
return CommunityScreen().wait_until_appears()
|
||||
|
||||
@allure.step('Create simple community without verifications')
|
||||
def create_simple_community(self, name: str, description: str, intro: str, outro: str, logo, banner):
|
||||
self.set_name(name)
|
||||
self.set_description(description)
|
||||
self.set_logo_without_file_upload_dialog(logo)
|
||||
PictureEditPopup().set_zoom_shift_for_picture(None, None)
|
||||
self.set_banner_without_file_upload_dialog(banner)
|
||||
PictureEditPopup().set_zoom_shift_for_picture(None, None)
|
||||
self._next_button.click()
|
||||
self.set_intro(intro)
|
||||
self.set_outro(outro)
|
||||
self.set_intro(community_data.introduction)
|
||||
self.set_outro(community_data.leaving_message)
|
||||
self._create_community_button.click()
|
||||
self.wait_until_hidden()
|
||||
return CommunityScreen().wait_until_appears()
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import copy
|
||||
import time
|
||||
import typing
|
||||
|
||||
|
@ -29,22 +30,23 @@ class TagsSelectPopup(BasePopup):
|
|||
tags = []
|
||||
checked = []
|
||||
unchecked = []
|
||||
_values = copy.deepcopy(values)
|
||||
for obj in driver.findAllObjects(self._tag_template.real_name):
|
||||
name = str(obj.name)
|
||||
tags.append(name)
|
||||
if name in values:
|
||||
if name in _values:
|
||||
if not obj.removable:
|
||||
driver.mouseClick(obj)
|
||||
QObject(obj).click()
|
||||
checked.append(name)
|
||||
time.sleep(1)
|
||||
values.remove(name)
|
||||
_values.remove(name)
|
||||
else:
|
||||
# Selected and should be unselected
|
||||
if obj.removable:
|
||||
driver.mouseClick(obj)
|
||||
QObject(obj).click()
|
||||
time.sleep(1)
|
||||
unchecked.append(name)
|
||||
if values:
|
||||
if _values:
|
||||
raise LookupError(
|
||||
f'Tags: {values} not found in {tags}. Checked tags: {checked}, Unchecked tags: {unchecked}')
|
||||
f'Tags: {_values} not found in {tags}. Checked tags: {checked}, Unchecked tags: {unchecked}')
|
||||
self._confirm_button.click()
|
||||
|
|
|
@ -6,7 +6,7 @@ import allure
|
|||
|
||||
import configs
|
||||
import driver
|
||||
from constants import UserAccount, RandomUser, ColorCodes
|
||||
from constants import UserAccount, RandomUser, RandomCommunity, CommunityData
|
||||
from gui.components.community.invite_contacts import InviteContactsPopup
|
||||
from gui.components.onboarding.share_usage_data_popup import ShareUsageDataPopup
|
||||
from gui.components.context_menu import ContextMenu
|
||||
|
@ -174,7 +174,7 @@ class MainWindow(Window):
|
|||
return super().prepare()
|
||||
|
||||
@allure.step('Sign Up user')
|
||||
def sign_up(self, user_account: UserAccount = RandomUser()):
|
||||
def sign_up(self, user_account: UserAccount):
|
||||
BeforeStartedPopUp().get_started()
|
||||
welcome_screen = WelcomeToStatusView().wait_until_appears()
|
||||
profile_view = welcome_screen.get_keys().generate_new_keys()
|
||||
|
@ -213,11 +213,11 @@ class MainWindow(Window):
|
|||
return self.sign_up(user_account)
|
||||
|
||||
@allure.step('Create community')
|
||||
def create_community(self, name, description, intro, outro, logo, banner, tags_to_set, tags) -> CommunityScreen:
|
||||
def create_community(self, community_data: CommunityData) -> CommunityScreen:
|
||||
communities_portal = self.left_panel.open_communities_portal()
|
||||
create_community_form = communities_portal.open_create_community_popup()
|
||||
color = ColorCodes.ORANGE.value
|
||||
app_screen = create_community_form.create_community(name, description, intro, outro, logo, banner, color, tags_to_set, tags)
|
||||
assert isinstance(community_data, CommunityData)
|
||||
app_screen = create_community_form.create_community(community_data)
|
||||
return app_screen
|
||||
|
||||
@allure.step('Wait for notification and get text')
|
||||
|
|
|
@ -148,7 +148,7 @@ addButton_StatusRoundButton2 = {"container": communityLogoPicker_LogoPicker, "id
|
|||
communityColorPicker_ColorPicker = {"container": statusDesktop_mainWindow_overlay, "objectName": "communityColorPicker", "type": "ColorPicker", "visible": True}
|
||||
StatusPickerButton = {"checkable": False, "container": communityColorPicker_ColorPicker, "type": "StatusPickerButton", "unnamed": 1, "visible": True}
|
||||
communityTagsPicker_TagsPicker = {"container": statusDesktop_mainWindow_overlay, "objectName": "communityTagsPicker", "type": "TagsPicker", "visible": True}
|
||||
choose_tags_StatusPickerButton = {"checkable": False, "container": communityTagsPicker_TagsPicker, "type": "StatusPickerButton", "unnamed": 1, "visible": True}
|
||||
choose_tags_StatusPickerButton = {"checkable": False, "container": communityTagsPicker_TagsPicker, "id": "pickerButton", "type": "StatusPickerButton", "unnamed": 1, "visible": True}
|
||||
archiveSupportToggle_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "id": "archiveSupportToggle", "type": "StatusCheckBox", "unnamed": 1, "visible": True}
|
||||
requestToJoinToggle_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "id": "requestToJoinToggle", "type": "StatusCheckBox", "unnamed": 1, "visible": True}
|
||||
pinMessagesToggle_StatusCheckBox = {"checkable": True, "container": statusDesktop_mainWindow_overlay, "id": "pinMessagesToggle", "type": "StatusCheckBox", "unnamed": 1, "visible": True}
|
||||
|
|
|
@ -6,7 +6,7 @@ from allure_commons._allure import step
|
|||
|
||||
import configs
|
||||
import driver
|
||||
from constants import UserChannel, ColorCodes
|
||||
from constants import CommunityChannel
|
||||
from driver.objects_access import walk_children
|
||||
from gui.components.community.community_category_popup import NewCategoryPopup, EditCategoryPopup, CategoryPopup
|
||||
from gui.components.community.community_channel_popups import EditChannelPopup, NewChannelPopup
|
||||
|
@ -243,13 +243,13 @@ class LeftPanel(QObject):
|
|||
|
||||
@property
|
||||
@allure.step('Get channels')
|
||||
def channels(self) -> typing.List[UserChannel]:
|
||||
def channels(self) -> typing.List[CommunityChannel]:
|
||||
time.sleep(0.5)
|
||||
channels_list = []
|
||||
for obj in driver.findAllObjects(self.chatListItemDropAreaItem.real_name):
|
||||
container = driver.objectMap.realName(obj)
|
||||
self._channel_icon_template.real_name['container'] = container
|
||||
channels_list.append(UserChannel(
|
||||
channels_list.append(CommunityChannel(
|
||||
str(obj.objectName),
|
||||
obj.item.selected,
|
||||
obj.item.visible
|
||||
|
@ -267,7 +267,7 @@ class LeftPanel(QObject):
|
|||
return int(category.get_arrow_icon_rotation_value())
|
||||
|
||||
@allure.step('Get channel params')
|
||||
def get_channel_parameters(self, name) -> UserChannel:
|
||||
def get_channel_parameters(self, name) -> CommunityChannel:
|
||||
for channel in self.channels:
|
||||
if channel.name == name:
|
||||
return channel
|
||||
|
|
|
@ -509,11 +509,11 @@ class CreatePasswordView(OnboardingView):
|
|||
|
||||
@allure.step('Set password in first field')
|
||||
def set_password_in_first_field(self, value: str):
|
||||
self._new_password_text_field.clear().text = value
|
||||
self._new_password_text_field.text = value
|
||||
|
||||
@allure.step('Set password in confirmation field')
|
||||
def set_password_in_confirmation_field(self, value: str):
|
||||
self._confirm_password_text_field.clear().text = value
|
||||
self._confirm_password_text_field.text = value
|
||||
|
||||
@allure.step('Set password and open Confirmation password view')
|
||||
def create_password(self, value: str) -> 'ConfirmPasswordView':
|
||||
|
|
|
@ -6,7 +6,7 @@ import allure
|
|||
|
||||
import configs.timeouts
|
||||
import driver
|
||||
from constants import UserCommunityInfo
|
||||
from constants import CommunityData
|
||||
from driver import objects_access
|
||||
from gui.elements.button import Button
|
||||
from gui.elements.object import QObject
|
||||
|
@ -29,7 +29,7 @@ class CommunitiesSettingsView(QObject):
|
|||
|
||||
@property
|
||||
@allure.step('Get communities')
|
||||
def communities(self) -> typing.List[UserCommunityInfo]:
|
||||
def communities(self) -> typing.List[CommunityData]:
|
||||
time.sleep(0.5)
|
||||
_communities = []
|
||||
for obj in driver.findAllObjects(self._community_item.real_name):
|
||||
|
@ -47,7 +47,7 @@ class CommunitiesSettingsView(QObject):
|
|||
members = str(name_members_labels[1].text)
|
||||
image = self._community_template_image.image
|
||||
|
||||
_communities.append(UserCommunityInfo(name, description, members, image))
|
||||
_communities.append(CommunityData(name, description, members, image))
|
||||
return _communities
|
||||
|
||||
def _get_community_item(self, name: str):
|
||||
|
@ -59,7 +59,7 @@ class CommunitiesSettingsView(QObject):
|
|||
|
||||
@allure.step('Open community info')
|
||||
def get_community_info(
|
||||
self, name: str, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC) -> UserCommunityInfo:
|
||||
self, name: str, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC) -> CommunityData:
|
||||
started_at = time.monotonic()
|
||||
while True:
|
||||
communities = self.communities
|
||||
|
|
|
@ -4,6 +4,8 @@ from zpywallet import HDWallet
|
|||
from zpywallet.network import EthereumMainNet
|
||||
from eth_account.hdaccount import generate_mnemonic, Mnemonic
|
||||
|
||||
from constants import user
|
||||
|
||||
|
||||
def random_name_string():
|
||||
return ''.join((random.choice(
|
||||
|
@ -24,6 +26,37 @@ def random_ens_string():
|
|||
random.choices(string.digits + string.ascii_lowercase, k=8))
|
||||
|
||||
|
||||
def random_community_name():
|
||||
return ''.join(random.choices(string.ascii_letters +
|
||||
string.digits, k=30))
|
||||
|
||||
|
||||
def random_community_description():
|
||||
return ''.join(random.choices(string.ascii_letters +
|
||||
string.digits, k=140))
|
||||
|
||||
|
||||
def random_community_introduction():
|
||||
return ''.join(random.choices(string.ascii_letters +
|
||||
string.digits, k=200))
|
||||
|
||||
|
||||
def random_community_leave_message():
|
||||
return ''.join(random.choices(string.ascii_letters +
|
||||
string.digits, k=80))
|
||||
|
||||
|
||||
def random_community_tags():
|
||||
num_tags = random.randint(1, 3)
|
||||
return random.sample(user.community_tags, num_tags)
|
||||
|
||||
|
||||
def random_color():
|
||||
random_number = random.randint(0, 0xFFFFFF)
|
||||
hex_color = f'#{random_number:06x}'
|
||||
return hex_color
|
||||
|
||||
|
||||
def random_mnemonic():
|
||||
words = ''
|
||||
while not Mnemonic().is_mnemonic_valid(mnemonic=words):
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
import time
|
||||
from copy import deepcopy
|
||||
from datetime import datetime
|
||||
|
||||
import allure
|
||||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
||||
import driver
|
||||
from constants import ColorCodes, UserAccount, RandomUser
|
||||
from constants import UserAccount, RandomUser, RandomCommunity, CommunityData
|
||||
from constants.community_settings import ToastMessages
|
||||
from gui.screens.community import Members
|
||||
from gui.screens.messages import MessagesScreen
|
||||
from . import marks
|
||||
|
||||
import configs.testpath
|
||||
import constants
|
||||
from gui.main_window import MainWindow
|
||||
|
||||
pytestmark = marks
|
||||
|
@ -22,8 +19,7 @@ pytestmark = marks
|
|||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703630', 'Create community')
|
||||
@pytest.mark.case(703630)
|
||||
@pytest.mark.parametrize('params', [constants.community_params])
|
||||
def test_create_community(user_account, main_screen: MainWindow, params):
|
||||
def test_create_community(user_account, main_screen: MainWindow):
|
||||
with step('Enable creation of community option'):
|
||||
settings = main_screen.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
|
@ -33,17 +29,12 @@ def test_create_community(user_account, main_screen: MainWindow, params):
|
|||
create_community_form = communities_portal.open_create_community_popup()
|
||||
|
||||
with step('Verify fields of create community popup and create community'):
|
||||
color = ColorCodes.ORANGE.value
|
||||
community_screen = create_community_form.create_community(params['name'], params['description'],
|
||||
params['intro'], params['outro'],
|
||||
params['logo']['fp'], params['banner']['fp'], color,
|
||||
['Activism', 'Art'], constants.community_tags[:2])
|
||||
community = RandomCommunity()
|
||||
community_screen = create_community_form.create_community(community_data=community)
|
||||
|
||||
with step('Verify community parameters in community overview'):
|
||||
with step('Name is correct'):
|
||||
assert community_screen.left_panel.name == params['name']
|
||||
with step('Members count is correct'):
|
||||
assert '1' in community_screen.left_panel.members
|
||||
assert community_screen.left_panel.name == community.name
|
||||
assert '1' in community_screen.left_panel.members
|
||||
|
||||
with step('Verify General channel is present for recently created community'):
|
||||
community_screen.verify_channel(
|
||||
|
@ -55,20 +46,17 @@ def test_create_community(user_account, main_screen: MainWindow, params):
|
|||
with step('Verify community parameters in community settings view'):
|
||||
community_setting = community_screen.left_panel.open_community_settings()
|
||||
overview_setting = community_setting.left_panel.open_overview()
|
||||
with step('Name is correct'):
|
||||
assert overview_setting.name == params['name']
|
||||
with step('Description is correct'):
|
||||
assert overview_setting.description == params['description']
|
||||
with step('Members count is correct'):
|
||||
members_settings = community_setting.left_panel.open_members()
|
||||
assert user_account.name in members_settings.members
|
||||
assert overview_setting.name == community.name
|
||||
assert overview_setting.description == community.description
|
||||
members_settings = community_setting.left_panel.open_members()
|
||||
assert user_account.name in members_settings.members
|
||||
|
||||
with step('Verify community parameters in community settings screen'):
|
||||
settings_screen = main_screen.left_panel.open_settings()
|
||||
community_settings = settings_screen.left_panel.open_communities_settings()
|
||||
community = community_settings.get_community_info(params['name'])
|
||||
assert community.name == params['name']
|
||||
assert community.description == params['description']
|
||||
community = community_settings.get_community_info(community.name)
|
||||
assert community.name == community.name
|
||||
assert community.description == community.description
|
||||
assert '1' in community.members
|
||||
|
||||
|
||||
|
@ -81,8 +69,7 @@ def test_community_admin_ban_kick_member_and_delete_message(multiple_instances):
|
|||
user_one: UserAccount = RandomUser()
|
||||
user_two: UserAccount = RandomUser()
|
||||
timeout = configs.timeouts.UI_LOAD_TIMEOUT_MSEC
|
||||
community_params = deepcopy(constants.community_params)
|
||||
community_params['name'] = f'{datetime.now():%d%m%Y_%H%M%S}'
|
||||
community: CommunityData = RandomCommunity()
|
||||
main_screen = MainWindow()
|
||||
|
||||
with multiple_instances(user_data=None) as aut_one, multiple_instances(user_data=None) as aut_two:
|
||||
|
@ -123,10 +110,9 @@ def test_community_admin_ban_kick_member_and_delete_message(multiple_instances):
|
|||
settings = main_screen.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
|
||||
community = main_screen.create_community(community_params['name'], community_params['description'],
|
||||
community_params['intro'], community_params['outro'],
|
||||
community_params['logo']['fp'], community_params['banner']['fp'])
|
||||
community.left_panel.invite_people_to_community([user_one.name], 'Message')
|
||||
main_screen.create_community(community_data=community)
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
community_screen.left_panel.invite_people_to_community([user_one.name], 'Message')
|
||||
main_screen.hide()
|
||||
|
||||
with step(f'User {user_one.name}, accept invitation from {user_two.name}'):
|
||||
|
@ -136,12 +122,12 @@ def test_community_admin_ban_kick_member_and_delete_message(multiple_instances):
|
|||
assert driver.waitFor(lambda: user_two.name in messages_view.left_panel.get_chats_names,
|
||||
10000)
|
||||
chat = messages_view.left_panel.click_chat_by_name(user_two.name)
|
||||
community_screen = chat.accept_community_invite(community_params['name'], 0)
|
||||
community_screen = chat.accept_community_invite(community.name, 0)
|
||||
|
||||
with step(f'User {user_one.name}, verify welcome community popup'):
|
||||
welcome_popup = community_screen.left_panel.open_welcome_community_popup()
|
||||
assert community_params['name'] in welcome_popup.title
|
||||
assert community_params['intro'] == welcome_popup.intro
|
||||
assert community.name in welcome_popup.title
|
||||
assert community.introduction == welcome_popup.intro
|
||||
welcome_popup.join().authenticate(user_one.password)
|
||||
assert driver.waitFor(lambda: not community_screen.left_panel.is_join_community_visible,
|
||||
10000), 'Join community button not hidden'
|
||||
|
@ -153,7 +139,7 @@ def test_community_admin_ban_kick_member_and_delete_message(multiple_instances):
|
|||
with step(f'User {user_two.name}, delete member message of {user_one.name} and verify it was deleted'):
|
||||
aut_two.attach()
|
||||
main_screen.prepare()
|
||||
community_screen = main_screen.left_panel.select_community(community_params['name'])
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
messages_screen = MessagesScreen()
|
||||
message = messages_screen.chat.find_message_by_text(message_text, '0')
|
||||
message.hover_message().delete_message()
|
||||
|
@ -178,7 +164,7 @@ def test_community_admin_ban_kick_member_and_delete_message(multiple_instances):
|
|||
assert len(toast_messages) == 1, \
|
||||
f"Multiple toast messages appeared"
|
||||
message = toast_messages[0]
|
||||
assert message == user_one.name + ToastMessages.BANNED_USER_TOAST.value + community_params['name'], \
|
||||
assert message == user_one.name + ToastMessages.BANNED_USER_TOAST.value + community.name, \
|
||||
f"Toast message is incorrect, current message is {message}"
|
||||
|
||||
with step(f'User {user_two.name}, does not see {user_one.name} in members list'):
|
||||
|
@ -195,7 +181,7 @@ def test_community_admin_ban_kick_member_and_delete_message(multiple_instances):
|
|||
|
||||
with step('Check toast message about unbanned member'):
|
||||
toast_messages = main_screen.wait_for_notification()
|
||||
toast_message = user_one.name + ToastMessages.UNBANNED_USER_TOAST.value + community_params['name']
|
||||
toast_message = user_one.name + ToastMessages.UNBANNED_USER_TOAST.value + community.name
|
||||
assert driver.waitFor(lambda: toast_message in toast_messages, timeout), \
|
||||
f"Toast message is incorrect, current message {toast_message} is not in {toast_messages}"
|
||||
main_screen.hide()
|
||||
|
@ -203,7 +189,7 @@ def test_community_admin_ban_kick_member_and_delete_message(multiple_instances):
|
|||
with step(f'User {user_one.name} join community again {user_two.name}'):
|
||||
aut_one.attach()
|
||||
main_screen.prepare()
|
||||
community_screen = chat.accept_community_invite(community_params['name'], 0)
|
||||
community_screen = chat.accept_community_invite(community.name, 0)
|
||||
welcome_popup = community_screen.left_panel.open_welcome_community_popup()
|
||||
welcome_popup.join().authenticate(user_one.password)
|
||||
assert driver.waitFor(lambda: not community_screen.left_panel.is_join_community_visible,
|
||||
|
@ -221,7 +207,7 @@ def test_community_admin_ban_kick_member_and_delete_message(multiple_instances):
|
|||
assert len(toast_messages) == 1, \
|
||||
f"Multiple toast messages appeared"
|
||||
message = toast_messages[0]
|
||||
assert message == user_one.name + ToastMessages.KICKED_USER_TOAST.value + community_params['name'], \
|
||||
assert message == user_one.name + ToastMessages.KICKED_USER_TOAST.value + community.name, \
|
||||
f"Toast message is incorrect, current message is {message}"
|
||||
|
||||
with step(f'User {user_two.name}, does not see {user_one.name} in members list'):
|
||||
|
@ -231,4 +217,4 @@ def test_community_admin_ban_kick_member_and_delete_message(multiple_instances):
|
|||
with step(f'User {user_one.name} is not in the community anymore'):
|
||||
aut_one.attach()
|
||||
main_screen.prepare()
|
||||
assert driver.waitFor(lambda: community_params['name'] not in main_screen.left_panel.communities, timeout)
|
||||
assert driver.waitFor(lambda: community.name not in main_screen.left_panel.communities, timeout)
|
||||
|
|
|
@ -4,6 +4,8 @@ import configs
|
|||
import constants
|
||||
|
||||
from allure_commons._allure import step
|
||||
|
||||
from constants import RandomCommunity
|
||||
from tests import test_data
|
||||
from gui.components.context_menu import ContextMenu
|
||||
from gui.main_window import MainWindow
|
||||
|
@ -55,13 +57,9 @@ def test_clicking_community_category(main_screen: MainWindow, category_name, gen
|
|||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
|
||||
with step('Create community and select it'):
|
||||
community_params = constants.community_params
|
||||
main_screen.create_community(community_params['name'], community_params['description'],
|
||||
community_params['intro'], community_params['outro'],
|
||||
community_params['logo']['fp'],
|
||||
community_params['banner']['fp'],
|
||||
['Activism', 'Art'], constants.community_tags[:2])
|
||||
community_screen = main_screen.left_panel.select_community(community_params['name'])
|
||||
community = RandomCommunity()
|
||||
main_screen.create_community(community_data=community)
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
|
||||
with step('Create community category and verify that it displays correctly'):
|
||||
community_screen.create_category(category_name, general_checkbox)
|
||||
|
|
|
@ -8,7 +8,7 @@ from allure_commons._allure import step
|
|||
import configs
|
||||
import constants
|
||||
import driver
|
||||
from constants import UserAccount
|
||||
from constants import UserAccount, RandomCommunity
|
||||
from gui.components.context_menu import ContextMenu
|
||||
from gui.main_window import MainWindow
|
||||
from gui.screens.messages import MessagesScreen
|
||||
|
@ -34,13 +34,10 @@ def test_create_edit_remove_community_channel(main_screen, channel_name, channel
|
|||
settings = main_screen.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
|
||||
with step('Create simple community'):
|
||||
community_params = constants.community_params
|
||||
main_screen.create_community(community_params['name'], community_params['description'],
|
||||
community_params['intro'], community_params['outro'],
|
||||
community_params['logo']['fp'], community_params['banner']['fp'],
|
||||
['Activism', 'Art'], constants.community_tags[:2])
|
||||
community_screen = main_screen.left_panel.select_community(community_params['name'])
|
||||
with step('Create community and select it'):
|
||||
community = RandomCommunity()
|
||||
main_screen.create_community(community_data=community)
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
|
||||
with step('Verify General channel is present for recently created community'):
|
||||
community_screen.verify_channel(
|
||||
|
|
|
@ -5,7 +5,7 @@ from allure_commons._allure import step
|
|||
import configs
|
||||
import constants
|
||||
import driver
|
||||
from constants import permission_data_member
|
||||
from constants import permission_data_member, RandomCommunity
|
||||
from constants.community_settings import LimitWarnings
|
||||
from gui.main_window import MainWindow
|
||||
from . import marks
|
||||
|
@ -16,25 +16,22 @@ 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.parametrize('params', [constants.community_params])
|
||||
def test_add_5_member_role_permissions(main_screen: MainWindow, params):
|
||||
|
||||
permission_data = permission_data_member
|
||||
def test_add_5_member_role_permissions(main_screen: MainWindow):
|
||||
with step('Enable creation of community option'):
|
||||
settings = main_screen.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
|
||||
main_screen.create_community(params['name'], params['description'],
|
||||
params['intro'], params['outro'],
|
||||
params['logo']['fp'], params['banner']['fp'],
|
||||
['Activism', 'Art'], constants.community_tags[:2])
|
||||
with step('Create community and select it'):
|
||||
community = RandomCommunity()
|
||||
main_screen.create_community(community_data=community)
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
|
||||
with step('Open add new permission page'):
|
||||
community_screen = main_screen.left_panel.select_community(params['name'])
|
||||
community_setting = community_screen.left_panel.open_community_settings()
|
||||
permissions_intro_view = community_setting.left_panel.open_permissions()
|
||||
|
||||
with step('Create new permission'):
|
||||
permission_data = permission_data_member
|
||||
for index, item in enumerate(permission_data):
|
||||
permissions_settings = permissions_intro_view.add_new_permission()
|
||||
permissions_settings.set_who_holds_checkbox_state(permission_data[index]['checkbox_state'])
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import time
|
||||
from copy import deepcopy
|
||||
from datetime import datetime
|
||||
|
||||
import allure
|
||||
import pytest
|
||||
|
@ -11,8 +9,7 @@ from gui.components.community.pinned_messages_popup import PinnedMessagesPopup
|
|||
from gui.main_window import MainWindow
|
||||
from . import marks
|
||||
import configs
|
||||
import constants
|
||||
from constants import ColorCodes, UserAccount, RandomUser
|
||||
from constants import ColorCodes, UserAccount, RandomUser, RandomCommunity
|
||||
from gui.screens.community_settings import CommunitySettingsScreen
|
||||
from gui.screens.messages import MessagesScreen
|
||||
|
||||
|
@ -28,8 +25,6 @@ pytestmark = marks
|
|||
def test_join_community_and_pin_unpin_message(multiple_instances):
|
||||
user_one: UserAccount = RandomUser()
|
||||
user_two: UserAccount = RandomUser()
|
||||
community_params = deepcopy(constants.community_params)
|
||||
community_params['name'] = f'{datetime.now():%d%m%Y_%H%M%S}'
|
||||
main_screen = MainWindow()
|
||||
|
||||
with multiple_instances() as aut_one, multiple_instances() as aut_two:
|
||||
|
@ -70,11 +65,12 @@ def test_join_community_and_pin_unpin_message(multiple_instances):
|
|||
with step('Enable creation of community option'):
|
||||
settings = main_screen.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
community = main_screen.create_community(community_params['name'], community_params['description'],
|
||||
community_params['intro'], community_params['outro'],
|
||||
community_params['logo']['fp'], community_params['banner']['fp'],
|
||||
['Activism', 'Art'], constants.community_tags[:2])
|
||||
community.left_panel.invite_people_to_community([user_one.name], 'Message')
|
||||
|
||||
with step('Create community and select it'):
|
||||
community = RandomCommunity()
|
||||
main_screen.create_community(community_data=community)
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
community_screen.left_panel.invite_people_to_community([user_one.name], 'Message')
|
||||
main_screen.hide()
|
||||
|
||||
with step(f'User {user_one.name}, accept invitation from {user_two.name}'):
|
||||
|
@ -82,12 +78,12 @@ def test_join_community_and_pin_unpin_message(multiple_instances):
|
|||
main_screen.prepare()
|
||||
messages_view = main_screen.left_panel.open_messages_screen()
|
||||
chat = messages_view.left_panel.click_chat_by_name(user_two.name)
|
||||
community_screen = chat.accept_community_invite(community_params['name'], 0)
|
||||
chat.accept_community_invite(community.name, 0)
|
||||
|
||||
with step(f'User {user_one.name}, verify welcome community popup'):
|
||||
welcome_popup = community_screen.left_panel.open_welcome_community_popup()
|
||||
assert community_params['name'] in welcome_popup.title
|
||||
assert community_params['intro'] == welcome_popup.intro
|
||||
assert community.name in welcome_popup.title
|
||||
assert community.introduction == welcome_popup.intro
|
||||
welcome_popup.join().authenticate(user_one.password)
|
||||
assert driver.waitFor(lambda: not community_screen.left_panel.is_join_community_visible,
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC), 'Join community button not hidden'
|
||||
|
@ -104,7 +100,7 @@ def test_join_community_and_pin_unpin_message(multiple_instances):
|
|||
assert '2' in community_screen.left_panel.members
|
||||
|
||||
with step(f'Go to edit community for {user_two.name} and check that pin message checkbox is not checked'):
|
||||
community_screen = main_screen.left_panel.select_community(community_params['name'])
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
community_setting = community_screen.left_panel.open_community_settings()
|
||||
edit_community_form = community_setting.left_panel.open_overview().open_edit_community_view()
|
||||
assert not edit_community_form.pin_message_checkbox_state
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import allure
|
||||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
||||
from constants import RandomCommunity
|
||||
from . import marks
|
||||
|
||||
import constants
|
||||
from constants.community_settings 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
|
||||
|
@ -18,19 +19,17 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703200',
|
||||
'Manage community: Manage Airdrops screen overview')
|
||||
@pytest.mark.case(703198, 703199, 703200)
|
||||
@pytest.mark.parametrize('params', [constants.community_params])
|
||||
def test_manage_community_screens_overview(main_screen: MainWindow, params):
|
||||
def test_manage_community_screens_overview(main_screen: MainWindow):
|
||||
with step('Enable creation of community option'):
|
||||
settings = main_screen.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
with step('Create community'):
|
||||
main_screen.create_community(params['name'], params['description'],
|
||||
params['intro'], params['outro'],
|
||||
params['logo']['fp'], params['banner']['fp'],
|
||||
['Activism', 'Art'], constants.community_tags[:2])
|
||||
|
||||
with step('Create community and select it'):
|
||||
community = RandomCommunity()
|
||||
main_screen.create_community(community_data=community)
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
|
||||
with step('Open airdrops view from community settings'):
|
||||
community_screen = main_screen.left_panel.select_community(params['name'])
|
||||
community_setting = community_screen.left_panel.open_community_settings()
|
||||
airdrops_screen = community_setting.left_panel.open_airdrops()
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
from copy import deepcopy
|
||||
from datetime import datetime
|
||||
|
||||
import allure
|
||||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
@ -11,8 +8,7 @@ from gui.components.remove_contact_popup import RemoveContactPopup
|
|||
from gui.main_window import MainWindow
|
||||
from . import marks
|
||||
import configs
|
||||
import constants
|
||||
from constants import UserAccount, RandomUser
|
||||
from constants import UserAccount, RandomUser, RandomCommunity
|
||||
|
||||
pytestmark = marks
|
||||
|
||||
|
@ -26,8 +22,6 @@ def test_communities_send_accept_decline_request_remove_contact_from_profile(mul
|
|||
user_three: UserAccount = RandomUser()
|
||||
timeout = configs.timeouts.UI_LOAD_TIMEOUT_MSEC
|
||||
main_screen = MainWindow()
|
||||
community_params = deepcopy(constants.community_params)
|
||||
community_params['name'] = f'{datetime.now():%d%m%Y_%H%M%S}'
|
||||
|
||||
with multiple_instances(user_data=None) as aut_one, multiple_instances(
|
||||
user_data=None) as aut_two, multiple_instances(user_data=None) as aut_three:
|
||||
|
@ -96,14 +90,16 @@ def test_communities_send_accept_decline_request_remove_contact_from_profile(mul
|
|||
aut_two.attach()
|
||||
main_screen.prepare()
|
||||
with step('Enable creation of community option'):
|
||||
settings = main_screen.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
|
||||
community = main_screen.create_community(community_params['name'], community_params['description'],
|
||||
community_params['intro'], community_params['outro'],
|
||||
community_params['logo']['fp'], community_params['banner']['fp'],
|
||||
['Activism', 'Art'], constants.community_tags[:2])
|
||||
community.left_panel.invite_people_to_community([user_one.name], 'Message')
|
||||
community.left_panel.invite_people_to_community([user_three.name], 'Message')
|
||||
with step('Create community and select it'):
|
||||
community = RandomCommunity()
|
||||
main_screen.create_community(community_data=community)
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
|
||||
community_screen.left_panel.invite_people_to_community([user_one.name], 'Message')
|
||||
community_screen.left_panel.invite_people_to_community([user_three.name], 'Message')
|
||||
main_screen.hide()
|
||||
|
||||
with step(f'User {user_three.name}, accept invitation from {user_two.name}'):
|
||||
|
@ -111,12 +107,12 @@ def test_communities_send_accept_decline_request_remove_contact_from_profile(mul
|
|||
main_screen.prepare()
|
||||
messages_view = main_screen.left_panel.open_messages_screen()
|
||||
chat = messages_view.left_panel.click_chat_by_name(user_two.name)
|
||||
community_screen = chat.accept_community_invite(community_params['name'], 0)
|
||||
community_screen = chat.accept_community_invite(community.name, 0)
|
||||
|
||||
with step(f'User {user_three.name}, verify welcome community popup'):
|
||||
welcome_popup = community_screen.left_panel.open_welcome_community_popup()
|
||||
assert community_params['name'] in welcome_popup.title
|
||||
assert community_params['intro'] == welcome_popup.intro
|
||||
assert community.name in welcome_popup.title
|
||||
assert community.introduction == welcome_popup.intro
|
||||
welcome_popup.join().authenticate(user_three.password)
|
||||
assert driver.waitFor(lambda: not community_screen.left_panel.is_join_community_visible,
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC), 'Join community button not hidden'
|
||||
|
@ -127,18 +123,18 @@ def test_communities_send_accept_decline_request_remove_contact_from_profile(mul
|
|||
main_screen.prepare()
|
||||
messages_view = main_screen.left_panel.open_messages_screen()
|
||||
chat = messages_view.left_panel.click_chat_by_name(user_two.name)
|
||||
community_screen = chat.accept_community_invite(community_params['name'], 0)
|
||||
community_screen = chat.accept_community_invite(community.name, 0)
|
||||
|
||||
with step(f'User {user_one.name}, verify welcome community popup'):
|
||||
welcome_popup = community_screen.left_panel.open_welcome_community_popup()
|
||||
assert community_params['name'] in welcome_popup.title
|
||||
assert community_params['intro'] == welcome_popup.intro
|
||||
assert community.name in welcome_popup.title
|
||||
assert community.introduction == welcome_popup.intro
|
||||
welcome_popup.join().authenticate(user_one.password)
|
||||
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'):
|
||||
community_screen = main_screen.left_panel.select_community(community_params['name'])
|
||||
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()
|
||||
|
@ -147,7 +143,7 @@ def test_communities_send_accept_decline_request_remove_contact_from_profile(mul
|
|||
with step(f'User {user_three.name}, accept contact request from {user_one.name} from user profile'):
|
||||
aut_three.attach()
|
||||
main_screen.prepare()
|
||||
community_screen = main_screen.left_panel.select_community(community_params['name'])
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
profile_popup = community_screen.right_panel.click_member(user_one.name)
|
||||
profile_popup.review_contact_request().accept()
|
||||
main_screen.hide()
|
||||
|
|
|
@ -3,6 +3,7 @@ import pytest
|
|||
from allure_commons._allure import step
|
||||
|
||||
import constants
|
||||
from constants import RandomCommunity
|
||||
from gui.main_window import MainWindow
|
||||
from scripts.utils.browser import get_response, get_page_content
|
||||
from . import marks
|
||||
|
@ -16,15 +17,15 @@ def test_share_community_link(main_screen: MainWindow):
|
|||
with step('Enable creation of community option'):
|
||||
settings = main_screen.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
|
||||
with step('Create community and select it'):
|
||||
community_params = constants.community_params
|
||||
main_screen.create_community(community_params['name'], community_params['description'],
|
||||
community_params['intro'], community_params['outro'],
|
||||
community_params['logo']['fp'], community_params['banner']['fp'],
|
||||
['Activism', 'Art'], constants.community_tags[:2])
|
||||
community = RandomCommunity()
|
||||
main_screen.create_community(community_data=community)
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
|
||||
with step('Copy community link and verify that it does not give 404 error'):
|
||||
community_link = main_screen.left_panel.open_community_context_menu(
|
||||
community_params['name']).select_invite_people().copy_community_link()
|
||||
community.name).select_invite_people().copy_community_link()
|
||||
assert get_response(community_link).status_code != 404
|
||||
|
||||
# TODO: fix html parsing
|
||||
|
@ -32,5 +33,5 @@ def test_share_community_link(main_screen: MainWindow):
|
|||
# web_content = get_page_content(community_link)
|
||||
# community_title = web_content.findAll(attrs={"name": "title"})[0].attrs['content']
|
||||
# community_description = web_content.findAll(attrs={"name": "description"})[0].attrs['content']
|
||||
# assert community_params['name'] in community_title
|
||||
# assert community_params['description'] == community_description
|
||||
# assert community.name in community_title
|
||||
# assert community.description == community_description
|
||||
|
|
|
@ -19,7 +19,6 @@ 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.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize('name, color, emoji, emoji_unicode,',
|
||||
[
|
||||
pytest.param('GenAcc1', '#2a4af5', 'sunglasses', '1f60e')
|
||||
|
|
|
@ -22,7 +22,6 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/704454',
|
||||
'Account view interactions: Delete generated account')
|
||||
@pytest.mark.case(704454)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize('account_name, color, emoji, emoji_unicode',
|
||||
[
|
||||
pytest.param(''.join(random.choices(string.ascii_letters +
|
||||
|
|
|
@ -19,7 +19,6 @@ pytestmark = marks
|
|||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703033', 'Manage a generated account')
|
||||
@pytest.mark.case(703033)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize('color, emoji, emoji_unicode, '
|
||||
'new_color, new_emoji, new_emoji_unicode', [
|
||||
pytest.param('#2a4af5', 'sunglasses', '1f60e',
|
||||
|
|
|
@ -3,6 +3,7 @@ import pytest
|
|||
from allure_commons._allure import step
|
||||
|
||||
import constants
|
||||
from constants import RandomCommunity
|
||||
from gui.main_window import MainWindow
|
||||
from . import marks
|
||||
|
||||
|
@ -27,13 +28,11 @@ def test_create_edit_remove_community_category(main_screen: MainWindow, category
|
|||
with step('Enable creation of community option'):
|
||||
settings = main_screen.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
|
||||
with step('Create community and select it'):
|
||||
community_params = constants.community_params
|
||||
main_screen.create_community(community_params['name'], community_params['description'],
|
||||
community_params['intro'], community_params['outro'],
|
||||
community_params['logo']['fp'], community_params['banner']['fp'],
|
||||
['Activism', 'Art'], constants.community_tags[:2])
|
||||
community_screen = main_screen.left_panel.select_community(community_params['name'])
|
||||
community = RandomCommunity()
|
||||
main_screen.create_community(community_data=community)
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
|
||||
with step('Create community category and verify that it displays correctly'):
|
||||
community_screen.create_category(category_name, general_checkbox)
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
import allure
|
||||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
||||
from constants import RandomCommunity
|
||||
from scripts.utils.generators import random_community_name, random_community_description, random_community_introduction, \
|
||||
random_community_leave_message
|
||||
from . import marks
|
||||
|
||||
import configs.testpath
|
||||
|
@ -13,52 +17,42 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703057', 'Edit community')
|
||||
@pytest.mark.case(703057)
|
||||
@pytest.mark.critical
|
||||
@pytest.mark.parametrize('params', [
|
||||
{
|
||||
'name': 'Updated Name',
|
||||
'description': 'Updated Description',
|
||||
'logo': {'fp': configs.testpath.TEST_FILES / 'banner.png', 'zoom': None, 'shift': None},
|
||||
'banner': {'fp': configs.testpath.TEST_FILES / 'tv_signal.png', 'zoom': None, 'shift': None},
|
||||
'color': '#ff7d46',
|
||||
'tags': ['Ethereum'],
|
||||
'intro': 'Updated Intro',
|
||||
'outro': 'Updated Outro'
|
||||
}
|
||||
])
|
||||
def test_edit_community(main_screen: MainWindow, params):
|
||||
def test_edit_community(main_screen: MainWindow):
|
||||
with step('Enable creation of community option'):
|
||||
settings = main_screen.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
community_params = constants.community_params
|
||||
main_screen.create_community(community_params['name'], community_params['description'],
|
||||
community_params['intro'], community_params['outro'],
|
||||
community_params['logo']['fp'], community_params['banner']['fp'],
|
||||
['Activism', 'Art'], constants.community_tags[:2])
|
||||
|
||||
with step('Create community and select it'):
|
||||
community = RandomCommunity()
|
||||
main_screen.create_community(community_data=community)
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
|
||||
with step('Edit community'):
|
||||
community_screen = main_screen.left_panel.select_community(community_params['name'])
|
||||
community_setting = community_screen.left_panel.open_community_settings()
|
||||
edit_community_form = community_setting.left_panel.open_overview().open_edit_community_view()
|
||||
edit_community_form.edit(params['name'], params['description'],
|
||||
params['intro'], params['outro'],
|
||||
params['logo']['fp'], params['banner']['fp'])
|
||||
new_name = random_community_name()
|
||||
new_description = random_community_description()
|
||||
new_logo = {'fp': configs.testpath.TEST_FILES / 'banner.png', 'zoom': None, 'shift': None}['fp']
|
||||
new_banner = {'fp': configs.testpath.TEST_FILES / 'tv_signal.png', 'zoom': None, 'shift': None}['fp']
|
||||
new_introduction = random_community_introduction()
|
||||
new_leaving_message = random_community_leave_message()
|
||||
edit_community_form.edit(new_name, new_description,
|
||||
new_introduction, new_leaving_message,
|
||||
new_logo, new_banner)
|
||||
|
||||
with step('Verify community parameters on settings overview'):
|
||||
overview_setting = community_setting.left_panel.open_overview()
|
||||
with step('Name is correct'):
|
||||
assert overview_setting.name == params['name']
|
||||
with step('Description is correct'):
|
||||
assert overview_setting.description == params['description']
|
||||
assert overview_setting.name == new_name
|
||||
assert overview_setting.description == new_description
|
||||
|
||||
with step('Verify community parameters in community screen'):
|
||||
community_setting.left_panel.back_to_community()
|
||||
with step('Name is correct'):
|
||||
assert community_screen.left_panel.name == params['name']
|
||||
assert community_screen.left_panel.name == new_name
|
||||
|
||||
with step('Verify community parameters in community settings screen'):
|
||||
settings_screen = main_screen.left_panel.open_settings()
|
||||
community_settings = settings_screen.left_panel.open_communities_settings()
|
||||
community_info = community_settings.communities[0]
|
||||
assert community_info.name == params['name']
|
||||
assert community_info.description == params['description']
|
||||
assert community_info.name == new_name
|
||||
assert community_info.description == new_description
|
||||
assert '1' in community_info.members
|
||||
|
|
|
@ -7,7 +7,7 @@ from allure_commons._allure import step
|
|||
import configs
|
||||
import constants
|
||||
import driver
|
||||
from constants import permission_data
|
||||
from constants import permission_data, RandomCommunity
|
||||
from constants.community_settings import ToastMessages, PermissionsElements
|
||||
from gui.components.changes_detected_popup import PermissionsChangesDetectedToastMessage
|
||||
from gui.components.delete_popup import DeletePermissionPopup
|
||||
|
@ -21,26 +21,23 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703632',
|
||||
'Manage community: Adding new permissions, Editing permissions, Deleting permission')
|
||||
@pytest.mark.case(703632, 705014, 705016)
|
||||
@pytest.mark.parametrize('params', [constants.community_params])
|
||||
@pytest.mark.critical
|
||||
def test_add_edit_remove_duplicate_permissions(main_screen: MainWindow, params):
|
||||
def test_add_edit_remove_duplicate_permissions(main_screen: MainWindow):
|
||||
with step('Enable creation of community option'):
|
||||
settings = main_screen.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
|
||||
main_screen.create_community(params['name'], params['description'],
|
||||
params['intro'], params['outro'],
|
||||
params['logo']['fp'], params['banner']['fp'],
|
||||
['Activism', 'Art'], constants.community_tags[:2])
|
||||
|
||||
permission_set = random.choice(permission_data)
|
||||
with step('Create community and select it'):
|
||||
community = RandomCommunity()
|
||||
main_screen.create_community(community_data=community)
|
||||
community_screen = main_screen.left_panel.select_community(community.name)
|
||||
|
||||
with step('Open add new permission page'):
|
||||
community_screen = main_screen.left_panel.select_community(params['name'])
|
||||
community_setting = community_screen.left_panel.open_community_settings()
|
||||
permissions_intro_view = community_setting.left_panel.open_permissions()
|
||||
|
||||
with step('Create new permission'):
|
||||
permission_set = random.choice(permission_data)
|
||||
permissions_settings = permissions_intro_view.add_new_permission()
|
||||
permissions_settings.set_who_holds_checkbox_state(permission_set['checkbox_state'])
|
||||
permissions_settings.set_who_holds_asset_and_amount(permission_set['first_asset'],
|
||||
|
@ -72,7 +69,7 @@ def test_add_edit_remove_duplicate_permissions(main_screen: MainWindow, params):
|
|||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
if permission_set['in_channel'] is False:
|
||||
assert driver.waitFor(
|
||||
lambda: params['name'] in permissions_settings.get_in_community_in_channel_tags_titles(),
|
||||
lambda: community.name in permissions_settings.get_in_community_in_channel_tags_titles(),
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
if permission_set['in_channel']:
|
||||
assert driver.waitFor(lambda: permission_set[
|
||||
|
|
|
@ -25,11 +25,6 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703010', 'Settings - Sign out & Quit')
|
||||
@pytest.mark.case(703421, 703010)
|
||||
@pytest.mark.critical # TODO 'https://github.com/status-im/status-desktop/issues/13013'
|
||||
@pytest.mark.parametrize('user_account',
|
||||
[
|
||||
pytest.param(
|
||||
RandomUser())
|
||||
])
|
||||
@pytest.mark.parametrize('user_image, zoom, shift', [
|
||||
pytest.param(
|
||||
random.choice(['sample_JPEG_1920×1280.jpeg', 'file_example_PNG_3MB.png', 'file_example_JPG_2500kB.jpg']
|
||||
|
|
|
@ -20,7 +20,6 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703040', 'Import: 12 word seed phrase')
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/736372', 'Re-importing seed-phrase')
|
||||
@pytest.mark.case(703040, 736372)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.critical
|
||||
def test_import_and_reimport_random_seed(main_window, aut: AUT, user_account):
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703005',
|
||||
'Change the password and login with new password')
|
||||
@pytest.mark.case(703005)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.critical
|
||||
# TODO: follow up on https://github.com/status-im/status-desktop/issues/13013
|
||||
def test_change_password_and_login(aut: AUT, main_screen: MainWindow, user_account):
|
||||
|
|
|
@ -10,15 +10,13 @@ from helpers.OnboardingHelper import open_generate_new_keys_view
|
|||
from . import marks
|
||||
|
||||
import configs.system
|
||||
import constants
|
||||
from constants import UserAccount, RandomUser
|
||||
from scripts.utils.generators import random_name_string, random_password_string
|
||||
from scripts.utils.generators import random_password_string
|
||||
from constants.onboarding import OnboardingMessages
|
||||
from driver.aut import AUT
|
||||
from gui.components.onboarding.before_started_popup import BeforeStartedPopUp
|
||||
from gui.components.onboarding.beta_consent_popup import BetaConsentPopup
|
||||
from gui.components.splash_screen import SplashScreen
|
||||
from gui.screens.onboarding import WelcomeToStatusView, KeysView, BiometricsView, LoginView, \
|
||||
from gui.screens.onboarding import BiometricsView, LoginView, \
|
||||
YourEmojihashAndIdenticonRingView
|
||||
|
||||
pytestmark = marks
|
||||
|
@ -97,8 +95,6 @@ def test_sign_up_with_wrong_name(aut: AUT, main_window, user_name, error):
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702993',
|
||||
'Sign up with password shorter than 10 chars')
|
||||
@pytest.mark.case(702993)
|
||||
@pytest.mark.parametrize('user_account', [
|
||||
RandomUser()])
|
||||
@pytest.mark.parametrize('error', [
|
||||
pytest.param(OnboardingMessages.WRONG_PASSWORD.value),
|
||||
])
|
||||
|
@ -122,8 +118,6 @@ def test_sign_up_with_wrong_password_length(user_account, error: str, aut: AUT,
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702994',
|
||||
'Sign up with right password format in new password input but incorrect in confirmation password input')
|
||||
@pytest.mark.case(702994)
|
||||
@pytest.mark.parametrize('user_account', [
|
||||
RandomUser()])
|
||||
def test_sign_up_with_wrong_password_in_confirmation_field(user_account, aut: AUT, main_window):
|
||||
keys_screen = open_generate_new_keys_view()
|
||||
|
||||
|
@ -143,7 +137,6 @@ def test_sign_up_with_wrong_password_in_confirmation_field(user_account, aut: AU
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702995',
|
||||
'Sign up with incorrect confirmation-again password')
|
||||
@pytest.mark.case(702995)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize('error', [
|
||||
pytest.param(OnboardingMessages.PASSWORDS_DONT_MATCH.value),
|
||||
])
|
||||
|
|
|
@ -19,7 +19,6 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/702989',
|
||||
'Strength of the password')
|
||||
@pytest.mark.case(702989)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
def test_check_password_strength_and_login(main_window, user_account):
|
||||
values = [('abcdefghij', very_weak_lower_elements),
|
||||
('ABCDEFGHIJ', very_weak_upper_elements),
|
||||
|
|
|
@ -19,7 +19,6 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703007',
|
||||
'Change own display name from online identifier')
|
||||
@pytest.mark.case(703007)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
def test_change_own_display_name(main_screen: MainWindow, user_account):
|
||||
with step('Open own profile popup and check name of user is correct'):
|
||||
profile = main_screen.left_panel.open_online_identifier()
|
||||
|
|
|
@ -21,7 +21,6 @@ pytestmark = marks
|
|||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703627', 'Check whats on a Keycard')
|
||||
@pytest.mark.case(703627)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.skip(reason='https://github.com/status-im/status-desktop/issues/15741')
|
||||
def test_check_whats_on_keycard(main_screen: MainWindow, user_account):
|
||||
main_screen.prepare()
|
||||
|
|
|
@ -18,7 +18,6 @@ pytestmark = marks
|
|||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703628', 'Factory reset a Keycard')
|
||||
@pytest.mark.case(703628)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.skip(reason='https://github.com/status-im/status-desktop/issues/15741')
|
||||
def test_factory_reset_keycard(main_screen: MainWindow, user_account):
|
||||
main_screen.prepare()
|
||||
|
@ -72,7 +71,6 @@ def test_factory_reset_keycard(main_screen: MainWindow, user_account):
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/704606',
|
||||
'Factory reset a Keycard: incorrect PIN')
|
||||
@pytest.mark.case(704606)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.skip(reason='https://github.com/status-im/status-desktop/issues/15741')
|
||||
def test_factory_reset_keycard_incorrect_pin(main_screen: MainWindow, user_account):
|
||||
main_screen.prepare()
|
||||
|
|
|
@ -20,7 +20,6 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703625',
|
||||
'Import or restore a Keycard via a seed phrase')
|
||||
@pytest.mark.case(703625)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.skip(reason='https://github.com/status-im/status-desktop/issues/15741')
|
||||
def test_import_restore_keycard_via_seed_phrase(main_screen: MainWindow, user_account):
|
||||
timeout = configs.timeouts.UI_LOAD_TIMEOUT_MSEC
|
||||
|
|
|
@ -23,7 +23,6 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703623',
|
||||
'Setup a keycard with an existing account')
|
||||
@pytest.mark.case(703623)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize('account_name', [pytest.param('Account 1')])
|
||||
@pytest.mark.timeout(timeout=210)
|
||||
@pytest.mark.skip(reason='https://github.com/status-im/status-desktop/issues/15741')
|
||||
|
|
|
@ -20,7 +20,6 @@ pytestmark = marks
|
|||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/704607', 'Unlock Keycard')
|
||||
@pytest.mark.case(704607)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.skip(reason='https://github.com/status-im/status-desktop/issues/15741')
|
||||
def test_unlock_keycard_using_correct_puk(main_screen: MainWindow, user_account):
|
||||
timeout = configs.timeouts.UI_LOAD_TIMEOUT_MSEC
|
||||
|
@ -85,7 +84,6 @@ def test_unlock_keycard_using_correct_puk(main_screen: MainWindow, user_account)
|
|||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/704608', 'Unlock Keycard: incorrect PUK')
|
||||
@pytest.mark.case(704608)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.skip(reason='https://github.com/status-im/status-desktop/issues/15741')
|
||||
def test_unlock_keycard_using_incorrect_puk(main_screen: MainWindow, user_account):
|
||||
timeout = configs.timeouts.UI_LOAD_TIMEOUT_MSEC
|
||||
|
|
|
@ -17,11 +17,6 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703006',
|
||||
'Set display name, bio and social links')
|
||||
@pytest.mark.case(703006)
|
||||
@pytest.mark.parametrize('user_account',
|
||||
[
|
||||
pytest.param(
|
||||
RandomUser())
|
||||
])
|
||||
@pytest.mark.parametrize('bio, links', [pytest.param('This is my bio', constants.social_links)])
|
||||
def test_set_name_bio_social_links(main_screen: MainWindow, aut: AUT, user_account, bio, links):
|
||||
with step('Open profile settings and check name, bio and links'):
|
||||
|
|
|
@ -21,7 +21,6 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703420',
|
||||
'Wallet -> Settings -> Keypair interactions: Rename keypair')
|
||||
@pytest.mark.case(703420)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize(
|
||||
'emoji',
|
||||
[pytest.param('sunglasses')])
|
||||
|
|
|
@ -21,7 +21,6 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/edit/703598',
|
||||
'Add new account from wallet settings screen')
|
||||
@pytest.mark.case(703598)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize('account_name, color, emoji, emoji_unicode',
|
||||
[
|
||||
pytest.param(''.join(random.choices(string.ascii_letters +
|
||||
|
|
|
@ -9,7 +9,7 @@ import configs
|
|||
import constants
|
||||
import driver
|
||||
from configs import WALLET_SEED
|
||||
from constants import ReturningUser
|
||||
from constants import ReturningUser, RandomCommunity
|
||||
from helpers.OnboardingHelper import open_generate_new_keys_view, open_import_seed_view_and_do_import, \
|
||||
finalize_onboarding_and_login
|
||||
from helpers.SettingsHelper import enable_testnet_mode
|
||||
|
@ -32,23 +32,20 @@ def test_mint_owner_and_tokenmaster_tokens(main_window, user_account):
|
|||
profile_view = open_import_seed_view_and_do_import(keys_screen, user_account.seed_phrase, user_account)
|
||||
finalize_onboarding_and_login(profile_view, user_account)
|
||||
|
||||
enable_testnet_mode(main_window)
|
||||
|
||||
with step('Enable creation of community option'):
|
||||
settings = main_window.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().enable_creation_of_communities()
|
||||
|
||||
enable_testnet_mode(main_window)
|
||||
|
||||
with step('Switch manage community on testnet option'):
|
||||
settings = main_window.left_panel.open_settings()
|
||||
settings.left_panel.open_advanced_settings().switch_manage_on_community()
|
||||
|
||||
with step('Create simple community'):
|
||||
community_params = constants.community_params
|
||||
main_window.create_community(community_params['name'], community_params['description'],
|
||||
community_params['intro'], community_params['outro'],
|
||||
community_params['logo']['fp'], community_params['banner']['fp'],
|
||||
['Activism', 'Art'], constants.community_tags[:2])
|
||||
community_screen = main_window.left_panel.select_community(community_params['name'])
|
||||
with step('Create community and select it'):
|
||||
community = RandomCommunity()
|
||||
main_window.create_community(community_data=community)
|
||||
community_screen = main_window.left_panel.select_community(community.name)
|
||||
|
||||
with step('Open mint owner token view'):
|
||||
community_setting = community_screen.left_panel.open_community_settings()
|
||||
|
@ -62,8 +59,7 @@ def test_mint_owner_and_tokenmaster_tokens(main_window, user_account):
|
|||
edit_owner_token_view.select_network(network_name)
|
||||
|
||||
with step('Verify fees title and gas fees exist'):
|
||||
assert driver.waitFor(lambda: edit_owner_token_view.get_fee_title == 'Mint ' + community_params[
|
||||
'name'] + MintOwnerTokensElements.SIGN_TRANSACTION_MINT_TITLE.value + network_name,
|
||||
assert driver.waitFor(lambda: edit_owner_token_view.get_fee_title == 'Mint ' + community.name + MintOwnerTokensElements.SIGN_TRANSACTION_MINT_TITLE.value + network_name,
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
assert driver.waitFor(lambda: edit_owner_token_view.get_fee_total_value != '',
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
|
@ -72,8 +68,7 @@ def test_mint_owner_and_tokenmaster_tokens(main_window, user_account):
|
|||
start_minting = edit_owner_token_view.click_mint()
|
||||
|
||||
with step('Verify fee text and sign transaction'):
|
||||
assert start_minting.get_fee_title == 'Mint ' + community_params[
|
||||
'name'] + MintOwnerTokensElements.SIGN_TRANSACTION_MINT_TITLE.value + network_name
|
||||
assert start_minting.get_fee_title == 'Mint ' + community.name + MintOwnerTokensElements.SIGN_TRANSACTION_MINT_TITLE.value + network_name
|
||||
assert start_minting.get_fee_total_value != ''
|
||||
start_minting.sign_transaction(user_account.password)
|
||||
time.sleep(1)
|
||||
|
@ -81,11 +76,9 @@ def test_mint_owner_and_tokenmaster_tokens(main_window, user_account):
|
|||
|
||||
with step('Verify toast messages about started minting process appears'):
|
||||
toast_messages = main_window.wait_for_notification()
|
||||
assert driver.waitFor(lambda: (MintOwnerTokensElements.TOAST_AIRDROPPING_TOKEN_1.value + community_params[
|
||||
'name'] + MintOwnerTokensElements.TOAST_AIRDROPPING_TOKEN_2.value) in toast_messages,
|
||||
assert driver.waitFor(lambda: (MintOwnerTokensElements.TOAST_AIRDROPPING_TOKEN_1.value + community.name + MintOwnerTokensElements.TOAST_AIRDROPPING_TOKEN_2.value) in toast_messages,
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
assert driver.waitFor(lambda: (community_params[
|
||||
'name'] + MintOwnerTokensElements.TOAST_TOKENS_BEING_MINTED.value) in toast_messages,
|
||||
assert driver.waitFor(lambda: (community.name + MintOwnerTokensElements.TOAST_TOKENS_BEING_MINTED.value) in toast_messages,
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
|
||||
with step('Verify that status of both tokens'):
|
||||
|
|
|
@ -4,13 +4,11 @@ import allure
|
|||
import pytest
|
||||
from allure import step
|
||||
|
||||
from constants import RandomUser
|
||||
from helpers.WalletHelper import authenticate_with_password
|
||||
from tests.wallet_main_screen import marks
|
||||
|
||||
import constants
|
||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||
from gui.components.authenticate_popup import AuthenticatePopup
|
||||
from gui.main_window import MainWindow
|
||||
|
||||
pytestmark = marks
|
||||
|
@ -19,7 +17,6 @@ pytestmark = marks
|
|||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703036',
|
||||
'Manage an account created from the generated seed phrase')
|
||||
@pytest.mark.case(703036)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize('name, color, emoji, emoji_unicode, keypair_name', [
|
||||
pytest.param('SPAcc', '#2a4af5', 'sunglasses', '1f60e',
|
||||
'SPKeyPair')])
|
||||
|
|
|
@ -4,15 +4,12 @@ import allure
|
|||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
||||
from constants import UserAccount, RandomUser
|
||||
from helpers.WalletHelper import authenticate_with_password
|
||||
from scripts.utils.generators import random_password_string
|
||||
from tests.wallet_main_screen import marks
|
||||
|
||||
import constants
|
||||
import driver
|
||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||
from gui.components.authenticate_popup import AuthenticatePopup
|
||||
from gui.main_window import MainWindow
|
||||
|
||||
pytestmark = marks
|
||||
|
@ -20,7 +17,6 @@ pytestmark = marks
|
|||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703029', 'Manage a private key imported account')
|
||||
@pytest.mark.case(703029)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize('address_pair', [constants.user.private_key_address_pair_1])
|
||||
@pytest.mark.parametrize('name, color, emoji, emoji_unicode, '
|
||||
'new_name, new_color, new_emoji, new_emoji_unicode', [
|
||||
|
|
|
@ -5,7 +5,6 @@ import pyperclip
|
|||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
||||
from constants import RandomUser
|
||||
from constants.wallet import WalletSeedPhrase
|
||||
from helpers.WalletHelper import authenticate_with_password
|
||||
from scripts.utils.generators import random_mnemonic
|
||||
|
@ -21,7 +20,6 @@ pytestmark = marks
|
|||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703030', 'Manage a seed phrase imported account')
|
||||
@pytest.mark.case(703030)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize('name, color, emoji, emoji_unicode, '
|
||||
'new_name, new_color, new_emoji, new_emoji_unicode', [
|
||||
pytest.param('SPAcc24', '#2a4af5', 'sunglasses', '1f60e',
|
||||
|
|
|
@ -5,13 +5,11 @@ import allure
|
|||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
||||
from constants import RandomUser
|
||||
from constants.wallet import DerivationPathName
|
||||
from scripts.utils.generators import random_wallet_account_name
|
||||
from tests.wallet_main_screen import marks
|
||||
|
||||
import constants
|
||||
import driver
|
||||
from gui.components.signing_phrase_popup import SigningPhrasePopup
|
||||
from gui.main_window import MainWindow
|
||||
|
||||
|
@ -20,7 +18,6 @@ pytestmark = marks
|
|||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703028', 'Manage a custom generated account')
|
||||
@pytest.mark.case(703028)
|
||||
@pytest.mark.parametrize('user_account', [RandomUser()])
|
||||
@pytest.mark.parametrize(
|
||||
'color, emoji, emoji_unicode',
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue