fix(knowledge): keep computer upload and place creation below it

This commit is contained in:
鲨鱼辣椒 committed 2026-10-13 13:39:30 +08:00
1 parent a6126c0ae2
commit a589a864d7
11 files changed
+97 -944

No files matched your search

+3 -3
View File
@@ -57,13 +57,13 @@ it('joins readable IDs to the owned-only catalog and selects multiple libraries
expect(changes).toHaveBeenLastCalledWith(expect.objectContaining({ knowledges: ['own', 'other-shared'] }));
});
it('never offers shared libraries to document management or mounts their mutating controls', async () => {
it('never offers shared libraries to document management or enables their upload controls', async () => {
databases = [];
render(<Harness initial={['shared']} />);
await screen.findByText('MakeLore知识 · 只读'); openUpload();
const manager = screen.getByRole('combobox', { name: '管理的知识库' });
expect(within(manager).queryByRole('option', { name: '创作指南' })).not.toBeInTheDocument();
expect(screen.queryByRole('button', { name: '从电脑上传', exact: true })).not.toBeInTheDocument();
expect(screen.getByRole('button', { name: '从电脑上传', exact: true })).toBeDisabled();
expect(screen.queryByRole('button', { name: '删除知识库', exact: true })).not.toBeInTheDocument();
expect(api.call.mock.calls.every(([operation]) => operation !== 'knowledgeFiles')).toBe(true);
});
@@ -78,7 +78,7 @@ it('allows readable binding after an owned-list failure while withholding docume
expect(screen.queryByRole('group', { name: 'MakeLore知识' })).not.toBeInTheDocument();
choose('shared'); openUpload();
expect(screen.getByRole('combobox', { name: '管理的知识库' })).toBeDisabled();
expect(screen.queryByRole('button', { name: '从电脑上传', exact: true })).not.toBeInTheDocument();
expect(screen.getByRole('button', { name: '从电脑上传', exact: true })).toBeDisabled();
failed = false;
fireEvent.click(screen.getByRole('button', { name: '刷新知识库', exact: true }));
await screen.findByText('MakeLore知识 · 只读');