fix(FN-2646): restore quick chat render toggle visibility
- Remove generic btn btn-icon classes from quick chat render toggles so component-specific visibility styles apply - Increase toggle icon size and adjust default muted color for clearer eye/eye-off affordance in assistant messages - Add explicit focus-visible ring styling for keyboard accessibility on the render toggle control - Extend QuickChatFAB regression coverage to assert class usage, SVG icon presence, and plain/rendered toggle state transitions
This commit is contained in:
@@ -248,16 +248,21 @@ describe("QuickChatFAB", () => {
|
||||
|
||||
const toggles = screen.getAllByTestId("quick-chat-message-render-toggle");
|
||||
expect(toggles).toHaveLength(2);
|
||||
expect(toggles[0]).not.toHaveClass("btn");
|
||||
expect(toggles[0]).not.toHaveClass("btn-icon");
|
||||
expect(toggles[0].querySelector("svg")).toBeInTheDocument();
|
||||
expect(within(firstAssistantBubble).getByText("Bold", { selector: "strong" })).toBeInTheDocument();
|
||||
expect(within(secondAssistantBubble).getByText("Bold", { selector: "strong" })).toBeInTheDocument();
|
||||
|
||||
fireEvent.click(toggles[0]);
|
||||
|
||||
expect(toggles[0]).toHaveClass("quick-chat-message-render-toggle--plain");
|
||||
expect(within(firstAssistantBubble).getByText(/\*\*Bold\*\* one/)).toBeInTheDocument();
|
||||
expect(within(firstAssistantBubble).queryByText("Bold", { selector: "strong" })).toBeNull();
|
||||
expect(within(secondAssistantBubble).getByText("Bold", { selector: "strong" })).toBeInTheDocument();
|
||||
|
||||
fireEvent.click(toggles[0]);
|
||||
expect(toggles[0]).not.toHaveClass("quick-chat-message-render-toggle--plain");
|
||||
expect(within(firstAssistantBubble).getByText("Bold", { selector: "strong" })).toBeInTheDocument();
|
||||
expect(within(userBubble).getByText(/\*\*User\*\* plain/)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user