Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance testing suite with Jest and Puppeteer integration
- Added Babel configuration for Jest to transpile JavaScript and React code: - Created a new `babel.config.js` file with presets for `@babel/preset-env` and `@babel/preset-react`. - Developed comprehensive unit tests for key chat components: - **Chat Component**: Validates rendering of essential UI elements such as the virtual agent text, buttons, and text input. - **ChatBar Component**: Tests functionality for sending messages and verifies interaction with the `updateMessagesStateEvent` function. - **ChatMessages Component**: Ensures proper display of messages within the chat. - **ChatRecommendationBar Component**: Checks for presence of recommendation buttons and verifies interaction for setting text area values. - Integrated Puppeteer for end-to-end testing of the AI chat functionality: - Added a new test file that uses Puppeteer to simulate user interactions with the chat interface and validate AI responses. - Updated `package.json`: - Added necessary dependencies for Babel and Jest, including `@babel/core`, `babel-jest`, and `jest-environment-jsdom`. - Corrected project description and added relevant scripts. - Enhanced `README.md`: - Provided detailed instructions for setting up and running tests, including installation of dependencies and configuration. - Included guidelines for writing new tests and troubleshooting common issues. These updates improve test coverage and ensure reliable functionality for the chat components and AI responses. tech-girls workspace chats aren't used to train our models. ChatGPT can make mistakes.
- Loading branch information