PromucFlow_constructor/app/client
Ilia e495422975
feat: add AIChat stories and tests (#36700)
## Description
- Add stories for storybook
- Add unit tests. Some case are not covered due to lack of clear
requirements and will be added later
- Fix bug where `username` is `undefined`


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11177693011>
> Commit: ba99a27d5956a74dade5ae54998056bd2d3d6a44
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11177693011&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Fri, 04 Oct 2024 10:27:03 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

- **New Features**
- Introduced a new Storybook configuration for the `AIChat` component,
showcasing various states including `Main`, `EmptyHistory`, `Loading`,
and `WithHistory`.
  
- **Improvements**
- Enhanced testability of the `AIChat` and `ChatTitle` components by
adding `data-testid` attributes.
- Updated `AIChat` component to streamline props and improve rendering
logic.

- **Bug Fixes**
- Ensured the `username` prop defaults to an empty string in the
`WDSAIChatWidget` component.

- **Tests**
- Added a comprehensive test suite for the `AIChat` component,
validating its rendering and functionality across different scenarios.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-10-04 12:38:10 +02:00
..
.husky ci: Add pre push hook to not allow ee changes in ce (#35276) 2024-07-30 12:11:27 +05:30
.yarn
cypress chore: Updated another set of third party urls (#36571) 2024-10-04 15:06:56 +05:30
docker/templates chore: Fix bugs in logic for capturing web vitals for client (#32371) 2024-04-09 14:25:46 +05:30
generators
packages feat: add AIChat stories and tests (#36700) 2024-10-04 12:38:10 +02:00
public chore: add reo client sdk to index.html (#36408) 2024-09-20 10:51:45 +05:30
src feat: add AIChat stories and tests (#36700) 2024-10-04 12:38:10 +02:00
test feat: add AIChat stories and tests (#36700) 2024-10-04 12:38:10 +02:00
typings
.babelrc chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
.dockerignore
.editorconfig
.eslintrc.base.json chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
.eslintrc.js fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
.fork-ts-checkerrc fix: OOM issue (#31995) 2024-03-21 22:08:58 +05:30
.gitignore chore: update storybook (#32828) 2024-04-22 12:17:28 +03:00
.lintstagedrc.json
.nvmrc chore: update node version and appropriate git workflows (#31486) 2024-03-26 14:12:11 +03:00
.prettierignore
.prettierrc
.sentryclirc
.yarnrc.yml
build.sh chore: reverted client profiled build (#35306) 2024-07-31 15:23:08 +05:30
craco.build.config.js chore: Prefetch module apis in service worker (#34003) 2024-06-14 16:30:23 +05:30
craco.common.config.js chore: add node variable for ts type checking (#31996) 2024-03-25 13:11:53 +03:00
craco.dev.config.js chore: Prefetch module apis in service worker (#34003) 2024-06-14 16:30:23 +05:30
cypress_ci_custom.config.ts chore: change snapshot package (#35867) 2024-09-12 11:09:42 +03:00
cypress_ci_hosted.config.ts chore: change snapshot package (#35867) 2024-09-12 11:09:42 +03:00
cypress_ci.config.ts chore: change snapshot package (#35867) 2024-09-12 11:09:42 +03:00
cypress-add-tags.js
cypress.config.ts chore: change snapshot package (#35867) 2024-09-12 11:09:42 +03:00
download-assets.js
jest.config.js feat: init AI chat widget (#36610) 2024-10-03 14:26:18 +03:00
knip.json fix: removing unused dependencies and explicitly installing used ones (#36573) 2024-09-30 12:28:46 +03:00
package.json feat: init AI chat widget (#36610) 2024-10-03 14:26:18 +03:00
README.md
README.old.md
start-caddy.sh chore: Remove deprecated start-https.sh message (#33856) 2024-05-31 07:18:57 +05:30
start-https.sh chore: Remove deprecated start-https.sh message (#33856) 2024-05-31 07:18:57 +05:30
tailwind.config.js
tsconfig.json chore: upgrade typescript to 5.4 (#35181) 2024-07-30 16:15:48 +02:00
tsconfig.path.json chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
vercel.json
yarn.lock feat: init AI chat widget (#36610) 2024-10-03 14:26:18 +03:00

Appsmith Client

This project was bootstrapped with Create React App.

For details on setting up your development machine, please refer to the Setup Guide