forked from status-im/status-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(chat): add a test to create a one to one chat with a mutual contact
Fixes status-im#6884
- Loading branch information
1 parent
250a193
commit 794563b
Showing
12 changed files
with
110 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
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
34 changes: 34 additions & 0 deletions
34
test/ui-test/testSuites/suite_messaging/tst_OneToOneChatFlow/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,34 @@ | ||
# -*- 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/")) | ||
|
||
# from steps.chatSteps import * | ||
|
||
# Global properties for the specific feature | ||
_user = "tester123" | ||
_password = "TesTEr16843/!@00" | ||
_data_folder_path = "../../../fixtures/mutual_contacts" | ||
|
||
@OnFeatureStart | ||
def hook(context): | ||
context_init(context) | ||
login_process_steps(context, _user, _password, _data_folder_path) | ||
|
||
@OnFeatureEnd | ||
def hook(context): | ||
currentApplicationContext().detach() | ||
snooze(_app_closure_timeout) | ||
|
||
@OnScenarioStart | ||
def hook(context): | ||
when_the_user_opens_the_chat_section() | ||
|
||
@OnScenarioEnd | ||
def hook(context): | ||
leave_current_chat() | ||
|
||
@OnStepEnd | ||
def hook(context): | ||
context.userData["step_name"] = context._data["text"] |
22 changes: 22 additions & 0 deletions
22
test/ui-test/testSuites/suite_messaging/tst_OneToOneChatFlow/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,22 @@ | ||
Feature: Status Desktop One to One Chat Flows | ||
|
||
As a user I want to do basic interactions in a one to one chat. | ||
|
||
The following scenarios cover one to one chat flows with mutual contacts | ||
|
||
The feature start sequence is the following (setup on its own `bdd_hooks`): | ||
** given A first time user lands on the status desktop with the specific data folder "../../../fixtures/mutual_contacts" | ||
** when user logins with username "tester123" and password "TesTEr16843/!@00" | ||
** and the user lands on the signed in app | ||
|
||
[Cleanup] Also each scenario starts with: | ||
** when the user opens the chat section | ||
|
||
[Cleanup] Also each scenario ends with: | ||
** when the user leaves the current chat | ||
|
||
Scenario: The user can create a one to chat | ||
When the user creates a one to one chat with "Athletic" | ||
Then the chat title is "Athletic" | ||
When the user sends a chat message "Test message" | ||
Then the last chat message contains "Test message" |
8 changes: 8 additions & 0 deletions
8
test/ui-test/testSuites/suite_messaging/tst_OneToOneChatFlow/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