MM-12843 Add interactive dialogs (#9816)

* Add interactive dialogs

* Fix unit test

* Updates per feedback

* Fix typo

* Updates per feedback, add icon_url and error returns

* Updates per feedback

* Update per feedback
Этот коммит содержится в:
Joram Wilander
2018-11-19 15:27:17 -05:00
коммит произвёл GitHub
родитель 7a6f957638
Коммит 8cfca681b0
23 изменённых файлов: 1286 добавлений и 516 удалений

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

@@ -9,6 +9,7 @@ import (
"net/url"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/model"
@@ -508,7 +509,9 @@ func TestExecuteGetCommand(t *testing.T) {
commandResponse, resp := Client.ExecuteCommand(channel.Id, "/getcommand")
CheckNoError(t, resp)
assert.True(t, len(commandResponse.TriggerId) == 26)
expectedCommandResponse.TriggerId = commandResponse.TriggerId
expectedCommandResponse.Props["from_webhook"] = "true"
require.Equal(t, expectedCommandResponse, commandResponse)
}
@@ -566,7 +569,9 @@ func TestExecutePostCommand(t *testing.T) {
commandResponse, resp := Client.ExecuteCommand(channel.Id, "/postcommand")
CheckNoError(t, resp)
assert.True(t, len(commandResponse.TriggerId) == 26)
expectedCommandResponse.TriggerId = commandResponse.TriggerId
expectedCommandResponse.Props["from_webhook"] = "true"
require.Equal(t, expectedCommandResponse, commandResponse)