tst(tst_communityManageAirdrops): welcome screen validation test

This commit is contained in:
Anastasiya Semiankevich 2023-05-22 12:26:23 +03:00 committed by Anastasiya Semenkevich
parent be8c5d7534
commit 00c8bb6be9
4 changed files with 41 additions and 2 deletions

View File

@ -80,6 +80,7 @@ class CommunityWelcomeScreenComponents(Enum):
# Constants definitions:
PERMISSIONS_OPTION = "Permissions"
TOKENS_OPTION = "Mint Tokens"
AIRDROPS_OPTION = "Airdrops"
# Components
WELCOME_SCREEN_IMAGE = "community_welcome_screen_image"
WELCOME_SCREEN_TITLE = "community_welcome_screen_title"
@ -501,6 +502,8 @@ class StatusCommunityScreen:
click_obj_by_name(CommunitySettingsComponents.PERMISSIONS_BUTTON.value)
elif option==CommunityWelcomeScreenComponents.TOKENS_OPTION.value:
click_obj_by_name(CommunitySettingsComponents.MINT_TOKENS_BUTTON.value)
elif option==CommunityWelcomeScreenComponents.AIRDROPS_OPTION.value:
click_obj_by_name(CommunitySettingsComponents.AIRDROPS_BUTTON.value)
def verify_welcome_image(self, option:str):
path = get_obj(CommunityWelcomeScreenComponents.WELCOME_SCREEN_IMAGE.value).source.path
@ -508,6 +511,8 @@ class StatusCommunityScreen:
verify_text_contains(str(path), "permissions2_3")
elif option==CommunityWelcomeScreenComponents.TOKENS_OPTION.value:
verify_text_contains(str(path), "mint2_1")
elif option==CommunityWelcomeScreenComponents.AIRDROPS_OPTION.value:
verify_text_contains(str(path), "airdrops8_1")
def verify_welcome_title(self, option:str):
title = get_obj(CommunityWelcomeScreenComponents.WELCOME_SCREEN_TITLE.value).text
@ -515,6 +520,8 @@ class StatusCommunityScreen:
verify_equals(title, "Permissions")
elif option==CommunityWelcomeScreenComponents.TOKENS_OPTION.value:
verify_equals(title, "Community tokens")
elif option==CommunityWelcomeScreenComponents.AIRDROPS_OPTION.value:
verify_equals(title, "Airdrop community tokens")
def verify_welcome_subtitle(self, option:str):
subtitle = get_obj(CommunityWelcomeScreenComponents.WELCOME_SCREEN_SUBTITLE.value).text
@ -522,7 +529,8 @@ class StatusCommunityScreen:
verify_equals(subtitle, "You can manage your community by creating and issuing membership and access permissions")
elif option==CommunityWelcomeScreenComponents.TOKENS_OPTION.value:
verify_equals(subtitle, "You can mint custom tokens and import tokens for your community")
elif option==CommunityWelcomeScreenComponents.AIRDROPS_OPTION.value:
verify_equals(subtitle, "You can mint custom tokens and collectibles for your community")
def verify_welcome_settings_checklist(self, option:str, list: list):
checklist = []

View File

@ -4,6 +4,6 @@ HOOK_SUB_PROCESSES=true
IMPLICITAUTSTART=0
LANGUAGE=Python
OBJECTMAPSTYLE=script
TEST_CASES=tst_communityFlows tst_searchFlows tst_communityMessageFlows tst_communityMemberFlows tst_communityAdminFlows tst_communityManageCommunity tst_communityManagePermissions tst_communityManageMintTokens
TEST_CASES=tst_communityFlows tst_searchFlows tst_communityMessageFlows tst_communityMemberFlows tst_communityAdminFlows tst_communityManageCommunity tst_communityManagePermissions tst_communityManageMintTokens tst_communityManageAirdrops
VERSION=3
WRAPPERS=Qt

View File

@ -0,0 +1,23 @@
Feature: Community Airdrops
Background:
Given A first time user lands on the status desktop and generates new key
And the user signs up with username "tester123" and password "TesTEr16843/!@00"
And the user lands on the signed in app
And the user opens the community portal section
And the user lands on the community portal section
And the user creates a community named "Test-Community", with description "My community description", intro "Community Intro" and outro "Community Outro"
And the user lands on the community named "Test-Community"
Scenario: Airdrops welcome screen content validation
When "Manage Community" is clicked in the community sidebar
And "Airdrops" section is selected
Then the welcome "Airdrops" image is present
And the welcome "Airdrops" title is present
And the welcome "Airdrops" subtitle is present
And the welcome "Airdrops" settings "<user onboarding checklist>" is present
| Reward individual members with custom tokens for their contribution |
| Incentivise joining, retention, moderation and desired behaviour |
| Require holding a token or NFT to obtain exclusive membership rights |
And "New Airdrop" button is present

View File

@ -0,0 +1,8 @@
source(findFile('scripts', 'python/bdd.py'))
setupHooks('../../global_shared/scripts/bdd_hooks.py')
collectStepDefinitions('./steps', '../shared/steps/', '../../global_shared/steps/','../../suite_onboarding/shared/steps/')
def main():
testSettings.throwOnFailure = True
runFeatureFile('test.feature')