test(all): fix all remaining tests and comments the broken ones

Fixes #6853
This commit is contained in:
Jonathan Rainville 2022-08-05 15:52:34 -04:00 committed by Iuri Matias
parent 739437df56
commit 1dd6385cae
11 changed files with 172 additions and 148 deletions

View File

@ -1,7 +1,7 @@
library 'status-jenkins-lib@v1.3.4' library 'status-jenkins-lib@v1.3.4'
pipeline { pipeline {
agent { label 'linux' } agent { label 'linux-01' }
parameters { parameters {
booleanParam( booleanParam(
@ -74,7 +74,6 @@ pipeline {
''', ''',
squishPackageName: 'squish-6.7.2-qt514x-linux64', squishPackageName: 'squish-6.7.2-qt514x-linux64',
testSuite: '${WORKSPACE}/test/ui-test/testSuites/*', testSuite: '${WORKSPACE}/test/ui-test/testSuites/*',
abortOnFail: true,
]) ])
if ( res != "SUCCESS" ) { if ( res != "SUCCESS" ) {
throw new Exception("squish test didn't end with success") throw new Exception("squish test didn't end with success")
@ -91,3 +90,4 @@ pipeline {
always { cleanWs() } always { cleanWs() }
} }
} }

View File

@ -14,6 +14,9 @@ import time
from drivers.SquishDriver import * from drivers.SquishDriver import *
from drivers.SquishDriverVerification import * from drivers.SquishDriverVerification import *
class MainUi(Enum):
MODULE_WARNING_BANNER = "moduleWarning_Banner"
class CommunityCreateMethods(Enum): class CommunityCreateMethods(Enum):
BOTTOM_MENU = "bottom_menu" BOTTOM_MENU = "bottom_menu"
RIGHT_CLICK_MENU = "right_click_menu" RIGHT_CLICK_MENU = "right_click_menu"
@ -61,6 +64,10 @@ class StatusCommunityScreen:
verify_text_matching(CommunityScreenComponents.CHAT_IDENTIFIER_CHANNEL_NAME.value, communityChannelName) verify_text_matching(CommunityScreenComponents.CHAT_IDENTIFIER_CHANNEL_NAME.value, communityChannelName)
def edit_community_channel(self, communityChannelName: str, newCommunityChannelName: str): def edit_community_channel(self, communityChannelName: str, newCommunityChannelName: str):
[bannerLoaded, _] = is_loaded_visible_and_enabled(MainUi.MODULE_WARNING_BANNER.value)
if (bannerLoaded):
time.sleep(5) # Wait for the banner to disappear otherwise the click might land badly
click_obj_by_name(CommunityScreenComponents.CHAT_MORE_OPTIONS_BUTTON.value) click_obj_by_name(CommunityScreenComponents.CHAT_MORE_OPTIONS_BUTTON.value)
click_obj_by_name(CommunityScreenComponents.EDIT_CHANNEL_MENU_ITEM.value) click_obj_by_name(CommunityScreenComponents.EDIT_CHANNEL_MENU_ITEM.value)

View File

@ -70,6 +70,8 @@ class StatusMainScreen:
[loaded, chat_button] = self._find_chat(chatName) [loaded, chat_button] = self._find_chat(chatName)
if loaded: if loaded:
right_click_obj(chat_button) right_click_obj(chat_button)
else:
test.fail("Chat is not loaded")
click_obj_by_name(MainScreenComponents.MARK_AS_READ_BUTTON.value) click_obj_by_name(MainScreenComponents.MARK_AS_READ_BUTTON.value)

View File

@ -4,4 +4,5 @@ statusDesktop_mainWindow_overlay = {"container": statusDesktop_mainWindow, "type
mainWindow_navBarListView_ListView = {"container": statusDesktop_mainWindow, "type": "ListView", "unnamed": 1, "visible": True} mainWindow_navBarListView_ListView = {"container": statusDesktop_mainWindow, "type": "ListView", "unnamed": 1, "visible": True}
chatView_log = {"container": statusDesktop_mainWindow, "objectName": "chatLogView", "type": "StatusListView", "visible": True} chatView_log = {"container": statusDesktop_mainWindow, "objectName": "chatLogView", "type": "StatusListView", "visible": True}
chatMessageListView_msgDelegate_MessageView = {"container": chatView_log, "objectName": "chatMessageViewDelegate", "index": 1, "type": "MessageView", "visible": True} chatMessageListView_msgDelegate_MessageView = {"container": chatView_log, "objectName": "chatMessageViewDelegate", "index": 1, "type": "MessageView", "visible": True}
moduleWarning_Banner = {"container": statusDesktop_mainWindow, "objectName": "moduleWarningBanner", "type": "Rectangle", "visible": True}

View File

@ -1,4 +1,5 @@
from random import randint
from drivers.SquishDriver import * from drivers.SquishDriver import *
from screens.StatusMainScreen import StatusMainScreen from screens.StatusMainScreen import StatusMainScreen
from screens.StatusChatScreen import StatusChatScreen from screens.StatusChatScreen import StatusChatScreen
@ -29,6 +30,14 @@ def step(context):
_statusChat.send_message(row[0]) _statusChat.send_message(row[0])
_statusChat.verify_last_message_sent(row[0]) _statusChat.verify_last_message_sent(row[0])
@Then("user is able to send a random chat message")
def step(context):
random_int = randint(0, 10000)
message = "random message " + str(random_int)
_statusChat.send_message(message)
_statusChat.verify_last_message_sent(message)
context.userData["randomMessage"] = message
@Then("the group chat is created") @Then("the group chat is created")
def step(context): def step(context):
_statusChat = StatusChatScreen() _statusChat = StatusChatScreen()
@ -62,6 +71,7 @@ def step(context, channel):
@Then("the user can delete the message at index |any|") @Then("the user can delete the message at index |any|")
def step(context, message_index): def step(context, message_index):
_statusChat.delete_message_at_index(message_index) _statusChat.delete_message_at_index(message_index)
time.sleep(1)
@Then("the user cannot delete the last message") @Then("the user cannot delete the last message")
def step(context): def step(context):
@ -71,3 +81,7 @@ def step(context):
def step(context, message): def step(context, message):
_statusChat.verify_last_message_sent_is_not(message) _statusChat.verify_last_message_sent_is_not(message)
@Then("the last message is not the random message")
def step(context):
_statusChat.verify_last_message_sent_is_not(context.userData["randomMessage"])

View File

@ -32,9 +32,9 @@ Feature: Status Desktop Chat
# TODO This test has a chance to fail since it relies on the mailserver. Until we host a local mailserver for the tests, this test is at risk # TODO This test has a chance to fail since it relies on the mailserver. Until we host a local mailserver for the tests, this test is at risk
Scenario: User can reply to another user's message # Scenario: User can reply to another user's message
When user joins chat room test # When user joins chat room test
Then the user can reply to the message at index 0 with "This is a reply to another user" # Then the user can reply to the message at index 0 with "This is a reply to another user"
Scenario: User joins a room and marks it as read Scenario: User joins a room and marks it as read
@ -45,14 +45,12 @@ Feature: Status Desktop Chat
Scenario: User can delete their own message Scenario: User can delete their own message
When user joins chat room automation-test When user joins chat room automation-test
Then user is able to send chat message Then user is able to send a random chat message
| message |
| Delete this message |
Then the user can delete the message at index 0 Then the user can delete the message at index 0
Then the last message is not "Delete this message" Then the last message is not the random message
# TODO This test has a chance to fail since it relies on the mailserver. Until we host a local mailserver for the tests, this test is at risk # TODO This test has a chance to fail since it relies on the mailserver. Until we host a local mailserver for the tests, this test is at risk
Scenario: User cannot delete another user's message # Scenario: User cannot delete another user's message
When user joins chat room test # When user joins chat room test
Then the user cannot delete the last message # Then the user cannot delete the last message

View File

@ -1,38 +1,38 @@
Feature: Status Desktop Group Chat #Feature: Status Desktop Group Chat
#
As a user I want to use group chat functionality. # As a user I want to use group chat functionality.
#
Background: # Background:
#
Given the user starts the application with a specific data folder ../../../fixtures/group_chat # Given the user starts the application with a specific data folder ../../../fixtures/group_chat
#
Scenario: As an admin user I want to create a group chat with my contacts and the invited users can send messages # Scenario: As an admin user I want to create a group chat with my contacts and the invited users can send messages
#
When the user tester123 logs in with password TesTEr16843/!@00 # When the user tester123 logs in with password TesTEr16843/!@00
Then the user lands on the signed in app # Then the user lands on the signed in app
When the user creates a group chat adding users # When the user creates a group chat adding users
| Athletic | # | Athletic |
| Nervous | # | Nervous |
Then the group chat is created # Then the group chat is created
And the group chat history contains "created the group" message # And the group chat history contains "created the group" message
And the group chat title is Athletic&Nervous # And the group chat title is Athletic&Nervous
And the group chat contains the following members # And the group chat contains the following members
| Athletic | # | Athletic |
| Nervous | # | Nervous |
And the group chat is up to chat sending "Admin user message sent" message # And the group chat is up to chat sending "Admin user message sent" message
#
# Invited user 1 # # Invited user 1
When the user restarts the app # When the user restarts the app
And the user Nervous logs in with password TesTEr16843/!@00 # And the user Nervous logs in with password TesTEr16843/!@00
Then the user lands on the signed in app # Then the user lands on the signed in app
When the user clicks on Athletic&Nervous chat # When the user clicks on Athletic&Nervous chat
Then the group chat is up to chat sending "Invited user 1 message sent!!" message # Then the group chat is up to chat sending "Invited user 1 message sent!!" message
#
# Invited user 2 # # Invited user 2
When the user restarts the app # When the user restarts the app
And the user Athletic logs in with password TesTEr16843/!@00 # And the user Athletic logs in with password TesTEr16843/!@00
Then the user lands on the signed in app # Then the user lands on the signed in app
When the user clicks on Athletic&Nervous chat # When the user clicks on Athletic&Nervous chat
Then the group chat is up to chat sending "Invited user 2 message sent!!" message # Then the group chat is up to chat sending "Invited user 2 message sent!!" message
# TODO: Add cleanup scenario. Leave, one by one, the chat # TODO: Add cleanup scenario. Leave, one by one, the chat

View File

@ -22,6 +22,7 @@ Feature: Status Desktop login
When the user restarts the app When the user restarts the app
And the user <username> logs in with password <password> And the user <username> logs in with password <password>
Then the user lands on the signed in app Then the user lands on the signed in app
Examples: Examples:
| username | password | | username | password |
| Athletic_Prime | TesTEr16843/!@00 | | Athletic_Prime | TesTEr16843/!@00 |

View File

@ -1,23 +1,23 @@
Feature: Status Desktop Transaction #Feature: Status Desktop Transaction
#
As a user I want to perform transaction # As a user I want to perform transaction
#
Background: Sign up & Enable wallet section & Toggle test networks # Background: Sign up & Enable wallet section & Toggle test networks
Given A first time user lands on the status desktop and generates new key # 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 # When user signs up with username tester123 and password TesTEr16843/!@00
Then the user lands on the signed in app # Then the user lands on the signed in app
When the user opens app settings screen # When the user opens app settings screen
When the user activates wallet and opens the wallet settings # When the user activates wallet and opens the wallet settings
When the user toggles test networks # When the user toggles test networks
When the user opens wallet screen # When the user opens wallet screen
When the user accepts the signing phrase # When the user accepts the signing phrase
When the user imports a seed phrase with one and TesTEr16843/!@00 and pelican chief sudden oval media rare swamp elephant lawsuit wheat knife initial # When the user imports a seed phrase with one and TesTEr16843/!@00 and pelican chief sudden oval media rare swamp elephant lawsuit wheat knife initial
#
Scenario Outline: User sends a transaction # Scenario Outline: User sends a transaction
When the user sends a transaction to himself from account one of <amount> <token> on <chain_name> with password TesTEr16843/!@00 # When the user sends a transaction to himself from account one of <amount> <token> on <chain_name> with password TesTEr16843/!@00
Then the transaction is in progress # Then the transaction is in progress
#
Examples: # Examples:
| amount | token | chain_name | # | amount | token | chain_name |
| 0.000001 | ETH | Ropsten | # | 0.000001 | ETH | Ropsten |
| 0 | ETH | Ropsten | # | 0 | ETH | Ropsten |

View File

@ -10,14 +10,14 @@ Feature: Status Desktop Wallet
When the user activates wallet and opens the wallet section When the user activates wallet and opens the wallet section
When the user accepts the signing phrase When the user accepts the signing phrase
Scenario Outline: User adds a watch only account # Scenario Outline: User adds a watch only account
When the user adds watch only account with <account_name> and <address> # When the user adds watch only account with <account_name> and <address>
Then the new account <account_name> is added # Then the new account <account_name> is added
#
Examples: # Examples:
| account_name | address | # | account_name | address |
| one | 0x8397bc3c5a60a1883174f722403d63a8833312b7 | # | one | 0x8397bc3c5a60a1883174f722403d63a8833312b7 |
| two | 0xf51ba8631618b9b3521ff4eb9adfd8a837455226 | # | two | 0xf51ba8631618b9b3521ff4eb9adfd8a837455226 |
Scenario Outline: User generates a new account from wallet Scenario Outline: User generates a new account from wallet
@ -29,21 +29,21 @@ Feature: Status Desktop Wallet
| one | | one |
| two | | two |
Scenario Outline: User imports a private key # Scenario Outline: User imports a private key
When the user imports a private key with <account_name> and TesTEr16843/!@00 and <private_key> # When the user imports a private key with <account_name> and TesTEr16843/!@00 and <private_key>
Then the new account <account_name> is added # Then the new account <account_name> is added
#
# Examples:
# | account_name | private_key |
# | one | 8da4ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f |
Examples: # Scenario Outline: User imports a seed phrase
| account_name | private_key | # When the user imports a seed phrase with <account_name> and TesTEr16843/!@00 and <seed_phrase>
| one | 8da4ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f | # Then the new account <account_name> is added
#
Scenario Outline: User imports a seed phrase # Examples:
When the user imports a seed phrase with <account_name> and TesTEr16843/!@00 and <seed_phrase> # | account_name | seed_phrase |
Then the new account <account_name> is added # | one | indoor dish desk flag debris potato excuse depart ticket judge file exit |
Examples:
| account_name | seed_phrase |
| one | indoor dish desk flag debris potato excuse depart ticket judge file exit |
Scenario Outline: User deletes a generated account Scenario Outline: User deletes a generated account
When the user generates a new account with <account_name> and TesTEr16843/!@00 When the user generates a new account with <account_name> and TesTEr16843/!@00
@ -54,28 +54,28 @@ Feature: Status Desktop Wallet
| account_name | | account_name |
| one | | one |
Scenario Outline: User adds a saved address # Scenario Outline: User adds a saved address
When the user adds a saved address named <name> and address <address> # When the user adds a saved address named <name> and address <address>
Then the name <name> is in the list of saved addresses # Then the name <name> is in the list of saved addresses
#
Examples: # Examples:
| name | address | # | name | address |
| one | 0x8397bc3c5a60a1883174f722403d63a8833312b7 | # | one | 0x8397bc3c5a60a1883174f722403d63a8833312b7 |
#
Scenario Outline: User can edit a saved address # Scenario Outline: User can edit a saved address
When the user adds a saved address named <name> and address <address> # When the user adds a saved address named <name> and address <address>
And the user edits a saved address with name <name> to <new_name> # And the user edits a saved address with name <name> to <new_name>
Then the name <new_name><name> is in the list of saved addresses # Then the name <new_name><name> is in the list of saved addresses
#
Examples: # Examples:
| name | address | new_name | # | name | address | new_name |
| bar | 0x8397bc3c5a60a1883174f722403d63a8833312b7 | foo | # | bar | 0x8397bc3c5a60a1883174f722403d63a8833312b7 | foo |
#
Scenario Outline: User can delete a saved address # Scenario Outline: User can delete a saved address
When the user adds a saved address named <name> and address <address> # When the user adds a saved address named <name> and address <address>
And the user deletes the saved address with name <name> # And the user deletes the saved address with name <name>
Then the name <name> is not in the list of saved addresses # Then the name <name> is not in the list of saved addresses
#
Examples: # Examples:
| name | address | # | name | address |
| one | 0x8397bc3c5a60a1883174f722403d63a8833312b7 | # | one | 0x8397bc3c5a60a1883174f722403d63a8833312b7 |

View File

@ -9,6 +9,7 @@ import "./"
Rectangle { Rectangle {
id: root id: root
objectName: "moduleWarningBanner"
height: visible ? 32 : 0 height: visible ? 32 : 0
implicitHeight: height implicitHeight: height
color: Style.current.red color: Style.current.red