mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
fix web design files upload picker (#199)
This commit is contained in:
parent
59e4966dda
commit
9969003aa5
2 changed files with 22 additions and 1 deletions
22
apps/web/src/components/FileWorkspace.test.tsx
Normal file
22
apps/web/src/components/FileWorkspace.test.tsx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { renderToStaticMarkup } from 'react-dom/server';
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { FileWorkspace } from './FileWorkspace';
|
||||
|
||||
describe('FileWorkspace upload input', () => {
|
||||
it('keeps the Design Files picker aligned with drag-and-drop file support', () => {
|
||||
const markup = renderToStaticMarkup(
|
||||
<FileWorkspace
|
||||
projectId="project-1"
|
||||
files={[]}
|
||||
onRefreshFiles={vi.fn()}
|
||||
isDeck={false}
|
||||
tabsState={{ tabs: [], active: null }}
|
||||
onTabsStateChange={vi.fn()}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(markup).toContain('data-testid="design-files-upload-input"');
|
||||
expect(markup).not.toContain('accept=');
|
||||
});
|
||||
});
|
||||
|
|
@ -415,7 +415,6 @@ export function FileWorkspace({
|
|||
type="file"
|
||||
multiple
|
||||
data-testid="design-files-upload-input"
|
||||
accept="image/*"
|
||||
style={{ display: 'none' }}
|
||||
onChange={handleFilePicked}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue