Commit c969b741 authored by Denys Mishunov's avatar Denys Mishunov

Updated limit for too large snippets

This is supposed to show correct rendering error for too large
files (> 10MB)
parent e5f5f90c
...@@ -25,7 +25,7 @@ export const BLOB_RENDER_ERRORS = { ...@@ -25,7 +25,7 @@ export const BLOB_RENDER_ERRORS = {
TOO_LARGE: { TOO_LARGE: {
id: 'too_large', id: 'too_large',
text: sprintf(__('it is larger than %{limit}'), { text: sprintf(__('it is larger than %{limit}'), {
limit: numberToHumanSize(104857600), // 100MB in bytes limit: numberToHumanSize(10485760), // 10MB in bytes
}), }),
}, },
EXTERNAL: { EXTERNAL: {
......
---
title: Fixed size limit for too large snippets
merge_request: 35076
author:
type: fixed
...@@ -24,9 +24,9 @@ describe('Blob Content Error component', () => { ...@@ -24,9 +24,9 @@ describe('Blob Content Error component', () => {
describe('collapsed and too large blobs', () => { describe('collapsed and too large blobs', () => {
it.each` it.each`
error | reason | options error | reason | options
${BLOB_RENDER_ERRORS.REASONS.COLLAPSED} | ${'it is larger than 1.00 MiB'} | ${[BLOB_RENDER_ERRORS.OPTIONS.LOAD.text, BLOB_RENDER_ERRORS.OPTIONS.DOWNLOAD.text]} ${BLOB_RENDER_ERRORS.REASONS.COLLAPSED} | ${'it is larger than 1.00 MiB'} | ${[BLOB_RENDER_ERRORS.OPTIONS.LOAD.text, BLOB_RENDER_ERRORS.OPTIONS.DOWNLOAD.text]}
${BLOB_RENDER_ERRORS.REASONS.TOO_LARGE} | ${'it is larger than 100.00 MiB'} | ${[BLOB_RENDER_ERRORS.OPTIONS.DOWNLOAD.text]} ${BLOB_RENDER_ERRORS.REASONS.TOO_LARGE} | ${'it is larger than 10.00 MiB'} | ${[BLOB_RENDER_ERRORS.OPTIONS.DOWNLOAD.text]}
`('renders correct reason for $error.id', ({ error, reason, options }) => { `('renders correct reason for $error.id', ({ error, reason, options }) => {
createComponent({ createComponent({
viewerError: error.id, viewerError: error.id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment