-
Notifications
You must be signed in to change notification settings - Fork 64
docs(test-fixtures): add AI documentation - AGENTS.md and ARCHITECTURE.md #595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
Shreyas281299
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Looks good.
| - **Ensures consistency** - Same mock data across all tests | ||
| - **Supports customization** - Easy to extend or override fixtures | ||
|
|
||
| ### Key Capabilities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current mockCC fixture does not include all SDK methods listed here (e.g., acceptTask, transferTask, outdial, etc.). Either expand mockCC or update this section to match the actual fixture surface.
|
|
||
| --- | ||
|
|
||
| ### mockProfile (Profile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fixtures.ts, teams are {teamId, teamName}, and loginVoiceOptions is a string array. Update the example to match the real fixture shape.
|
|
||
| --- | ||
|
|
||
| ### mockTask (ITask) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual mockTask data uses data.interaction fields, not origin/destination. Update the example to match the real TaskData shape in fixtures.ts.
|
|
||
| --- | ||
|
|
||
| ## Available Fixtures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package exports additional fixtures from incomingTaskFixtures, taskListFixtures, and outdialCallFixtures (e.g., mockIncomingTaskData, mockTaskData, mockOutdialCallProps, mockAniEntries, mockCCWithAni). Add them to this table.
| --- | ||
|
|
||
| ## Dependencies | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixtures import types from @webex/contact-center as well. Either list it as a dependency or update this section to clarify it’s a type-only import.
| Test Fixtures is a testing utility package that provides realistic mock data for all contact center SDK types and widgets. It follows a fixture pattern where each fixture is a pre-configured, reusable mock object that matches the actual SDK types. | ||
|
|
||
| ### Fixture Table | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual mockCC in fixtures.ts does not implement those methods. Update this table to reflect the real mockCC surface, or extend the mock to match the doc.
| | **makeMockAddressBook** | `Function` | `src/fixtures.ts` | Factory for custom address book | Via function parameter | | ||
|
|
||
| ### File Structure | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all fixtures are in fixtures.ts. There are additional exports in incomingTaskFixtures, taskListFixtures, and components/task/outdialCallFixtures. Update file structure and/or add those files.
COMPLETES N/A - Documentation Enhancement
This pull request addresses
Adding AI-optimized documentation for the test-fixtures package to help AI assistants understand the test mocks and utilities.
by making the following changes
packages/contact-center/test-fixtures/ai-docs/AGENTS.md- Usage documentation for test mockspackages/contact-center/test-fixtures/ai-docs/ARCHITECTURE.md- Technical implementation detailsChange Type
The following scenarios were tested
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.