fix(@desktop/profile): Can set own online state to online, offline
fixes #6895
This commit is contained in:
parent
38c77095b8
commit
289209f7ec
|
@ -233,7 +233,13 @@ proc prepareAccountSettingsJsonObject(self: Service, account: GeneratedAccountDt
|
||||||
"wallet/visible-tokens": {},
|
"wallet/visible-tokens": {},
|
||||||
"waku-enabled": true,
|
"waku-enabled": true,
|
||||||
"appearance": 0,
|
"appearance": 0,
|
||||||
"installation-id": installationId
|
"installation-id": installationId,
|
||||||
|
"current-user-status": %* {
|
||||||
|
"publicKey": account.derivedAccounts.whisper.publicKey,
|
||||||
|
"statusType": 1,
|
||||||
|
"clock": 0,
|
||||||
|
"text": ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc getAccountSettings(self: Service, accountId: string,
|
proc getAccountSettings(self: Service, accountId: string,
|
||||||
|
@ -384,7 +390,13 @@ proc setupAccountKeycard*(self: Service, keycardData: KeycardEvent) =
|
||||||
"wallet/visible-tokens": {},
|
"wallet/visible-tokens": {},
|
||||||
"waku-enabled": true,
|
"waku-enabled": true,
|
||||||
"appearance": 0,
|
"appearance": 0,
|
||||||
"installation-id": installationId
|
"installation-id": installationId,
|
||||||
|
"current-user-status": {
|
||||||
|
"publicKey": keycardData.whisperKey.publicKey,
|
||||||
|
"statusType": 1,
|
||||||
|
"clock": 0,
|
||||||
|
"text": ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.addKeycardDetails(settingsJson, accountDataJson)
|
self.addKeycardDetails(settingsJson, accountDataJson)
|
||||||
|
|
|
@ -27,6 +27,7 @@ class MainScreenComponents(Enum):
|
||||||
MARK_AS_READ_BUTTON = "mark_as_Read_StatusMenuItemDelegate"
|
MARK_AS_READ_BUTTON = "mark_as_Read_StatusMenuItemDelegate"
|
||||||
COMMUNITY_NAVBAR_BUTTONS = "navBarListView_All_Community_Buttons"
|
COMMUNITY_NAVBAR_BUTTONS = "navBarListView_All_Community_Buttons"
|
||||||
MODULE_WARNING_BANNER = "moduleWarning_Banner"
|
MODULE_WARNING_BANNER = "moduleWarning_Banner"
|
||||||
|
PROFILE_NAVBAR_BUTTON = "mainWindow_ProfileNavBarButton"
|
||||||
|
|
||||||
class ChatNamePopUp(Enum):
|
class ChatNamePopUp(Enum):
|
||||||
CHAT_NAME_TEXT = "chat_name_PlaceholderText"
|
CHAT_NAME_TEXT = "chat_name_PlaceholderText"
|
||||||
|
@ -90,4 +91,8 @@ class StatusMainScreen:
|
||||||
|
|
||||||
def verify_communities_count(self, expected_count: int):
|
def verify_communities_count(self, expected_count: int):
|
||||||
objects = get_objects(MainScreenComponents.COMMUNITY_NAVBAR_BUTTONS.value)
|
objects = get_objects(MainScreenComponents.COMMUNITY_NAVBAR_BUTTONS.value)
|
||||||
verify_equals(len(objects), int(expected_count))
|
verify_equals(len(objects), int(expected_count))
|
||||||
|
|
||||||
|
def user_is_online(self):
|
||||||
|
profileButton = squish.waitForObject(getattr(names, MainScreenComponents.PROFILE_NAVBAR_BUTTON.value))
|
||||||
|
verify_equal(profileButton.badge.color.name, "#4ebc60", "The user is not online by default")
|
||||||
|
|
|
@ -8,6 +8,7 @@ moduleWarning_Banner = {"container": statusDesktop_mainWindow, "objectName": "mo
|
||||||
statusDesktop_mainWindow_AppMain_EmojiPopup_SearchTextInput = {"container": statusDesktop_mainWindow_overlay, "objectName": "StatusEmojiPopup_searchBox", "type": "TextEdit", "visible": True}
|
statusDesktop_mainWindow_AppMain_EmojiPopup_SearchTextInput = {"container": statusDesktop_mainWindow_overlay, "objectName": "StatusEmojiPopup_searchBox", "type": "TextEdit", "visible": True}
|
||||||
mainWindow_ScrollView = {"container": statusDesktop_mainWindow, "type": "StatusScrollView", "unnamed": 1, "visible": True}
|
mainWindow_ScrollView = {"container": statusDesktop_mainWindow, "type": "StatusScrollView", "unnamed": 1, "visible": True}
|
||||||
mainWindow_ScrollView_2 = {"container": statusDesktop_mainWindow, "occurrence": 2, "type": "StatusScrollView", "unnamed": 1, "visible": True}
|
mainWindow_ScrollView_2 = {"container": statusDesktop_mainWindow, "occurrence": 2, "type": "StatusScrollView", "unnamed": 1, "visible": True}
|
||||||
|
mainWindow_ProfileNavBarButton = {"container": statusDesktop_mainWindow, "objectName": "statusProfileNavBarTabButton", "type": "StatusNavBarTabButton", "visible": True}
|
||||||
|
|
||||||
# popups
|
# popups
|
||||||
close_popup_StatusFlatRoundButton = {"container": statusDesktop_mainWindow_overlay, "id": "closeButton", "type": "StatusFlatRoundButton", "unnamed": 1, "visible": True}
|
close_popup_StatusFlatRoundButton = {"container": statusDesktop_mainWindow_overlay, "id": "closeButton", "type": "StatusFlatRoundButton", "unnamed": 1, "visible": True}
|
||||||
|
|
|
@ -2,6 +2,8 @@ from screens.StatusWelcomeScreen import StatusWelcomeScreen
|
||||||
from screens.StatusMainScreen import StatusMainScreen
|
from screens.StatusMainScreen import StatusMainScreen
|
||||||
|
|
||||||
_welcomeScreen = StatusWelcomeScreen()
|
_welcomeScreen = StatusWelcomeScreen()
|
||||||
|
_mainScreen = StatusMainScreen()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@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")
|
||||||
|
@ -30,7 +32,7 @@ def step(context, username):
|
||||||
|
|
||||||
@Then("the user lands on the signed in app")
|
@Then("the user lands on the signed in app")
|
||||||
def step(context):
|
def step(context):
|
||||||
StatusMainScreen()
|
_mainScreen
|
||||||
|
|
||||||
|
|
||||||
@When("The user inputs the seed phrase |any|")
|
@When("The user inputs the seed phrase |any|")
|
||||||
|
@ -40,4 +42,8 @@ def step(context, seed_phrase):
|
||||||
|
|
||||||
@Then("the invalid seed text is visible")
|
@Then("the invalid seed text is visible")
|
||||||
def step(context):
|
def step(context):
|
||||||
_welcomeScreen.seed_phrase_visible()
|
_welcomeScreen.seed_phrase_visible()
|
||||||
|
|
||||||
|
@Then("the user is online")
|
||||||
|
def step(context):
|
||||||
|
_mainScreen.user_is_online()
|
||||||
|
|
|
@ -131,3 +131,7 @@ Feature: Status Desktop Sign Up
|
||||||
Then the following ui-component seedPhraseView_Submit_Button is not enabled
|
Then the following ui-component seedPhraseView_Submit_Button is not enabled
|
||||||
And the invalid seed text is visible
|
And the invalid seed text is visible
|
||||||
|
|
||||||
|
Scenario: After Signing up the Profile state should be online
|
||||||
|
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
|
||||||
|
Then the user is online
|
|
@ -348,6 +348,7 @@ Item {
|
||||||
|
|
||||||
navBarProfileButton: StatusNavBarTabButton {
|
navBarProfileButton: StatusNavBarTabButton {
|
||||||
id: profileButton
|
id: profileButton
|
||||||
|
objectName: "statusProfileNavBarTabButton"
|
||||||
property bool opened: false
|
property bool opened: false
|
||||||
|
|
||||||
name: appMain.rootStore.userProfileInst.name
|
name: appMain.rootStore.userProfileInst.name
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 25a80cf20b2fd6153eccdb3cd154126181b86561
|
Subproject commit ef21440e320d21ed0ad26cb3506d3d93ce5671be
|
Loading…
Reference in New Issue