chore: filling in tags for community is now required

This commit is contained in:
Anastasiya Semenkevich 2024-10-11 10:03:11 +03:00 committed by Lukáš Tinkl
parent 26dddcaff9
commit e864897863
4 changed files with 10 additions and 6 deletions

View File

@ -6,7 +6,7 @@ import allure
import configs import configs
import driver import driver
from constants import UserAccount, RandomUser from constants import UserAccount, RandomUser, ColorCodes
from gui.components.community.invite_contacts import InviteContactsPopup from gui.components.community.invite_contacts import InviteContactsPopup
from gui.components.onboarding.share_usage_data_popup import ShareUsageDataPopup from gui.components.onboarding.share_usage_data_popup import ShareUsageDataPopup
from gui.components.context_menu import ContextMenu from gui.components.context_menu import ContextMenu
@ -213,10 +213,11 @@ class MainWindow(Window):
return self.sign_up(user_account) return self.sign_up(user_account)
@allure.step('Create community') @allure.step('Create community')
def create_community(self, name, description, intro, outro, logo, banner) -> CommunityScreen: def create_community(self, name, description, intro, outro, logo, banner, tags_to_set, tags) -> CommunityScreen:
communities_portal = self.left_panel.open_communities_portal() communities_portal = self.left_panel.open_communities_portal()
create_community_form = communities_portal.open_create_community_popup() create_community_form = communities_portal.open_create_community_popup()
app_screen = create_community_form.create_simple_community(name, description, intro, outro, logo, banner) color = ColorCodes.ORANGE.value
app_screen = create_community_form.create_community(name, description, intro, outro, logo, banner, color, tags_to_set, tags)
return app_screen return app_screen
@allure.step('Wait for notification and get text') @allure.step('Wait for notification and get text')

View File

@ -31,7 +31,8 @@ def test_create_edit_remove_community_category(main_screen: MainWindow, category
community_params = constants.community_params community_params = constants.community_params
main_screen.create_community(community_params['name'], community_params['description'], main_screen.create_community(community_params['name'], community_params['description'],
community_params['intro'], community_params['outro'], community_params['intro'], community_params['outro'],
community_params['logo']['fp'], community_params['banner']['fp']) 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_screen = main_screen.left_panel.select_community(community_params['name'])
with step('Create community category and verify that it displays correctly'): with step('Create community category and verify that it displays correctly'):

View File

@ -32,7 +32,8 @@ def test_edit_community(main_screen: MainWindow, params):
community_params = constants.community_params community_params = constants.community_params
main_screen.create_community(community_params['name'], community_params['description'], main_screen.create_community(community_params['name'], community_params['description'],
community_params['intro'], community_params['outro'], community_params['intro'], community_params['outro'],
community_params['logo']['fp'], community_params['banner']['fp']) community_params['logo']['fp'], community_params['banner']['fp'],
['Activism', 'Art'], constants.community_tags[:2])
with step('Edit community'): with step('Edit community'):
community_screen = main_screen.left_panel.select_community(community_params['name']) community_screen = main_screen.left_panel.select_community(community_params['name'])

View File

@ -30,7 +30,8 @@ def test_add_edit_remove_duplicate_permissions(main_screen: MainWindow, params):
main_screen.create_community(params['name'], params['description'], main_screen.create_community(params['name'], params['description'],
params['intro'], params['outro'], params['intro'], params['outro'],
params['logo']['fp'], params['banner']['fp']) params['logo']['fp'], params['banner']['fp'],
['Activism', 'Art'], constants.community_tags[:2])
permission_set = random.choice(permission_data) permission_set = random.choice(permission_data)