public profile editing

This commit is contained in:
Moon.eth
2026-07-29 19:51:59 +09:00
parent 8f0d47b850
commit 17f385c1c3
9 changed files with 795 additions and 14 deletions
+23
View File
@@ -79,4 +79,27 @@ describe('Composer', () => {
},
})
})
it.each([
['Command+Enter', { metaKey: true }],
['Ctrl+Enter', { ctrlKey: true }],
])('submits with %s from the focused compose field', async (_label, modifier) => {
const postStatus = vi.fn().mockResolvedValue(status())
const services = testServices({
session: session({ token: 'token', me: account(), signedIn: true }),
endpoints: { postStatus },
})
const view = render(Composer, {
props: { initialText: 'Keyboard-posted entry' },
context: new Map([[APP_SERVICES, services]]),
})
await fireEvent.keyDown(view.getByRole('textbox', { name: 'Entry text' }), {
key: 'Enter',
...modifier,
})
await waitFor(() => expect(postStatus).toHaveBeenCalledOnce())
expect(postStatus.mock.calls[0][1].status).toBe('Keyboard-posted entry')
})
})