-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tst_communityNavigation): Implemented community leave test
- Loading branch information
1 parent
55d39aa
commit 6017a01
Showing
9 changed files
with
94 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
test/ui-test/testSuites/suite_communities/tst_communityNavigation/bdd_hooks.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# This file contains hook functions to run as the .feature file is executed | ||
|
||
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../testSuites/global_shared/")) | ||
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../src/")) | ||
|
||
import steps.commonInitSteps as init_steps | ||
|
||
# Global properties for the specific feature | ||
_user = "tester123" | ||
_password = "TesTEr16843/!@00" | ||
|
||
@OnFeatureStart | ||
def hook(context): | ||
init_steps.context_init(context, testSettings) | ||
init_steps.signs_up_process_steps(context, _user, _password) | ||
|
||
@OnFeatureEnd | ||
def hook(context): | ||
currentApplicationContext().detach() | ||
snooze(_app_closure_timeout) | ||
|
||
@OnStepEnd | ||
def hook(context): | ||
context.userData["step_name"] = context._data["text"] |
36 changes: 36 additions & 0 deletions
36
test/ui-test/testSuites/suite_communities/tst_communityNavigation/test.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#****************************************************************************** | ||
# Status.im | ||
#*****************************************************************************/ | ||
#/** | ||
# * \file test.feature | ||
# * | ||
# * \test Status Desktop - Community | ||
# * \date January 2023 | ||
# ** | ||
# *****************************************************************************/ | ||
|
||
Feature: Status Desktop community navigation | ||
|
||
As an admin user I want to create a community and be able to leave it. | ||
|
||
The feature start sequence is the following (setup on its own `bdd_hooks`): | ||
** given A first time user lands on the status desktop and generates new key | ||
** when user signs up with username "tester123" and password "TesTEr16843/!@00" | ||
** and the user lands on the signed in app | ||
|
||
Scenario Outline: User creates and leaves community | ||
# Create a community | ||
Given the user opens the community portal section | ||
And the user creates a community named "<community_name>", with description "My community description", intro "Community Intro" and outro "Community Outro" | ||
And the user lands on the community named "<community_name>" | ||
Then the count of communities in navbar is 1 | ||
# Leave a community | ||
When the user opens app settings screen | ||
And the user opens the communities settings | ||
And the user leaves "<community_name>" community | ||
# Switch back to portal to ensure that leaving procedure finished | ||
When the user opens the community portal section | ||
Then the count of communities in navbar is 0 | ||
Examples: | ||
| community_name | | ||
| My community 1 | |
8 changes: 8 additions & 0 deletions
8
test/ui-test/testSuites/suite_communities/tst_communityNavigation/test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
source(findFile('scripts', 'python/bdd.py')) | ||
|
||
setupHooks('bdd_hooks.py') | ||
collectStepDefinitions('./steps', '../shared/steps/', '../../global_shared/steps/') | ||
|
||
def main(): | ||
testSettings.throwOnFailure = True | ||
runFeatureFile('test.feature') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters