mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
update chat input tests to expect new behaviour (#1443)
This commit is contained in:
parent
319b9ac0f3
commit
c02b681728
@ -27,7 +27,16 @@ describe("ChatInput", () => {
|
||||
<ChatInput disabled onSendMessage={onSendMessage} />,
|
||||
);
|
||||
const textarea = getByRole("textbox");
|
||||
expect(textarea).toBeDisabled();
|
||||
const button = getByRole("button");
|
||||
|
||||
expect(textarea).not.toBeDisabled(); // user can still type
|
||||
expect(button).toBeDisabled(); // user cannot submit
|
||||
|
||||
act(() => {
|
||||
userEvent.type(textarea, "Hello, world!{enter}");
|
||||
});
|
||||
|
||||
expect(onSendMessage).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
// Note that this test only checks that the placeholder is rendered, not the actual value
|
||||
|
||||
6
package-lock.json
generated
Normal file
6
package-lock.json
generated
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "OpenDevin",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user