Skip to content

feat(ccwidgets): add e2e tests for real time transcript and real time assist - #729

Open
Kesari3008 wants to merge 10 commits into
nextfrom
RealTime-Assist-E2E
Open

feat(ccwidgets): add e2e tests for real time transcript and real time assist#729
Kesari3008 wants to merge 10 commits into
nextfrom
RealTime-Assist-E2E

Conversation

@Kesari3008

@Kesari3008 Kesari3008 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • The testing is done with the amplify link
    < ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the testing document
  • I have tested the functionality with amplify link

Make sure to have followed the contributing guidelines before submitting.

@Kesari3008
Kesari3008 requested a review from a team as a code owner August 4, 2026 07:04
@Kesari3008 Kesari3008 added the validated Indicates that the PR is ready for actions label Aug 4, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +77 to +78
test('Requesting suggestions moves the panel into listening mode and renders a suggestion', async () => {
await requestRealTimeAssistSuggestions(testManager.agent1Page);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@aws-amplify-us-east-2

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-729.d1b38q61t1z947.amplifyapp.com

@Kesari3008 Kesari3008 added the run_e2e Add this label to run E2E test for meeting and CC widgets label Aug 4, 2026
@github-actions github-actions Bot removed the validated Indicates that the PR is ready for actions label Aug 4, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +51 to +52
data-testid="real-time-transcript:item"
data-speaker-role={entry.isCustomer ? 'customer' : 'agent'}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@Kesari3008 Kesari3008 added the validated Indicates that the PR is ready for actions label Aug 4, 2026
@github-actions github-actions Bot removed the validated Indicates that the PR is ready for actions label Aug 4, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +318 to +321
backingStore.featureFlags = {
...(backingStore.featureFlags ?? {}),
isSuggestedResponsesEnabled: nextEnabled,
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@Kesari3008 Kesari3008 added the validated Indicates that the PR is ready for actions label Aug 5, 2026
@github-actions github-actions Bot removed the validated Indicates that the PR is ready for actions label Aug 5, 2026
@Kesari3008 Kesari3008 added the validated Indicates that the PR is ready for actions label Aug 5, 2026
@github-actions github-actions Bot removed the validated Indicates that the PR is ready for actions label Aug 6, 2026
@Kesari3008 Kesari3008 added the validated Indicates that the PR is ready for actions label Aug 6, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread package.json
Comment on lines +57 to +58
"test:e2e:cc": "yarn workspace @webex/cc-widgets run test:e2e",
"test:e2e:meetings": "yarn workspace @webex/widgets run test:e2e",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@Kesari3008 Kesari3008 added validated Indicates that the PR is ready for actions and removed validated Indicates that the PR is ready for actions run_e2e Add this label to run E2E test for meeting and CC widgets labels Aug 6, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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', () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@github-actions github-actions Bot removed the validated Indicates that the PR is ready for actions label Aug 7, 2026
@Kesari3008 Kesari3008 added validated Indicates that the PR is ready for actions run_e2e Add this label to run E2E test for meeting and CC widgets labels Aug 7, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +303 to +305
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');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@github-actions github-actions Bot removed the validated Indicates that the PR is ready for actions label Aug 7, 2026
@Kesari3008 Kesari3008 added validated Indicates that the PR is ready for actions run_e2e Add this label to run E2E test for meeting and CC widgets and removed run_e2e Add this label to run E2E test for meeting and CC widgets labels Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run_e2e Add this label to run E2E test for meeting and CC widgets validated Indicates that the PR is ready for actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant