[MM-47055] Migrate "components/advanced_create_post/advanced_create_post.test.jsx" to Typescript (#24955)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a64bc3af7a
Коммит
c2a3ef6b3d
@@ -12,20 +12,37 @@ exports[`components/advanced_create_post Show tutorial 1`] = `
|
||||
applyMarkdown={[Function]}
|
||||
badConnection={false}
|
||||
canPost={true}
|
||||
canUploadFiles={true}
|
||||
canUploadFiles={false}
|
||||
channelId="owsyt8n43jfxjpzh9np93mx1wa"
|
||||
currentChannel={
|
||||
Object {
|
||||
"create_at": 0,
|
||||
"creator_id": "id",
|
||||
"delete_at": 0,
|
||||
"display_name": "name",
|
||||
"group_constrained": false,
|
||||
"header": "header",
|
||||
"id": "owsyt8n43jfxjpzh9np93mx1wa",
|
||||
"last_post_at": 0,
|
||||
"last_root_post_at": 0,
|
||||
"name": "DN",
|
||||
"purpose": "purpose",
|
||||
"scheme_id": "id",
|
||||
"team_id": "team_id",
|
||||
"type": "O",
|
||||
"update_at": 0,
|
||||
}
|
||||
}
|
||||
currentUserId="zaktnt8bpbgu8mb6ez9k64r7sa"
|
||||
disableSend={false}
|
||||
draft={
|
||||
Object {
|
||||
"channelId": "",
|
||||
"createAt": 0,
|
||||
"fileInfos": Array [],
|
||||
"message": "",
|
||||
"rootId": "",
|
||||
"updateAt": 0,
|
||||
"uploadsInProgress": Array [],
|
||||
}
|
||||
}
|
||||
@@ -65,7 +82,7 @@ exports[`components/advanced_create_post Show tutorial 1`] = `
|
||||
setShowPreview={[Function]}
|
||||
shouldShowPreview={false}
|
||||
showEmojiPicker={false}
|
||||
showSendTutorialTip={false}
|
||||
showSendTutorialTip={true}
|
||||
textboxRef={
|
||||
Object {
|
||||
"current": null,
|
||||
@@ -91,20 +108,37 @@ exports[`components/advanced_create_post should match snapshot for center textbo
|
||||
applyMarkdown={[Function]}
|
||||
badConnection={false}
|
||||
canPost={true}
|
||||
canUploadFiles={true}
|
||||
canUploadFiles={false}
|
||||
channelId="owsyt8n43jfxjpzh9np93mx1wa"
|
||||
currentChannel={
|
||||
Object {
|
||||
"create_at": 0,
|
||||
"creator_id": "id",
|
||||
"delete_at": 0,
|
||||
"display_name": "name",
|
||||
"group_constrained": false,
|
||||
"header": "header",
|
||||
"id": "owsyt8n43jfxjpzh9np93mx1wa",
|
||||
"last_post_at": 0,
|
||||
"last_root_post_at": 0,
|
||||
"name": "DN",
|
||||
"purpose": "purpose",
|
||||
"scheme_id": "id",
|
||||
"team_id": "team_id",
|
||||
"type": "O",
|
||||
"update_at": 0,
|
||||
}
|
||||
}
|
||||
currentUserId="zaktnt8bpbgu8mb6ez9k64r7sa"
|
||||
disableSend={false}
|
||||
draft={
|
||||
Object {
|
||||
"channelId": "",
|
||||
"createAt": 0,
|
||||
"fileInfos": Array [],
|
||||
"message": "",
|
||||
"rootId": "",
|
||||
"updateAt": 0,
|
||||
"uploadsInProgress": Array [],
|
||||
}
|
||||
}
|
||||
@@ -170,20 +204,37 @@ exports[`components/advanced_create_post should match snapshot when cannot post
|
||||
applyMarkdown={[Function]}
|
||||
badConnection={false}
|
||||
canPost={false}
|
||||
canUploadFiles={true}
|
||||
canUploadFiles={false}
|
||||
channelId="owsyt8n43jfxjpzh9np93mx1wa"
|
||||
currentChannel={
|
||||
Object {
|
||||
"create_at": 0,
|
||||
"creator_id": "id",
|
||||
"delete_at": 0,
|
||||
"display_name": "name",
|
||||
"group_constrained": false,
|
||||
"header": "header",
|
||||
"id": "owsyt8n43jfxjpzh9np93mx1wa",
|
||||
"last_post_at": 0,
|
||||
"last_root_post_at": 0,
|
||||
"name": "DN",
|
||||
"purpose": "purpose",
|
||||
"scheme_id": "id",
|
||||
"team_id": "team_id",
|
||||
"type": "O",
|
||||
"update_at": 0,
|
||||
}
|
||||
}
|
||||
currentUserId="zaktnt8bpbgu8mb6ez9k64r7sa"
|
||||
disableSend={false}
|
||||
draft={
|
||||
Object {
|
||||
"channelId": "",
|
||||
"createAt": 0,
|
||||
"fileInfos": Array [],
|
||||
"message": "",
|
||||
"rootId": "",
|
||||
"updateAt": 0,
|
||||
"uploadsInProgress": Array [],
|
||||
}
|
||||
}
|
||||
@@ -253,16 +304,33 @@ exports[`components/advanced_create_post should match snapshot when file upload
|
||||
channelId="owsyt8n43jfxjpzh9np93mx1wa"
|
||||
currentChannel={
|
||||
Object {
|
||||
"create_at": 0,
|
||||
"creator_id": "id",
|
||||
"delete_at": 0,
|
||||
"display_name": "name",
|
||||
"group_constrained": false,
|
||||
"header": "header",
|
||||
"id": "owsyt8n43jfxjpzh9np93mx1wa",
|
||||
"last_post_at": 0,
|
||||
"last_root_post_at": 0,
|
||||
"name": "DN",
|
||||
"purpose": "purpose",
|
||||
"scheme_id": "id",
|
||||
"team_id": "team_id",
|
||||
"type": "O",
|
||||
"update_at": 0,
|
||||
}
|
||||
}
|
||||
currentUserId="zaktnt8bpbgu8mb6ez9k64r7sa"
|
||||
disableSend={false}
|
||||
draft={
|
||||
Object {
|
||||
"channelId": "",
|
||||
"createAt": 0,
|
||||
"fileInfos": Array [],
|
||||
"message": "",
|
||||
"rootId": "",
|
||||
"updateAt": 0,
|
||||
"uploadsInProgress": Array [],
|
||||
}
|
||||
}
|
||||
@@ -328,20 +396,37 @@ exports[`components/advanced_create_post should match snapshot, can post; previe
|
||||
applyMarkdown={[Function]}
|
||||
badConnection={false}
|
||||
canPost={true}
|
||||
canUploadFiles={true}
|
||||
canUploadFiles={false}
|
||||
channelId="owsyt8n43jfxjpzh9np93mx1wa"
|
||||
currentChannel={
|
||||
Object {
|
||||
"create_at": 0,
|
||||
"creator_id": "id",
|
||||
"delete_at": 0,
|
||||
"display_name": "name",
|
||||
"group_constrained": false,
|
||||
"header": "header",
|
||||
"id": "owsyt8n43jfxjpzh9np93mx1wa",
|
||||
"last_post_at": 0,
|
||||
"last_root_post_at": 0,
|
||||
"name": "DN",
|
||||
"purpose": "purpose",
|
||||
"scheme_id": "id",
|
||||
"team_id": "team_id",
|
||||
"type": "O",
|
||||
"update_at": 0,
|
||||
}
|
||||
}
|
||||
currentUserId="zaktnt8bpbgu8mb6ez9k64r7sa"
|
||||
disableSend={false}
|
||||
draft={
|
||||
Object {
|
||||
"channelId": "",
|
||||
"createAt": 0,
|
||||
"fileInfos": Array [],
|
||||
"message": "",
|
||||
"rootId": "",
|
||||
"updateAt": 0,
|
||||
"uploadsInProgress": Array [],
|
||||
}
|
||||
}
|
||||
@@ -407,20 +492,37 @@ exports[`components/advanced_create_post should match snapshot, can post; previe
|
||||
applyMarkdown={[Function]}
|
||||
badConnection={false}
|
||||
canPost={true}
|
||||
canUploadFiles={true}
|
||||
canUploadFiles={false}
|
||||
channelId="owsyt8n43jfxjpzh9np93mx1wa"
|
||||
currentChannel={
|
||||
Object {
|
||||
"create_at": 0,
|
||||
"creator_id": "id",
|
||||
"delete_at": 0,
|
||||
"display_name": "name",
|
||||
"group_constrained": false,
|
||||
"header": "header",
|
||||
"id": "owsyt8n43jfxjpzh9np93mx1wa",
|
||||
"last_post_at": 0,
|
||||
"last_root_post_at": 0,
|
||||
"name": "DN",
|
||||
"purpose": "purpose",
|
||||
"scheme_id": "id",
|
||||
"team_id": "team_id",
|
||||
"type": "O",
|
||||
"update_at": 0,
|
||||
}
|
||||
}
|
||||
currentUserId="zaktnt8bpbgu8mb6ez9k64r7sa"
|
||||
disableSend={false}
|
||||
draft={
|
||||
Object {
|
||||
"channelId": "",
|
||||
"createAt": 0,
|
||||
"fileInfos": Array [],
|
||||
"message": "",
|
||||
"rootId": "",
|
||||
"updateAt": 0,
|
||||
"uploadsInProgress": Array [],
|
||||
}
|
||||
}
|
||||
@@ -486,20 +588,37 @@ exports[`components/advanced_create_post should match snapshot, cannot post; pre
|
||||
applyMarkdown={[Function]}
|
||||
badConnection={false}
|
||||
canPost={false}
|
||||
canUploadFiles={true}
|
||||
canUploadFiles={false}
|
||||
channelId="owsyt8n43jfxjpzh9np93mx1wa"
|
||||
currentChannel={
|
||||
Object {
|
||||
"create_at": 0,
|
||||
"creator_id": "id",
|
||||
"delete_at": 0,
|
||||
"display_name": "name",
|
||||
"group_constrained": false,
|
||||
"header": "header",
|
||||
"id": "owsyt8n43jfxjpzh9np93mx1wa",
|
||||
"last_post_at": 0,
|
||||
"last_root_post_at": 0,
|
||||
"name": "DN",
|
||||
"purpose": "purpose",
|
||||
"scheme_id": "id",
|
||||
"team_id": "team_id",
|
||||
"type": "O",
|
||||
"update_at": 0,
|
||||
}
|
||||
}
|
||||
currentUserId="zaktnt8bpbgu8mb6ez9k64r7sa"
|
||||
disableSend={false}
|
||||
draft={
|
||||
Object {
|
||||
"channelId": "",
|
||||
"createAt": 0,
|
||||
"fileInfos": Array [],
|
||||
"message": "",
|
||||
"rootId": "",
|
||||
"updateAt": 0,
|
||||
"uploadsInProgress": Array [],
|
||||
}
|
||||
}
|
||||
@@ -565,20 +684,37 @@ exports[`components/advanced_create_post should match snapshot, cannot post; pre
|
||||
applyMarkdown={[Function]}
|
||||
badConnection={false}
|
||||
canPost={false}
|
||||
canUploadFiles={true}
|
||||
canUploadFiles={false}
|
||||
channelId="owsyt8n43jfxjpzh9np93mx1wa"
|
||||
currentChannel={
|
||||
Object {
|
||||
"create_at": 0,
|
||||
"creator_id": "id",
|
||||
"delete_at": 0,
|
||||
"display_name": "name",
|
||||
"group_constrained": false,
|
||||
"header": "header",
|
||||
"id": "owsyt8n43jfxjpzh9np93mx1wa",
|
||||
"last_post_at": 0,
|
||||
"last_root_post_at": 0,
|
||||
"name": "DN",
|
||||
"purpose": "purpose",
|
||||
"scheme_id": "id",
|
||||
"team_id": "team_id",
|
||||
"type": "O",
|
||||
"update_at": 0,
|
||||
}
|
||||
}
|
||||
currentUserId="zaktnt8bpbgu8mb6ez9k64r7sa"
|
||||
disableSend={false}
|
||||
draft={
|
||||
Object {
|
||||
"channelId": "",
|
||||
"createAt": 0,
|
||||
"fileInfos": Array [],
|
||||
"message": "",
|
||||
"rootId": "",
|
||||
"updateAt": 0,
|
||||
"uploadsInProgress": Array [],
|
||||
}
|
||||
}
|
||||
@@ -644,20 +780,37 @@ exports[`components/advanced_create_post should match snapshot, init 1`] = `
|
||||
applyMarkdown={[Function]}
|
||||
badConnection={false}
|
||||
canPost={true}
|
||||
canUploadFiles={true}
|
||||
canUploadFiles={false}
|
||||
channelId="owsyt8n43jfxjpzh9np93mx1wa"
|
||||
currentChannel={
|
||||
Object {
|
||||
"create_at": 0,
|
||||
"creator_id": "id",
|
||||
"delete_at": 0,
|
||||
"display_name": "name",
|
||||
"group_constrained": false,
|
||||
"header": "header",
|
||||
"id": "owsyt8n43jfxjpzh9np93mx1wa",
|
||||
"last_post_at": 0,
|
||||
"last_root_post_at": 0,
|
||||
"name": "DN",
|
||||
"purpose": "purpose",
|
||||
"scheme_id": "id",
|
||||
"team_id": "team_id",
|
||||
"type": "O",
|
||||
"update_at": 0,
|
||||
}
|
||||
}
|
||||
currentUserId="zaktnt8bpbgu8mb6ez9k64r7sa"
|
||||
disableSend={false}
|
||||
draft={
|
||||
Object {
|
||||
"channelId": "",
|
||||
"createAt": 0,
|
||||
"fileInfos": Array [],
|
||||
"message": "",
|
||||
"rootId": "",
|
||||
"updateAt": 0,
|
||||
"uploadsInProgress": Array [],
|
||||
}
|
||||
}
|
||||
@@ -723,18 +876,33 @@ exports[`components/advanced_create_post should match snapshot, post priority di
|
||||
applyMarkdown={[Function]}
|
||||
badConnection={false}
|
||||
canPost={true}
|
||||
canUploadFiles={true}
|
||||
canUploadFiles={false}
|
||||
channelId="owsyt8n43jfxjpzh9np93mx1wa"
|
||||
currentChannel={
|
||||
Object {
|
||||
"create_at": 0,
|
||||
"creator_id": "id",
|
||||
"delete_at": 0,
|
||||
"display_name": "name",
|
||||
"group_constrained": false,
|
||||
"header": "header",
|
||||
"id": "owsyt8n43jfxjpzh9np93mx1wa",
|
||||
"last_post_at": 0,
|
||||
"last_root_post_at": 0,
|
||||
"name": "DN",
|
||||
"purpose": "purpose",
|
||||
"scheme_id": "id",
|
||||
"team_id": "team_id",
|
||||
"type": "O",
|
||||
"update_at": 0,
|
||||
}
|
||||
}
|
||||
currentUserId="zaktnt8bpbgu8mb6ez9k64r7sa"
|
||||
disableSend={false}
|
||||
draft={
|
||||
Object {
|
||||
"channelId": "",
|
||||
"createAt": 0,
|
||||
"fileInfos": Array [],
|
||||
"message": "",
|
||||
"metadata": Object {
|
||||
@@ -742,6 +910,8 @@ exports[`components/advanced_create_post should match snapshot, post priority di
|
||||
"priority": "important",
|
||||
},
|
||||
},
|
||||
"rootId": "",
|
||||
"updateAt": 0,
|
||||
"uploadsInProgress": Array [],
|
||||
}
|
||||
}
|
||||
@@ -815,20 +985,37 @@ exports[`components/advanced_create_post should match snapshot, post priority en
|
||||
applyMarkdown={[Function]}
|
||||
badConnection={false}
|
||||
canPost={true}
|
||||
canUploadFiles={true}
|
||||
canUploadFiles={false}
|
||||
channelId="owsyt8n43jfxjpzh9np93mx1wa"
|
||||
currentChannel={
|
||||
Object {
|
||||
"create_at": 0,
|
||||
"creator_id": "id",
|
||||
"delete_at": 0,
|
||||
"display_name": "name",
|
||||
"group_constrained": false,
|
||||
"header": "header",
|
||||
"id": "owsyt8n43jfxjpzh9np93mx1wa",
|
||||
"last_post_at": 0,
|
||||
"last_root_post_at": 0,
|
||||
"name": "DN",
|
||||
"purpose": "purpose",
|
||||
"scheme_id": "id",
|
||||
"team_id": "team_id",
|
||||
"type": "O",
|
||||
"update_at": 0,
|
||||
}
|
||||
}
|
||||
currentUserId="zaktnt8bpbgu8mb6ez9k64r7sa"
|
||||
disableSend={false}
|
||||
draft={
|
||||
Object {
|
||||
"channelId": "",
|
||||
"createAt": 0,
|
||||
"fileInfos": Array [],
|
||||
"message": "",
|
||||
"rootId": "",
|
||||
"updateAt": 0,
|
||||
"uploadsInProgress": Array [],
|
||||
}
|
||||
}
|
||||
@@ -907,18 +1094,33 @@ exports[`components/advanced_create_post should match snapshot, post priority en
|
||||
applyMarkdown={[Function]}
|
||||
badConnection={false}
|
||||
canPost={true}
|
||||
canUploadFiles={true}
|
||||
canUploadFiles={false}
|
||||
channelId="owsyt8n43jfxjpzh9np93mx1wa"
|
||||
currentChannel={
|
||||
Object {
|
||||
"create_at": 0,
|
||||
"creator_id": "id",
|
||||
"delete_at": 0,
|
||||
"display_name": "name",
|
||||
"group_constrained": false,
|
||||
"header": "header",
|
||||
"id": "owsyt8n43jfxjpzh9np93mx1wa",
|
||||
"last_post_at": 0,
|
||||
"last_root_post_at": 0,
|
||||
"name": "DN",
|
||||
"purpose": "purpose",
|
||||
"scheme_id": "id",
|
||||
"team_id": "team_id",
|
||||
"type": "O",
|
||||
"update_at": 0,
|
||||
}
|
||||
}
|
||||
currentUserId="zaktnt8bpbgu8mb6ez9k64r7sa"
|
||||
disableSend={false}
|
||||
draft={
|
||||
Object {
|
||||
"channelId": "",
|
||||
"createAt": 0,
|
||||
"fileInfos": Array [],
|
||||
"message": "",
|
||||
"metadata": Object {
|
||||
@@ -926,6 +1128,8 @@ exports[`components/advanced_create_post should match snapshot, post priority en
|
||||
"priority": "important",
|
||||
},
|
||||
},
|
||||
"rootId": "",
|
||||
"updateAt": 0,
|
||||
"uploadsInProgress": Array [],
|
||||
}
|
||||
}
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -86,7 +86,7 @@ function isDraftEmpty(draft: PostDraft): boolean {
|
||||
|
||||
type TextboxElement = HTMLInputElement | HTMLTextAreaElement;
|
||||
|
||||
type Props = {
|
||||
export type Props = {
|
||||
|
||||
// ref passed from channelView for EmojiPickerOverlay
|
||||
getChannelView?: () => void;
|
||||
|
||||
Ссылка в новой задаче
Block a user