feat(ccwidgets): add e2e tests for real time transcript and real time assist - #729
feat(ccwidgets): add e2e tests for real time transcript and real time assist#729Kesari3008 wants to merge 10 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d70374e4f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| test('Requesting suggestions moves the panel into listening mode and renders a suggestion', async () => { | ||
| await requestRealTimeAssistSuggestions(testManager.agent1Page); |
There was a problem hiding this comment.
Make each AI Assistant scenario retryable in isolation
These tests depend on state created by earlier tests: this scenario assumes the previous case enabled the widget and started a call, while the feedback and copy cases additionally assume this case produced a suggestion. Because playwright.config.ts configures one retry, Playwright restarts the worker and reruns only the failed test, so any retry or --grep run starts from beforeAll without those prerequisites and necessarily fails; the transcript suite has the same dependency between its call-start and transcript-entry cases. Establish the required call/widget/suggestion state per test, or place the workflow in a serial group that retries as a unit.
AGENTS.md reference: AGENTS.md:L83-L88
Useful? React with 👍 / 👎.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a01baeef4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| data-testid="real-time-transcript:item" | ||
| data-speaker-role={entry.isCustomer ? 'customer' : 'agent'} |
There was a problem hiding this comment.
Document the new transcript speaker-role contract
The new E2E helpers depend on data-speaker-role as a stable selector, making this externally observable markup part of the transcript component's behavior, but the commit leaves packages/contact-center/cc-components/ai-docs/cc-components-spec.md—especially CC-COMPONENTS-R-011—unchanged. Document the attribute and its agent/customer mapping in the module spec in this change so future component refactors do not silently invalidate the E2E contract.
AGENTS.md reference: AGENTS.md:L68-L68
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98e7afe5c8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| backingStore.featureFlags = { | ||
| ...(backingStore.featureFlags ?? {}), | ||
| isSuggestedResponsesEnabled: nextEnabled, | ||
| }; |
There was a problem hiding this comment.
Mutate the feature flag inside a MobX action
When the mounted AI Assistant already observes featureFlags, this direct assignment writes to a makeAutoObservable store outside an action, causing MobX strict-mode warnings and potentially exposing an intermediate observer update during the gate assertions. Route the mutation through a store action or wrap it in runInAction() instead.
AGENTS.md reference: AGENTS.md:L63-L64
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6619af0332
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "test:e2e:cc": "yarn workspace @webex/cc-widgets run test:e2e", | ||
| "test:e2e:meetings": "yarn workspace @webex/widgets run test:e2e", |
There was a problem hiding this comment.
Preserve the documented root E2E command
Replacing test:e2e with only the two suffixed scripts leaves no root script named test:e2e, while the modified Playwright README still uses yarn test:e2e for every all-suite, single-suite, project, UI, debug, and headed invocation. Those documented local commands now fail during script resolution before Playwright starts; retain a compatible alias or update the documented callers to use test:e2e:cc.
AGENTS.md reference: AGENTS.md:L78-L78
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7760066c6a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // on non-deterministic MobX/React effect scheduling, so these tests pass or fail | ||
| // intermittently with no code changes. Skipping until the duplicate source of truth | ||
| // is removed (tracked separately) so this suite isn't a source of CI flakiness. | ||
| describe.skip('CallControl recording pause/resume state', () => { |
There was a problem hiding this comment.
Restore recording state regression coverage
Changing this suite to describe.skip disables all six regression tests for recording pause/resume, including SDK event updates, task refreshes, and remount behavior. A regression in the recording-state fix can now pass CI unnoticed; resolve or isolate the scheduling race rather than removing the entire suite from the repository's coverage bar.
AGENTS.md reference: AGENTS.md:L91-L93
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80db8abd6e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const host = window as unknown as {store?: {currentTask?: {data?: {interactionId?: string}}}}; | ||
| const interactionId = host.store?.currentTask?.data?.interactionId; | ||
| if (!interactionId) throw new Error('No active interaction is available'); |
There was a problem hiding this comment.
Expose the store before evaluating browser-side helpers
The configured Playwright server runs samples-cc-react-app, but that app only imports the singleton and never assigns it to window.store; a repo-wide source search finds that assignment only in the separate Web Component sample. Consequently this lookup always throws after the call is accepted, and the harness installation plus both deterministic event dispatchers fail for the same reason, so the newly added SET_4 suites cannot complete. Expose the React app's store to the test page or inject a supported bridge before using these helpers.
AGENTS.md reference: AGENTS.md:L56-L57
Useful? React with 👍 / 👎.
COMPLETES #AD-HOC
This pull request addresses
Added e2e tests for Real Time Transcript and Real Time assist
by making the following changes
Change Type
The following scenarios were tested
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.