-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing context menu on right click in the community column + tests #6641
Conversation
@noelia-santos you are the tester for this one |
Jenkins BuildsClick to see older builds (3)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but 2 small suggestions added
onTriggered: Global.openPopup(createCategoryPopup) | ||
adminPopupMenu.showInviteButton = false | ||
adminPopupMenu.popup() | ||
adminPopupMenu.y = Qt.binding(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be slightly more concise with the new notation:
adminPopupMenu.y = Qt.binding(() =>
root.height - adminPopupMenu.height - createChannelOrCategoryBtn.height - 20
)
StatusPopupMenu { | ||
property bool showInviteButton: false | ||
|
||
id: adminPopupMenu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep id first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Some minor comments that you can decide if you want to address here or in a different discuss it in a different task!
@@ -34,21 +34,23 @@ Feature: Status Desktop community | |||
Scenario Outline: Admin creates a community channel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some identation issues in the previous examples (User creates a community) scenario
|
||
Scenario Outline: Admin edits 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 test-channel, with description My description | ||
When the admin creates a community channel named test-channel, with description My description with the method bottom_menu | ||
Then the user lands on the community channel named test-channel | ||
When the admin edits a community channel named <community_channel_name> to the name <new_community_channel_name> | ||
Then the user lands on the community channel named <new_community_channel_name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking here we can add more validations, maybe in a separated task. I did some of them in the "create group chat" task, so we can take profit of some methods there and test if the toolbar name is the channel expected name, if the chat history title corresponds with the channel name and so on!
@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) | ||
@When("the admin creates a community channel named |any|, with description |any| with the method |any|") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another comment related to validation.. maybe we can add some validation regarding the admin user.. Can we verify the community channel is created BY THE ADMIN??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. Technically, a user could not create a channel, so we can do another test later where a user joins a community and test if they can create a channel (they shouldn't be able to).
def create_community_channel(self, communityChannelName: str, communityChannelDescription: str): | ||
click_obj_by_name(CommunityScreenComponents.COMMUNITY_CREATE_CHANNEL_OR_CAT_BUTTON.value) | ||
def create_community_channel(self, communityChannelName: str, communityChannelDescription: str, method: str): | ||
if (method == "bottom_menu"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it make sense to use an enum here instead of a string?
5bdedfb
to
5c91ec2
Compare
Fixes #6609 The menu was lost because it used to be set as part of the ScrollView background, but it got changed to a Flickable as part of the fix to the scrolls being not smooth. Anyway, background doesn't exist on Flickables, so I removed it and moved the MouseArea to the CommunityColumnView instead.
5c91ec2
to
6f17084
Compare
Fixes #6609
The menu was lost because it used to be set as part of the ScrollView background, but it got changed to a Flickable as part of the fix to the scrolls being not smooth.
Anyway, background doesn't exist on Flickables, so I removed it and moved the MouseArea to the CommunityColumnView instead.
Second commit adds integration tests
StatusQ PR: status-im/StatusQ#802