MM-15219 Add support for introduction text in interactive dial… (#12029)
Этот коммит содержится в:
коммит произвёл
Ben Schumacher
родитель
a5f04802e8
Коммит
98489b9e67
@@ -142,8 +142,20 @@ func TestOpenDialog(t *testing.T) {
|
||||
CheckBadRequestStatus(t, resp)
|
||||
assert.False(t, pass)
|
||||
|
||||
// Should pass with no elements
|
||||
// Should pass with markdown formatted introduction text
|
||||
request.URL = "http://localhost:8065"
|
||||
request.Dialog.IntroductionText = "**Some** _introduction text"
|
||||
pass, resp = Client.OpenInteractiveDialog(request)
|
||||
CheckNoError(t, resp)
|
||||
assert.True(t, pass)
|
||||
|
||||
// Should pass with empty introduction text
|
||||
request.Dialog.IntroductionText = ""
|
||||
pass, resp = Client.OpenInteractiveDialog(request)
|
||||
CheckNoError(t, resp)
|
||||
assert.True(t, pass)
|
||||
|
||||
// Should pass with no elements
|
||||
request.Dialog.Elements = nil
|
||||
pass, resp = Client.OpenInteractiveDialog(request)
|
||||
CheckNoError(t, resp)
|
||||
|
||||
@@ -178,13 +178,14 @@ type PostActionAPIResponse struct {
|
||||
}
|
||||
|
||||
type Dialog struct {
|
||||
CallbackId string `json:"callback_id"`
|
||||
Title string `json:"title"`
|
||||
IconURL string `json:"icon_url"`
|
||||
Elements []DialogElement `json:"elements"`
|
||||
SubmitLabel string `json:"submit_label"`
|
||||
NotifyOnCancel bool `json:"notify_on_cancel"`
|
||||
State string `json:"state"`
|
||||
CallbackId string `json:"callback_id"`
|
||||
Title string `json:"title"`
|
||||
IntroductionText string `json:"introduction_text"`
|
||||
IconURL string `json:"icon_url"`
|
||||
Elements []DialogElement `json:"elements"`
|
||||
SubmitLabel string `json:"submit_label"`
|
||||
NotifyOnCancel bool `json:"notify_on_cancel"`
|
||||
State string `json:"state"`
|
||||
}
|
||||
|
||||
type DialogElement struct {
|
||||
|
||||
Ссылка в новой задаче
Block a user