Spaces:
Configuration error
Configuration error
Download frontend/__tests__/components/features/conversation-panel/utils.ts from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 520 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/__tests__/components/features/conversation-panel/utils.ts
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/__tests__/components/features/conversation-panel/utils.ts
-
curl -L -o utils.ts https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/__tests__/components/features/conversation-panel/utils.ts
520 Bytes
| import { screen, within } from "@testing-library/react"; | |
| import { UserEvent } from "@testing-library/user-event"; | |
| export const clickOnEditButton = async ( | |
| user: UserEvent, | |
| container?: HTMLElement, | |
| ) => { | |
| const wrapper = container ? within(container) : screen; | |
| const ellipsisButton = wrapper.getByTestId("ellipsis-button"); | |
| await user.click(ellipsisButton); | |
| const menu = wrapper.getByTestId("context-menu"); | |
| const editButton = within(menu).getByTestId("edit-button"); | |
| await user.click(editButton); | |
| }; | |