Skip to content

feat: added data test id#165

Open
LAVI9966 wants to merge 4 commits intoWalkover-Web-Solution:testingfrom
LAVI9966:chatbot_data_test_id
Open

feat: added data test id#165
LAVI9966 wants to merge 4 commits intoWalkover-Web-Solution:testingfrom
LAVI9966:chatbot_data_test_id

Conversation

@LAVI9966
Copy link
Copy Markdown

No description provided.

- Add data-testid to ChatbotTextField component (input, buttons, file upload, emoji, etc.)
- Add data-testid to main Chatbot component (containers, views, loading states)
- Add data-testid to MessageList component (messages, scroll container, loading indicators)
- Follow same pattern as AI-middleware-frontend repo for consistent testing
- Enable automated testing and QA testing with proper element identification
- Add data-testid to CallButton component (voice call button)
- Add data-testid to EmojiSelector component (picker, search, categories, emojis)
- Add data-testid to ChatbotHeader component (all interactive buttons and dropdowns)
- Complete comprehensive test coverage for all major UI elements
- Enable full automated testing capabilities across chatbot interface
Copilot AI review requested due to automatic review settings March 18, 2026 09:37
@windsurf-bot
Copy link
Copy Markdown

windsurf-bot bot commented Mar 18, 2026

PR review rate limit exceeded

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds test hooks to the chatbot UI by introducing data-testid attributes across key components, and extends app info typing to include optional “show” button flags.

Changes:

  • Added data-testid attributes to chatbot views, message list states, input controls, emoji picker, and call button to support UI testing.
  • Added data-testid for empty/active chatbot containers and loading indicators.
  • Extended $AppInfoReduxType with optional showFullScreenButton / showCloseButton flags.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
types/appInfo/appInfoReduxType.ts Adds optional “show” button flags to app info redux typing.
components/Interface-Chatbot/Messages/MessageList.tsx Adds test ids for thinking indicator, loader, scroll container, and per-message elements.
components/Interface-Chatbot/EmojiSelector.tsx Adds test ids for emoji picker elements (picker, search, loading/empty, categories, emojis).
components/Interface-Chatbot/ChatbotTextField.tsx Adds test ids for suggestions, upload controls, error message, input container, emoji button, and send button.
components/Interface-Chatbot/CallButton.tsx Adds a test id to the call button wrapper.
components/Chatbot/Chatbot.tsx Adds test ids for empty/active views and main layout containers/indicators.
Comments suppressed due to low confidence (1)

components/Interface-Chatbot/Messages/MessageList.tsx:163

  • data-testid is being passed to the Message React component, but MessageProps (components/Interface-Chatbot/Messages/Message.tsx) doesn't declare it and the component doesn't forward unknown props to its root element. This will cause a TypeScript error and the test id won't end up in the DOM. Consider adding an explicit prop (e.g., testId) to MessageProps and applying it to the root <div>, or extend MessageProps from React.HTMLAttributes<HTMLDivElement> and spread the remaining props onto the wrapper element.
        <Message
          key={`${msgId}`}
          data-testid={`chatbot-message-${msgId}`}
          message={message}
          prevTime={prevTime}
          isLastMessage={index === lastHumanOrBotIndex}
        />

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@LAVI9966 LAVI9966 force-pushed the chatbot_data_test_id branch from f99b654 to 2072cb6 Compare March 18, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants