fix(webui): remove intermediate answer footer gap
This commit is contained in:
1 parent
fa754c2204
commit
900675e7f8
4 files changed
+38
-2
No files matched your search
@@ -1526,11 +1526,20 @@ describe("ThreadMessages", () => {
|
||||
<ThreadMessages {...props} isStreaming activeTurnId={activeTurnId} />,
|
||||
);
|
||||
|
||||
const firstAnswer = screen.getByText("first answer slice")
|
||||
.closest<HTMLElement>("[data-thread-display-unit]")!;
|
||||
const finalAnswer = screen.getByText("second answer slice")
|
||||
.closest<HTMLElement>("[data-thread-display-unit]")!;
|
||||
expect(firstAnswer.querySelector("[data-assistant-footer]")).not.toBeInTheDocument();
|
||||
expect(finalAnswer.querySelector("[data-assistant-footer]"))
|
||||
.toHaveAttribute("data-state", "visible");
|
||||
expect(container.querySelectorAll('[data-assistant-footer] [aria-label="Copy"]')).toHaveLength(1);
|
||||
expect(container.querySelectorAll('[data-assistant-footer] [aria-label="Fork"]')).toHaveLength(1);
|
||||
|
||||
rerender(<ThreadMessages {...props} isStreaming={false} activeTurnId={null} />);
|
||||
|
||||
expect(firstAnswer.querySelector("[data-assistant-footer]"))
|
||||
.toHaveAttribute("data-state", "visible");
|
||||
expect(container.querySelectorAll('[data-assistant-footer] [aria-label="Copy"]')).toHaveLength(3);
|
||||
expect(container.querySelectorAll('[data-assistant-footer] [aria-label="Fork"]')).toHaveLength(2);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user