chore: changed create community method in all community tests
This commit is contained in:
parent
0f90508113
commit
cbd27f87cd
|
@ -1,5 +1,3 @@
|
|||
from datetime import datetime
|
||||
|
||||
import allure
|
||||
import pytest
|
||||
from allure_commons._allure import step
|
||||
|
@ -15,7 +13,7 @@ from gui.main_window import MainWindow
|
|||
pytestmark = marks
|
||||
|
||||
|
||||
# @pytest.mark.critical TODO: https://github.com/status-im/status-desktop/issues/13483
|
||||
@pytest.mark.critical
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703630', 'Create community')
|
||||
@pytest.mark.case(703630)
|
||||
@pytest.mark.parametrize('params', [constants.community_params])
|
||||
|
@ -100,12 +98,13 @@ def test_create_community(user_account, main_screen: MainWindow, params):
|
|||
}
|
||||
])
|
||||
def test_edit_community(main_screen: MainWindow, params):
|
||||
main_screen.create_community(constants.community_params['name'], constants.community_params['description'],
|
||||
constants.community_params['intro'], constants.community_params['outro'],
|
||||
constants.community_params['logo']['fp'], constants.community_params['banner']['fp'])
|
||||
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'])
|
||||
|
||||
with step('Edit community'):
|
||||
community_screen = main_screen.left_panel.select_community(constants.community_params['name'])
|
||||
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'],
|
||||
|
|
|
@ -19,7 +19,9 @@ pytestmark = marks
|
|||
pytest.param('Category out of general', False)
|
||||
])
|
||||
def test_create_community_category(main_screen: MainWindow, category_name, general_checkbox):
|
||||
main_screen.create_community(constants.community_params)
|
||||
main_screen.create_community(constants.community_params['name'], constants.community_params['description'],
|
||||
constants.community_params['intro'], constants.community_params['outro'],
|
||||
constants.community_params['logo']['fp'], constants.community_params['banner']['fp'])
|
||||
community_screen = main_screen.left_panel.select_community(constants.community_params['name'])
|
||||
community_screen.create_category(category_name, general_checkbox)
|
||||
|
||||
|
@ -34,7 +36,9 @@ def test_create_community_category(main_screen: MainWindow, category_name, gener
|
|||
])
|
||||
def test_remove_community_category(main_screen: MainWindow, category_name, general_checkbox, channel_name,
|
||||
channel_description, channel_emoji):
|
||||
main_screen.create_community(constants.community_params)
|
||||
main_screen.create_community(constants.community_params['name'], constants.community_params['description'],
|
||||
constants.community_params['intro'], constants.community_params['outro'],
|
||||
constants.community_params['logo']['fp'], constants.community_params['banner']['fp'])
|
||||
community_screen = main_screen.left_panel.select_community(constants.community_params['name'])
|
||||
community_screen.create_category(category_name, general_checkbox)
|
||||
|
||||
|
@ -70,7 +74,10 @@ def test_edit_community_category(main_screen: MainWindow, category_name, general
|
|||
channel_description, channel_emoji, second_channel_name, second_channel_description,
|
||||
second_channel_emoji):
|
||||
with step('Create community and select it'):
|
||||
main_screen.create_community(constants.community_params)
|
||||
main_screen.create_community(constants.community_params['name'], constants.community_params['description'],
|
||||
constants.community_params['intro'], constants.community_params['outro'],
|
||||
constants.community_params['logo']['fp'],
|
||||
constants.community_params['banner']['fp'])
|
||||
community_screen = main_screen.left_panel.select_community(constants.community_params['name'])
|
||||
|
||||
with step('Create community category and verify that it displays correctly'):
|
||||
|
@ -150,7 +157,10 @@ def test_member_role_cannot_delete_category(main_screen: MainWindow):
|
|||
[pytest.param('Category in general', True)])
|
||||
def test_clicking_community_category(main_screen: MainWindow, category_name, general_checkbox):
|
||||
with step('Create community and select it'):
|
||||
main_screen.create_community(constants.community_params)
|
||||
main_screen.create_community(constants.community_params['name'], constants.community_params['description'],
|
||||
constants.community_params['intro'], constants.community_params['outro'],
|
||||
constants.community_params['logo']['fp'],
|
||||
constants.community_params['banner']['fp'])
|
||||
community_screen = main_screen.left_panel.select_community(constants.community_params['name'])
|
||||
|
||||
with step('Create community category and verify that it displays correctly'):
|
||||
|
|
|
@ -15,7 +15,9 @@ from . import marks
|
|||
[('Channel', 'Description', 'sunglasses', '😎', '#4360df')])
|
||||
def test_create_community_channel(main_screen: MainWindow, channel_name, channel_description, channel_emoji,
|
||||
channel_emoji_image, channel_color):
|
||||
main_screen.create_community(constants.community_params)
|
||||
main_screen.create_community(constants.community_params['name'], constants.community_params['description'],
|
||||
constants.community_params['intro'], constants.community_params['outro'],
|
||||
constants.community_params['logo']['fp'], constants.community_params['banner']['fp'])
|
||||
community_screen = main_screen.left_panel.select_community(constants.community_params['name'])
|
||||
community_screen.create_channel(channel_name, channel_description, channel_emoji)
|
||||
|
||||
|
@ -35,7 +37,10 @@ def test_create_community_channel(main_screen: MainWindow, channel_name, channel
|
|||
def test_edit_community_channel(main_screen, channel_name, channel_description, channel_emoji, channel_emoji_image,
|
||||
channel_color):
|
||||
with step('Create simple community'):
|
||||
main_screen.create_community(constants.community_params)
|
||||
main_screen.create_community(constants.community_params['name'], constants.community_params['description'],
|
||||
constants.community_params['intro'], constants.community_params['outro'],
|
||||
constants.community_params['logo']['fp'],
|
||||
constants.community_params['banner']['fp'])
|
||||
community_screen = main_screen.left_panel.select_community(constants.community_params['name'])
|
||||
|
||||
with step('Verify General channel is present for recently created community'):
|
||||
|
@ -65,7 +70,10 @@ def test_edit_community_channel(main_screen, channel_name, channel_description,
|
|||
@pytest.mark.case(703051)
|
||||
def test_delete_community_channel(main_screen):
|
||||
with step('Create simple community'):
|
||||
main_screen.create_community(constants.community_params)
|
||||
main_screen.create_community(constants.community_params['name'], constants.community_params['description'],
|
||||
constants.community_params['intro'], constants.community_params['outro'],
|
||||
constants.community_params['logo']['fp'],
|
||||
constants.community_params['banner']['fp'])
|
||||
community_screen = main_screen.left_panel.select_community(constants.community_params['name'])
|
||||
|
||||
with step('Delete channel'):
|
||||
|
|
|
@ -25,7 +25,7 @@ pytestmark = marks
|
|||
'checkbox_state, first_asset, second_asset, amount, allowed_to, in_channel, asset_title, second_asset_title, '
|
||||
'allowed_to_title',
|
||||
[
|
||||
pytest.param(True, 'Dai Stablecoin', False, '10', 'becomeMember', False, '10 DAI', False, 'Become member',),
|
||||
pytest.param(True, 'Dai Stablecoin', False, '10', 'becomeMember', False, '10 DAI', False, 'Become member', ),
|
||||
pytest.param(True, 'Ether', False, '1', 'becomeAdmin', False, '1 ETH', False, 'Become an admin',
|
||||
marks=pytest.mark.critical),
|
||||
pytest.param(True, 'Ether', 'Dai Stablecoin', '10', 'viewAndPost', '#general', '10 ETH', '10 DAI',
|
||||
|
@ -37,7 +37,9 @@ pytestmark = marks
|
|||
def test_add_edit_and_remove_permissions(main_screen: MainWindow, params, checkbox_state: bool, first_asset,
|
||||
second_asset, amount, allowed_to: str, in_channel, asset_title,
|
||||
second_asset_title, allowed_to_title: str):
|
||||
main_screen.create_community(params)
|
||||
main_screen.create_community(params['name'], params['description'],
|
||||
params['intro'], params['outro'],
|
||||
params['logo']['fp'], params['banner']['fp'])
|
||||
|
||||
with step('Open add new permission page'):
|
||||
community_screen = main_screen.left_panel.select_community(params['name'])
|
||||
|
@ -93,14 +95,18 @@ def test_add_edit_and_remove_permissions(main_screen: MainWindow, params, checkb
|
|||
changes_popup.update_permission()
|
||||
if allowed_to is 'becomeAdmin' and checkbox_state is True:
|
||||
if asset_title is not False:
|
||||
assert driver.waitFor(lambda: asset_title not in permissions_settings.get_who_holds_tags_titles(), configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
assert driver.waitFor(lambda: asset_title not in permissions_settings.get_who_holds_tags_titles(),
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
if second_asset_title is not False:
|
||||
assert driver.waitFor(
|
||||
lambda: second_asset_title not in permissions_settings.get_who_holds_tags_titles(), configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
lambda: second_asset_title not in permissions_settings.get_who_holds_tags_titles(),
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
elif checkbox_state is False:
|
||||
assert driver.waitFor(lambda: 'Become member' in permissions_settings.get_is_allowed_tags_titles(), configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
assert driver.waitFor(lambda: 'Become member' in permissions_settings.get_is_allowed_tags_titles(),
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
else:
|
||||
assert driver.waitFor(lambda: permissions_intro_view.is_hide_icon_visible, configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
assert driver.waitFor(lambda: permissions_intro_view.is_hide_icon_visible,
|
||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||
|
||||
with step('Check toast message for edited permission'):
|
||||
messages = ToastMessage().get_toast_messages
|
||||
|
|
|
@ -14,6 +14,7 @@ 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)')
|
||||
@pytest.mark.case(703255, 703256)
|
||||
|
@ -28,7 +29,10 @@ pytestmark = marks
|
|||
])
|
||||
def test_pin_and_unpin_message_in_community(main_screen: MainWindow, community_params, user_account):
|
||||
with step('Create community'):
|
||||
main_screen.create_community(constants.community_params)
|
||||
main_screen.create_community(constants.community_params['name'], constants.community_params['description'],
|
||||
constants.community_params['intro'], constants.community_params['outro'],
|
||||
constants.community_params['logo']['fp'],
|
||||
constants.community_params['banner']['fp'])
|
||||
|
||||
with step('Go to edit community and check that pin message checkbox is not checked'):
|
||||
community_screen = main_screen.left_panel.select_community(constants.community_params['name'])
|
||||
|
|
|
@ -11,13 +11,19 @@ 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')
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703199',
|
||||
'Manage community: Manage Mint Tokens screen overview')
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703200',
|
||||
'Manage community: Manage Airdrops screen overview')
|
||||
@pytest.mark.case(703200)
|
||||
@pytest.mark.case(703198, 703199, 703200)
|
||||
@pytest.mark.parametrize('params', [constants.community_params])
|
||||
def test_manage_community_screens_overview(main_screen: MainWindow, params):
|
||||
with step('Create community'):
|
||||
main_screen.create_community(params)
|
||||
main_screen.create_community(params['name'], params['description'],
|
||||
params['intro'], params['outro'],
|
||||
params['logo']['fp'], params['banner']['fp'])
|
||||
|
||||
with step('Open airdrops view from community settings'):
|
||||
community_screen = main_screen.left_panel.select_community(params['name'])
|
||||
|
|
|
@ -14,6 +14,7 @@ from gui.main_window import MainWindow
|
|||
|
||||
pytestmark = marks
|
||||
|
||||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703510', 'Join community via owner invite')
|
||||
@pytest.mark.case(703510)
|
||||
@pytest.mark.parametrize('user_data_one, user_data_two', [
|
||||
|
@ -64,7 +65,9 @@ def test_join_community_via_owner_invite(multiple_instance, user_data_one, user_
|
|||
with step(f'User {user_one.name}, create community and {user_two.name}'):
|
||||
aut_one.attach()
|
||||
main_window.prepare()
|
||||
main_window.create_community(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'])
|
||||
main_window.left_panel.invite_people_in_community([user_two.name], 'Message', community_params['name'])
|
||||
main_window.hide()
|
||||
|
||||
|
|
Loading…
Reference in New Issue