* Implement server changes for group messaging

* Majority of client-side implementation

* Some server updates

* Added new React multiselect component

* Fix style issues

* Add custom renderer for options

* Fix model test

* Update ENTER functionality for multiselect control

* Remove buttons from multiselect UI control

* Updating group messaging UI (#5524)

* Move filter controls up a component level

* Scroll with arrow keys

* Updating mobile layout for multiselect (#5534)

* Fix race condition when backspacing quickly

* Hidden or new GMs show up for regular messages

* Add overriding of number remaining text

* Add UI filtering for team if config setting set

* Add icon to channel switcher and class prop to status icon

* Minor updates per feedback

* Improving group messaging UI (#5563)

* UX changes per feedback

* Update email for group messages

* UI fixes for group messaging (#5587)

* Fix missing localization string

* Add maximum users message when adding members to GM

* Fix input clearing on Android

* Updating group messaging UI (#5603)

* Updating UI for group messaging (#5604)
Этот коммит содержится в:
Joram Wilander
2017-03-02 17:48:56 -05:00
коммит произвёл GitHub
родитель 8c5cee9521
Коммит 3a91d4e5e4
48 изменённых файлов: 1596 добавлений и 293 удалений

Просмотреть файл

@@ -219,6 +219,46 @@ func TestCreateDirectChannel(t *testing.T) {
}
}
func TestCreateGroupChannel(t *testing.T) {
th := Setup().InitBasic()
Client := th.BasicClient
user := th.BasicUser
user2 := th.BasicUser2
user3 := th.CreateUser(Client)
userIds := []string{user.Id, user2.Id, user3.Id}
var channel *model.Channel
if result, err := Client.CreateGroupChannel(userIds); err != nil {
t.Fatal(err)
} else {
channel = result.Data.(*model.Channel)
}
if channel.Type != model.CHANNEL_GROUP {
t.Fatal("channel type was not group")
}
// Don't fail on group channels already existing and return the original channel again
if result, err := Client.CreateGroupChannel(userIds); err != nil {
t.Fatal(err)
} else if result.Data.(*model.Channel).Id != channel.Id {
t.Fatal("didn't return original group channel when saving a duplicate")
}
if _, err := Client.CreateGroupChannel([]string{user.Id}); err == nil {
t.Fatal("should have failed with not enough users")
}
if _, err := Client.CreateGroupChannel([]string{}); err == nil {
t.Fatal("should have failed with not enough users")
}
if _, err := Client.CreateGroupChannel([]string{user.Id, user2.Id, user3.Id, "junk"}); err == nil {
t.Fatal("should have failed with non-existent user")
}
}
func TestUpdateChannel(t *testing.T) {
th := Setup().InitBasic().InitSystemAdmin()
Client := th.SystemAdminClient