fix(web): cap default images at 5 MiB

This commit is contained in:
creatixchu
2026-08-12 14:47:20 +08:00
parent 8d4c3f8a0a
commit 51dc55ec3d
15 changed files with 21 additions and 20 deletions

View File

@@ -9,12 +9,12 @@ afterEach(cleanup)
describe('DropOverlay', () => {
it('portals the invitation with its title and limits desc to the body', () => {
const view = render(
<DropOverlay disabled={false} labels={{ title: '图片拖动到此处即可添加', desc: '最多 20 张,每张 10MB' }} />,
<DropOverlay disabled={false} labels={{ title: '图片拖动到此处即可添加', desc: '最多 20 张,每张 5MB' }} />,
)
const overlay = view.getByRole('status')
expect(overlay.parentElement).toBe(document.body)
expect(overlay.textContent).toContain('图片拖动到此处即可添加')
expect(overlay.textContent).toContain('最多 20 张,每张 10MB')
expect(overlay.textContent).toContain('最多 20 张,每张 5MB')
})
it('omits the desc line when none is resolved', () => {