Send related emoji along with Sticker, fix SendMessage types
This commit is contained in:
parent
3c91dce993
commit
bd380086a4
35 changed files with 522 additions and 376 deletions
|
@ -17,6 +17,8 @@ import {
|
|||
import { setupI18n } from '../../util/setupI18n';
|
||||
import enMessages from '../../../_locales/en/messages.json';
|
||||
|
||||
import { fakeAttachment } from '../../test-both/helpers/fakeAttachment';
|
||||
|
||||
const i18n = setupI18n('en', enMessages);
|
||||
|
||||
const story = storiesOf('Components/Conversation/AttachmentList', module);
|
||||
|
@ -33,11 +35,11 @@ const createProps = (overrideProps: Partial<Props> = {}): Props => ({
|
|||
story.add('One File', () => {
|
||||
const props = createProps({
|
||||
attachments: [
|
||||
{
|
||||
fakeAttachment({
|
||||
contentType: IMAGE_JPEG,
|
||||
fileName: 'tina-rolf-269345-unsplash.jpg',
|
||||
url: '/fixtures/tina-rolf-269345-unsplash.jpg',
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
return <AttachmentList {...props} />;
|
||||
|
@ -46,12 +48,12 @@ story.add('One File', () => {
|
|||
story.add('Multiple Visual Attachments', () => {
|
||||
const props = createProps({
|
||||
attachments: [
|
||||
{
|
||||
fakeAttachment({
|
||||
contentType: IMAGE_JPEG,
|
||||
fileName: 'tina-rolf-269345-unsplash.jpg',
|
||||
url: '/fixtures/tina-rolf-269345-unsplash.jpg',
|
||||
},
|
||||
{
|
||||
}),
|
||||
fakeAttachment({
|
||||
contentType: VIDEO_MP4,
|
||||
fileName: 'pixabay-Soap-Bubble-7141.mp4',
|
||||
url: '/fixtures/pixabay-Soap-Bubble-7141.mp4',
|
||||
|
@ -62,12 +64,12 @@ story.add('Multiple Visual Attachments', () => {
|
|||
contentType: IMAGE_JPEG,
|
||||
path: 'originalpath',
|
||||
},
|
||||
},
|
||||
{
|
||||
}),
|
||||
fakeAttachment({
|
||||
contentType: IMAGE_GIF,
|
||||
fileName: 'giphy-GVNv0UpeYm17e',
|
||||
url: '/fixtures/giphy-GVNvOUpeYmI7e.gif',
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
|
@ -77,22 +79,22 @@ story.add('Multiple Visual Attachments', () => {
|
|||
story.add('Multiple with Non-Visual Types', () => {
|
||||
const props = createProps({
|
||||
attachments: [
|
||||
{
|
||||
fakeAttachment({
|
||||
contentType: IMAGE_JPEG,
|
||||
fileName: 'tina-rolf-269345-unsplash.jpg',
|
||||
url: '/fixtures/tina-rolf-269345-unsplash.jpg',
|
||||
},
|
||||
{
|
||||
}),
|
||||
fakeAttachment({
|
||||
contentType: stringToMIMEType('text/plain'),
|
||||
fileName: 'lorem-ipsum.txt',
|
||||
url: '/fixtures/lorem-ipsum.txt',
|
||||
},
|
||||
{
|
||||
}),
|
||||
fakeAttachment({
|
||||
contentType: AUDIO_MP3,
|
||||
fileName: 'incompetech-com-Agnus-Dei-X.mp3',
|
||||
url: '/fixtures/incompetech-com-Agnus-Dei-X.mp3',
|
||||
},
|
||||
{
|
||||
}),
|
||||
fakeAttachment({
|
||||
contentType: VIDEO_MP4,
|
||||
fileName: 'pixabay-Soap-Bubble-7141.mp4',
|
||||
url: '/fixtures/pixabay-Soap-Bubble-7141.mp4',
|
||||
|
@ -103,12 +105,12 @@ story.add('Multiple with Non-Visual Types', () => {
|
|||
contentType: IMAGE_JPEG,
|
||||
path: 'originalpath',
|
||||
},
|
||||
},
|
||||
{
|
||||
}),
|
||||
fakeAttachment({
|
||||
contentType: IMAGE_GIF,
|
||||
fileName: 'giphy-GVNv0UpeYm17e',
|
||||
url: '/fixtures/giphy-GVNvOUpeYmI7e.gif',
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue