mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-30 11:52:04 +00:00
test(desktop): cover the inline command expander on the approval bar
Asserts the full command is absent until the Command toggle is clicked, then rendered in full — guarding the long-command reveal path.
This commit is contained in:
parent
266b5a19f1
commit
5d6c16e972
1 changed files with 13 additions and 0 deletions
|
|
@ -84,6 +84,19 @@ describe('PendingToolApproval', () => {
|
|||
expect($approvalRequest.get()).toBeNull()
|
||||
})
|
||||
|
||||
it('reveals the full command inline when the Command toggle is clicked', () => {
|
||||
const longCommand = 'python -c "' + 'x'.repeat(400) + '"'
|
||||
setRequest(longCommand)
|
||||
render(<PendingToolApproval part={part('terminal')} />)
|
||||
|
||||
// Collapsed by default: the full command is not in the DOM yet.
|
||||
expect(screen.queryByText(longCommand)).toBeNull()
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: /Command/ }))
|
||||
|
||||
expect(screen.getByText(longCommand)).toBeTruthy()
|
||||
})
|
||||
|
||||
it('sends choice "deny" on Reject', async () => {
|
||||
const request = mockGateway()
|
||||
setRequest()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue