parent
120f6517c9
commit
8e96e6879c
|
@ -10,7 +10,6 @@ class MainCommunityPortalScreen(Enum):
|
||||||
|
|
||||||
|
|
||||||
class CreateCommunityPopup(Enum):
|
class CreateCommunityPopup(Enum):
|
||||||
SCROLL_BAR: str = "mainWallet_Add_Account_Popup_Main"
|
|
||||||
COMMUNITY_NAME_INPUT: str = "createCommunityNameInput_TextEdit"
|
COMMUNITY_NAME_INPUT: str = "createCommunityNameInput_TextEdit"
|
||||||
COMMUNITY_DESCRIPTION_INPUT: str = "createCommunityDescriptionInput_TextEdit"
|
COMMUNITY_DESCRIPTION_INPUT: str = "createCommunityDescriptionInput_TextEdit"
|
||||||
NEXT_SCREEN_BUTTON: str = "createCommunityNextBtn_StatusButton"
|
NEXT_SCREEN_BUTTON: str = "createCommunityNextBtn_StatusButton"
|
||||||
|
@ -24,7 +23,7 @@ class StatusCommunityPortalScreen:
|
||||||
verify_screen(MainCommunityPortalScreen.CREATE_COMMUNITY_BUTTON.value)
|
verify_screen(MainCommunityPortalScreen.CREATE_COMMUNITY_BUTTON.value)
|
||||||
|
|
||||||
|
|
||||||
def createCommunity(self, communityName: str, communityDescription: str, introMessage: str, outroMessage: str):
|
def create_community(self, communityName: str, communityDescription: str, introMessage: str, outroMessage: str):
|
||||||
click_obj_by_name(MainCommunityPortalScreen.CREATE_COMMUNITY_BUTTON.value)
|
click_obj_by_name(MainCommunityPortalScreen.CREATE_COMMUNITY_BUTTON.value)
|
||||||
|
|
||||||
type(CreateCommunityPopup.COMMUNITY_NAME_INPUT.value, communityName)
|
type(CreateCommunityPopup.COMMUNITY_NAME_INPUT.value, communityName)
|
||||||
|
|
|
@ -13,14 +13,36 @@ from enum import Enum
|
||||||
from drivers.SquishDriver import *
|
from drivers.SquishDriver import *
|
||||||
from drivers.SquishDriverVerification import *
|
from drivers.SquishDriverVerification import *
|
||||||
|
|
||||||
|
|
||||||
class CommunityScreenComponents(Enum):
|
class CommunityScreenComponents(Enum):
|
||||||
COMMUNITY_HEADER_BUTTON = "mainWindow_communityHeader_StatusChatInfoButton"
|
COMMUNITY_HEADER_BUTTON = "mainWindow_communityHeader_StatusChatInfoButton"
|
||||||
COMMUNITY_HEADER_NAME_TEXT= "community_ChatInfo_Name_Text"
|
COMMUNITY_HEADER_NAME_TEXT= "community_ChatInfo_Name_Text"
|
||||||
|
COMMUNITY_CREATE_CHANNEL_OR_CAT_BUTTON = "mainWindow_createChannelOrCategoryBtn_StatusBaseText"
|
||||||
|
COMMUNITY_CREATE_CHANNEL__MENU_ITEM = "create_channel_StatusMenuItemDelegate"
|
||||||
|
COMMUNITY_CREATE_CATEGORY__MENU_ITEM = "create_category_StatusMenuItemDelegate"
|
||||||
|
CHAT_IDENTIFIER_CHANNEL_NAME = "msgDelegate_channelIdentifierNameText_StyledText"
|
||||||
|
|
||||||
|
class CreateCommunityChannelPopup(Enum):
|
||||||
|
COMMUNITY_CHANNEL_NAME_INPUT: str = "createCommunityChannelNameInput_TextEdit"
|
||||||
|
COMMUNITY_CHANNEL_DESCRIPTION_INPUT: str = "createCommunityChannelDescriptionInput_TextEdit"
|
||||||
|
COMMUNITY_CHANNEL_BUTTON: str = "createCommunityChannelBtn_StatusButton"
|
||||||
|
|
||||||
class StatusCommunityScreen:
|
class StatusCommunityScreen:
|
||||||
|
|
||||||
def __init__(self, communityName):
|
def __init__(self):
|
||||||
verify_screen(CommunityScreenComponents.COMMUNITY_HEADER_BUTTON.value)
|
verify_screen(CommunityScreenComponents.COMMUNITY_HEADER_BUTTON.value)
|
||||||
|
|
||||||
|
def verify_community_name(self, communityName: str):
|
||||||
verify_text_matching(CommunityScreenComponents.COMMUNITY_HEADER_NAME_TEXT.value, communityName)
|
verify_text_matching(CommunityScreenComponents.COMMUNITY_HEADER_NAME_TEXT.value, communityName)
|
||||||
|
|
||||||
|
def create_community_channel(self, communityChannelName: str, communityChannelDescription: str):
|
||||||
|
click_obj_by_name(CommunityScreenComponents.COMMUNITY_CREATE_CHANNEL_OR_CAT_BUTTON.value)
|
||||||
|
click_obj_by_name(CommunityScreenComponents.COMMUNITY_CREATE_CHANNEL__MENU_ITEM.value)
|
||||||
|
|
||||||
|
type(CreateCommunityChannelPopup.COMMUNITY_CHANNEL_NAME_INPUT.value, communityChannelName)
|
||||||
|
type(CreateCommunityChannelPopup.COMMUNITY_CHANNEL_DESCRIPTION_INPUT.value, communityChannelDescription)
|
||||||
|
click_obj_by_name(CreateCommunityChannelPopup.COMMUNITY_CHANNEL_BUTTON.value)
|
||||||
|
|
||||||
|
def verify_channel_name(self, communityChannelName: str):
|
||||||
|
verify_text_matching(CommunityScreenComponents.CHAT_IDENTIFIER_CHANNEL_NAME.value, communityChannelName)
|
||||||
|
|
||||||
|
|
|
@ -160,8 +160,18 @@ createCommunityIntroMessageInput_TextEdit = {"container": statusDesktop_mainWind
|
||||||
createCommunityOutroMessageInput_TextEdit = {"container": statusDesktop_mainWindow_overlay, "objectName": "createCommunityOutroMessageInput", "type": "TextEdit", "visible": True}
|
createCommunityOutroMessageInput_TextEdit = {"container": statusDesktop_mainWindow_overlay, "objectName": "createCommunityOutroMessageInput", "type": "TextEdit", "visible": True}
|
||||||
createCommunityNextBtn_StatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "createCommunityNextBtn", "type": "StatusButton", "visible": True}
|
createCommunityNextBtn_StatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "createCommunityNextBtn", "type": "StatusButton", "visible": True}
|
||||||
createCommunityFinalBtn_StatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "createCommunityFinalBtn", "type": "StatusButton", "visible": True}
|
createCommunityFinalBtn_StatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "createCommunityFinalBtn", "type": "StatusButton", "visible": True}
|
||||||
mainWindow_communityHeader_StatusChatInfoButton = {"container": statusDesktop_mainWindow, "id": "communityHeader", "type": "StatusChatInfoButton", "unnamed": 1, "visible": True}
|
mainWindow_createChannelOrCategoryBtn_StatusBaseText = {"container": statusDesktop_mainWindow, "objectName": "createChannelOrCategoryBtn", "type": "StatusBaseText", "visible": True}
|
||||||
|
create_channel_StatusMenuItemDelegate = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "enabled": True, "objectName": "createCommunityChannelBtn", "type": "StatusMenuItemDelegate", "visible": True}
|
||||||
|
create_category_StatusMenuItemDelegate = {"checkable": False, "container": statusDesktop_mainWindow_overlay, "enabled": True, "objectName": "createCommunityCategoryBtn", "type": "StatusMenuItemDelegate", "visible": True}
|
||||||
|
createCommunityChannelNameInput_TextEdit = {"container": statusDesktop_mainWindow_overlay, "objectName": "createCommunityChannelNameInput", "type": "TextEdit", "visible": True}
|
||||||
|
createCommunityChannelDescriptionInput_TextEdit = {"container": statusDesktop_mainWindow_overlay, "objectName": "createCommunityChannelDescriptionInput", "type": "TextEdit", "visible": True}
|
||||||
|
createCommunityChannelBtn_StatusButton = {"container": statusDesktop_mainWindow_overlay, "objectName": "createCommunityChannelBtn", "type": "StatusButton", "visible": True}
|
||||||
|
channel_Header_chat_title_StatusBaseText = {"container": statusDesktop_mainWindow, "objectName": "chatInfoNameText", "type": "StatusBaseText", "visible": True}
|
||||||
|
mainWindow_communityHeader_StatusChatInfoButton = {"container": statusDesktop_mainWindow, "objectName": "communityHeaderButton", "type": "StatusChatInfoButton", "visible": True}
|
||||||
community_ChatInfo_Name_Text = {"container": mainWindow_communityHeader_StatusChatInfoButton, "objectName": "statusChatInfoButtonNameText", "type": "StatusBaseText", "visible": True}
|
community_ChatInfo_Name_Text = {"container": mainWindow_communityHeader_StatusChatInfoButton, "objectName": "statusChatInfoButtonNameText", "type": "StatusBaseText", "visible": True}
|
||||||
|
mainWindow_chatMessageListView_ListView = {"container": statusDesktop_mainWindow, "objectName": "chatMessageListView", "type": "ListView", "visible": True}
|
||||||
|
chatMessageListView_msgDelegate_MessageView = {"container": mainWindow_chatMessageListView_ListView, "objectName": "chatMessageViewDelegate", "index": 1, "type": "MessageView", "visible": True}
|
||||||
|
msgDelegate_channelIdentifierNameText_StyledText = {"container": chatMessageListView_msgDelegate_MessageView, "objectName": "channelIdentifierNameText", "type": "StyledText", "visible": True}
|
||||||
|
|
||||||
navBarListView_Wallet_navbar_StatusNavBarTabButton = {"checkable": True, "container": mainWindow_navBarListView_ListView, "objectName": "Wallet-navbar", "type": "StatusNavBarTabButton", "visible": True}
|
navBarListView_Wallet_navbar_StatusNavBarTabButton = {"checkable": True, "container": mainWindow_navBarListView_ListView, "objectName": "Wallet-navbar", "type": "StatusNavBarTabButton", "visible": True}
|
||||||
wallet_navbar_wallet_icon_StatusIcon = {"container": navBarListView_Wallet_navbar_StatusNavBarTabButton, "objectName": "wallet-icon", "type": "StatusIcon", "visible": True}
|
wallet_navbar_wallet_icon_StatusIcon = {"container": navBarListView_Wallet_navbar_StatusNavBarTabButton, "objectName": "wallet-icon", "type": "StatusIcon", "visible": True}
|
||||||
|
|
|
@ -3,6 +3,7 @@ from screens.StatusMainScreen import StatusMainScreen
|
||||||
from screens.StatusCommunityPortalScreen import StatusCommunityPortalScreen
|
from screens.StatusCommunityPortalScreen import StatusCommunityPortalScreen
|
||||||
from screens.StatusCommunityScreen import StatusCommunityScreen
|
from screens.StatusCommunityScreen import StatusCommunityScreen
|
||||||
|
|
||||||
|
_statusCommunityScreen = StatusCommunityScreen()
|
||||||
_statusCommunitityPortal = StatusCommunityPortalScreen()
|
_statusCommunitityPortal = StatusCommunityPortalScreen()
|
||||||
_statusMainScreen = StatusMainScreen()
|
_statusMainScreen = StatusMainScreen()
|
||||||
|
|
||||||
|
@ -17,9 +18,17 @@ def step(context):
|
||||||
|
|
||||||
@When("the user creates a community named |any|, with description |any|, intro |any| and outro |any|")
|
@When("the user creates a community named |any|, with description |any|, intro |any| and outro |any|")
|
||||||
def step(context, community_name, community_description, community_intro, community_outro):
|
def step(context, community_name, community_description, community_intro, community_outro):
|
||||||
_statusCommunitityPortal.createCommunity(community_name, community_description, community_intro, community_outro)
|
_statusCommunitityPortal.create_community(community_name, community_description, community_intro, community_outro)
|
||||||
|
|
||||||
|
|
||||||
@Then("the user lands on the community named |any|")
|
@Then("the user lands on the community named |any|")
|
||||||
def step(context, community_name):
|
def step(context, community_name):
|
||||||
StatusCommunityScreen(community_name)
|
StatusCommunityScreen()
|
||||||
|
_statusCommunityScreen.verify_community_name(community_name)
|
||||||
|
|
||||||
|
@When("the admin creates a community channel named |any|, with description |any|")
|
||||||
|
def step(context, community_channel_name, community_channel_description):
|
||||||
|
_statusCommunityScreen.create_community_channel(community_channel_name, community_channel_description)
|
||||||
|
|
||||||
|
@Then("the user lands on the community channel named |any|")
|
||||||
|
def step(context, community_channel_name):
|
||||||
|
_statusCommunityScreen.verify_channel_name(community_channel_name)
|
|
@ -4,6 +4,6 @@ HOOK_SUB_PROCESSES=false
|
||||||
IMPLICITAUTSTART=0
|
IMPLICITAUTSTART=0
|
||||||
LANGUAGE=Python
|
LANGUAGE=Python
|
||||||
OBJECTMAPSTYLE=script
|
OBJECTMAPSTYLE=script
|
||||||
TEST_CASES=tst_statusLoginPassword tst_basicChatFlow tst_wallet tst_createCommunity
|
TEST_CASES=tst_statusLoginPassword tst_basicChatFlow tst_wallet tst_communityFlows
|
||||||
VERSION=3
|
VERSION=3
|
||||||
WRAPPERS=Qt
|
WRAPPERS=Qt
|
||||||
|
|
|
@ -13,7 +13,7 @@ Feature: Status Desktop community
|
||||||
|
|
||||||
As a user I want to create a community and chat
|
As a user I want to create a community and chat
|
||||||
|
|
||||||
The following scenarios cover basic flows of creating a community
|
The following scenarios cover basic flows of a community
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
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
|
||||||
|
@ -29,3 +29,15 @@ Feature: Status Desktop community
|
||||||
Examples:
|
Examples:
|
||||||
| community_name | community_description | community_intro | community_outro |
|
| community_name | community_description | community_intro | community_outro |
|
||||||
| testCommunity1 | Community tested 1 | My intro for the community | My community outro |
|
| testCommunity1 | Community tested 1 | My intro for the community | My community outro |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario Outline: Admin creates a community channel
|
||||||
|
When the user creates a community named myCommunity, with description My community description, intro Community Intro and outro Community Outro
|
||||||
|
Then the user lands on the community named myCommunity
|
||||||
|
When the admin creates a community channel named <community_channel_name>, with description <community_channel_description>
|
||||||
|
Then the user lands on the community channel named <community_channel_name>
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
| community_channel_name | community_channel_description |
|
||||||
|
| test-channel | Community channel description tested 1 |
|
||||||
|
|
|
@ -102,6 +102,7 @@ StatusModal {
|
||||||
|
|
||||||
StatusInput {
|
StatusInput {
|
||||||
id: nameInput
|
id: nameInput
|
||||||
|
input.edit.objectName: "createCommunityChannelNameInput"
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
|
@ -208,6 +209,7 @@ StatusModal {
|
||||||
|
|
||||||
StatusInput {
|
StatusInput {
|
||||||
id: descriptionTextArea
|
id: descriptionTextArea
|
||||||
|
input.edit.objectName: "createCommunityChannelDescriptionInput"
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
|
@ -284,6 +286,7 @@ StatusModal {
|
||||||
|
|
||||||
rightButtons: [
|
rightButtons: [
|
||||||
StatusButton {
|
StatusButton {
|
||||||
|
objectName: "createCommunityChannelBtn"
|
||||||
enabled: isFormValid()
|
enabled: isFormValid()
|
||||||
text: isEdit ?
|
text: isEdit ?
|
||||||
qsTr("Save") :
|
qsTr("Save") :
|
||||||
|
|
|
@ -217,7 +217,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceComponent: ChatContentView {
|
sourceComponent: ChatContentView {
|
||||||
visible: !root.rootStore.openCreateChat
|
visible: !root.rootStore.openCreateChat && isActiveChannel
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
clip: true
|
clip: true
|
||||||
|
@ -274,7 +274,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceComponent: ChatContentView {
|
sourceComponent: ChatContentView {
|
||||||
visible: !root.rootStore.openCreateChat
|
visible: !root.rootStore.openCreateChat && isActiveChannel
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
clip: true
|
clip: true
|
||||||
|
|
|
@ -25,6 +25,7 @@ import "../stores"
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
|
objectName: "chatContentViewColumn"
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
// Important:
|
// Important:
|
||||||
|
@ -73,6 +74,7 @@ ColumnLayout {
|
||||||
id: statusChatInfoButton
|
id: statusChatInfoButton
|
||||||
|
|
||||||
StatusChatInfoButton {
|
StatusChatInfoButton {
|
||||||
|
objectName: "chatInfoBtnInHeader"
|
||||||
width: Math.min(implicitWidth, parent.width)
|
width: Math.min(implicitWidth, parent.width)
|
||||||
title: chatContentModule? chatContentModule.chatDetails.name : ""
|
title: chatContentModule? chatContentModule.chatDetails.name : ""
|
||||||
subTitle: {
|
subTitle: {
|
||||||
|
|
|
@ -97,6 +97,7 @@ Item {
|
||||||
|
|
||||||
StatusListView {
|
StatusListView {
|
||||||
id: chatLogView
|
id: chatLogView
|
||||||
|
objectName: "chatMessageListView"
|
||||||
anchors.top: loadingMessagesIndicator.bottom
|
anchors.top: loadingMessagesIndicator.bottom
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -243,6 +244,7 @@ Item {
|
||||||
|
|
||||||
delegate: MessageView {
|
delegate: MessageView {
|
||||||
id: msgDelegate
|
id: msgDelegate
|
||||||
|
objectName: "chatMessageViewDelegate"
|
||||||
|
|
||||||
store: root.store
|
store: root.store
|
||||||
messageStore: root.messageStore
|
messageStore: root.messageStore
|
||||||
|
|
|
@ -39,7 +39,7 @@ Item {
|
||||||
|
|
||||||
StatusChatInfoButton {
|
StatusChatInfoButton {
|
||||||
id: communityHeader
|
id: communityHeader
|
||||||
objectName: communityHeaderButton
|
objectName: "communityHeaderButton"
|
||||||
title: communityData.name
|
title: communityData.name
|
||||||
subTitle: communityData.members.count <= 1 ?
|
subTitle: communityData.members.count <= 1 ?
|
||||||
qsTr("1 Member") :
|
qsTr("1 Member") :
|
||||||
|
@ -484,6 +484,7 @@ Item {
|
||||||
active: communityData.amISectionAdmin
|
active: communityData.amISectionAdmin
|
||||||
sourceComponent: Component {
|
sourceComponent: Component {
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
|
objectName: "createChannelOrCategoryBtn"
|
||||||
color: Theme.palette.baseColor1
|
color: Theme.palette.baseColor1
|
||||||
height: visible ? implicitHeight : 0
|
height: visible ? implicitHeight : 0
|
||||||
text: qsTr("Create channel or category")
|
text: qsTr("Create channel or category")
|
||||||
|
@ -508,12 +509,14 @@ Item {
|
||||||
id: createChatOrCatMenu
|
id: createChatOrCatMenu
|
||||||
closePolicy: Popup.CloseOnPressOutsideParent
|
closePolicy: Popup.CloseOnPressOutsideParent
|
||||||
StatusMenuItem {
|
StatusMenuItem {
|
||||||
|
objectName: "createCommunityChannelBtn"
|
||||||
text: qsTr("Create channel")
|
text: qsTr("Create channel")
|
||||||
icon.name: "channel"
|
icon.name: "channel"
|
||||||
onTriggered: Global.openPopup(createChannelPopup)
|
onTriggered: Global.openPopup(createChannelPopup)
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusMenuItem {
|
StatusMenuItem {
|
||||||
|
objectName: "createCommunityCategoryBtn"
|
||||||
text: qsTr("Create category")
|
text: qsTr("Create category")
|
||||||
icon.name: "channel-category"
|
icon.name: "channel-category"
|
||||||
onTriggered: Global.openPopup(createCategoryPopup)
|
onTriggered: Global.openPopup(createCategoryPopup)
|
||||||
|
|
|
@ -42,6 +42,7 @@ Column {
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
id: channelName
|
id: channelName
|
||||||
|
objectName: "channelIdentifierNameText"
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
text: root.chatName
|
text: root.chatName
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
|
|
Loading…
Reference in New Issue