feat(FN-1358): replace text input with always-dropdown in MessageComposer
- Replace text input with always-open dropdown in MessageComposer component - Update MessageComposer tests to cover dropdown behavior - Remove .message-composer-input from shared CSS rule
This commit is contained in:
@@ -69,10 +69,22 @@ describe("MessageComposer", () => {
|
||||
expect(select.tagName).toBe("SELECT");
|
||||
});
|
||||
|
||||
it("shows text input when no agents provided", () => {
|
||||
it("disables recipient select when agents list is empty", () => {
|
||||
render(<MessageComposer {...defaultProps} />);
|
||||
const input = screen.getByTestId("message-composer-recipient");
|
||||
expect(input.tagName).toBe("INPUT");
|
||||
const select = screen.getByTestId("message-composer-recipient");
|
||||
expect(select).toBeDefined();
|
||||
expect(select.tagName).toBe("SELECT");
|
||||
expect(select.hasAttribute("disabled")).toBe(true);
|
||||
expect(select.textContent).toContain("No agents available");
|
||||
});
|
||||
|
||||
it("shows loading state in recipient select", () => {
|
||||
render(<MessageComposer {...defaultProps} isLoadingAgents={true} />);
|
||||
const select = screen.getByTestId("message-composer-recipient");
|
||||
expect(select).toBeDefined();
|
||||
expect(select.tagName).toBe("SELECT");
|
||||
expect(select.hasAttribute("disabled")).toBe(true);
|
||||
expect(select.textContent).toContain("Loading agents…");
|
||||
});
|
||||
|
||||
it("disables send button when content is empty", () => {
|
||||
|
||||
Reference in New Issue
Block a user