|
@@ -28,7 +28,7 @@ const attachment = {
|
|
|
|
|
|
|
|
describe('attachment rejection copy', () => {
|
|
describe('attachment rejection copy', () => {
|
|
|
const limits = {
|
|
const limits = {
|
|
|
- maxImageBytes: 10 * 1024 * 1024,
|
|
|
|
|
|
|
+ maxImageBytes: 5 * 1024 * 1024,
|
|
|
maxImagesPerMessage: 20,
|
|
maxImagesPerMessage: 20,
|
|
|
maxMessageImageBytes: 100 * 1024 * 1024,
|
|
maxMessageImageBytes: 100 * 1024 * 1024,
|
|
|
maxImagePixels: 40_000_000,
|
|
maxImagePixels: 40_000_000,
|
|
@@ -47,7 +47,7 @@ describe('attachment rejection copy', () => {
|
|
|
expect(attachmentErrorText(t, 'INVALID_IMAGE')).toBe('仅支持 PNG、JPG、WebP、GIF 格式的图片')
|
|
expect(attachmentErrorText(t, 'INVALID_IMAGE')).toBe('仅支持 PNG、JPG、WebP、GIF 格式的图片')
|
|
|
expect(attachmentErrorText(t, 'IMAGE_TYPE_MISMATCH')).toBe('仅支持 PNG、JPG、WebP、GIF 格式的图片')
|
|
expect(attachmentErrorText(t, 'IMAGE_TYPE_MISMATCH')).toBe('仅支持 PNG、JPG、WebP、GIF 格式的图片')
|
|
|
expect(attachmentErrorText(t, 'TOO_MANY_IMAGES', limits)).toBe('一条消息最多添加 20 张图片')
|
|
expect(attachmentErrorText(t, 'TOO_MANY_IMAGES', limits)).toBe('一条消息最多添加 20 张图片')
|
|
|
- expect(attachmentErrorText(t, 'IMAGE_TOO_LARGE', limits)).toBe('单张图片不能超过 10MB')
|
|
|
|
|
|
|
+ expect(attachmentErrorText(t, 'IMAGE_TOO_LARGE', limits)).toBe('单张图片不能超过 5MB')
|
|
|
expect(attachmentErrorText(t, 'IMAGES_TOO_LARGE', limits)).toBe('图片总大小超过 100MB,请移除部分图片')
|
|
expect(attachmentErrorText(t, 'IMAGES_TOO_LARGE', limits)).toBe('图片总大小超过 100MB,请移除部分图片')
|
|
|
expect(attachmentErrorText(enT, 'TOO_MANY_IMAGES', limits)).toBe('A message can include up to 20 images')
|
|
expect(attachmentErrorText(enT, 'TOO_MANY_IMAGES', limits)).toBe('A message can include up to 20 images')
|
|
|
})
|
|
})
|