Skip to content

feat(cc-widgets): Add multi-party conference E2E suites for SET_7 and SET_8#624

Merged
rsarika merged 34 commits intowebex:nextfrom
rsarika:multi-party-conference-e2e-tests
Mar 11, 2026
Merged

feat(cc-widgets): Add multi-party conference E2E suites for SET_7 and SET_8#624
rsarika merged 34 commits intowebex:nextfrom
rsarika:multi-party-conference-e2e-tests

Conversation

@rsarika
Copy link
Copy Markdown
Contributor

@rsarika rsarika commented Feb 18, 2026

COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7322

This pull request addresses

Missing and uneven multi-party conference E2E coverage for the conference matrix scenarios, where tests were not logically split for parallel execution by set, and conference merge actions could intermittently fail due to missing button readiness checks.

by making the following changes

  • Added a shared multi-party conference E2E implementation in playwright/tests/conference-transfer-switch-test.spec.ts.
  • Split coverage into two logical suites for parallel runs:
    • SET_7: MPC scenarios (CTS-MPC-01..16)
    • SET_8: Transfer + Switch scenarios (CTS-TC-01..05, CTS-SW-01..05)
  • Added suite files under playwright/suites/ following existing structure:
    • conference-mpc-transfer-tests.spec.ts
    • conference-switch-tests.spec.ts
  • Updated set mappings in playwright/test-data.ts for SET_7 and SET_8.
  • Added conference desktop setup support in playwright/test-manager.ts for 4-agent conference flows.
  • Added explicit merge-button readiness validation (visible + enabled) before merge click in conference setup flows.
  • Kept out-of-scope cases as expected skip/fixme per agreed scope (TC14, TC20, TC17-19).

The following scenarios were tested

  • yarn test:e2e --project=SET_7
  • yarn test:e2e --project=SET_8
  • yarn test:e2e --project=SET_7 --project=SET_8

Result:

  • Combined execution passed with expected skip/fixme cases only.

@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-624.d1b38q61t1z947.amplifyapp.com

@rsarika rsarika 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 Feb 18, 2026
@rsarika
Copy link
Copy Markdown
Contributor Author

rsarika commented Feb 18, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

Copy link
Copy Markdown
Contributor

@akulakum akulakum left a comment

Choose a reason for hiding this comment

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

PR Review: feat(cc-widgets): Add multi-party conference E2E suites for SET_7 and SET_8

Summary

Good test coverage for multi-party conference scenarios. The PR adds comprehensive E2E tests for MPC, transfer, and switch flows with proper retry patterns and cleanup handling.

Critical Issues (Must Fix)

  1. Missing global.setup.ts updates - setupForConferenceDesktop expects AGENT3_ACCESS_TOKEN and AGENT4_ACCESS_TOKEN, but global.setup.ts only handles AGENT1/AGENT2 OAuth flows. SET_7/SET_8 tests will fail at runtime.

  2. Missing PAGE_TYPES updates - constants.ts needs AGENT3 and AGENT4 page types for consistency with TestManager changes.

Medium Issues

  1. skipOAuth should be environment-driven - Currently hardcoded; should use process.env.PW_SKIP_OAUTH

  2. Excessive waitForTimeout usage - ~15+ occurrences of hardcoded waits; prefer explicit condition waits for reliability

  3. Helper functions should be extracted - setAgentState, ensureAgentsIdle, submitWrapupIfVisible, clickMergeWhenReady could be reusable utilities in Utils/conferenceUtils.ts

Minor Issues

  1. Factory pattern deviation - New parameterized factory differs from existing convention (functional but inconsistent)

  2. 5-minute test timeout - Consider per-test timeouts instead of blanket 300s

  3. Missing env var validation in getAgentNames()

Documentation Issues

  1. Set-to-suite mapping outdated - playwright/ai-docs/AGENTS.md and ai-docs/templates/playwright/00-master.md don't include SET_7/SET_8 mappings

  2. Missing setupForConferenceDesktop in TestManager methods list in docs

Positive Observations

✅ Good retry patterns in createInboundAndAccept and consultAgentWithRetry
✅ Proper error handling with .catch(() => {})
✅ Parallel context creation for performance
✅ Explicit merge-button readiness validation (addresses flakiness mentioned in PR description)
✅ Clear test naming convention (CTS-MPC-01, CTS-TC-01, etc.)
✅ Well-structured Playwright template hierarchy in ai-docs/templates/playwright/

Comment thread playwright.config.ts Outdated
Comment thread playwright/test-data.ts
Comment thread playwright/test-manager.ts Outdated
Comment thread playwright/test-manager.ts Outdated
Comment thread playwright/tests/conference-transfer-switch-test.spec.ts Outdated
Comment thread playwright/tests/conference-transfer-switch-test.spec.ts Outdated
Comment thread playwright/tests/conference-transfer-switch-test.spec.ts Outdated

export type ConferenceSuiteGroup = 'all' | 'mpc' | 'transfer-switch' | 'mpc-transfer' | 'switch';

async function setAgentState(page: Page, state: string): Promise<void> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: These helper functions (setAgentState, ensureAgentsIdle, submitWrapupIfVisible, clickMergeWhenReady, etc.) are generic and reusable.

Consider extracting them to Utils/conferenceUtils.ts for consistency with existing utility patterns and reusability in future conference tests.

// playwright/Utils/conferenceUtils.ts
export async function setAgentState(page: Page, state: string): Promise<void> { ... }
export async function ensureAgentsIdle(pages: Page[]): Promise<void> { ... }
export async function submitWrapupIfVisible(page: Page): Promise<void> { ... }
export async function clickMergeWhenReady(ownerPage: Page): Promise<void> { ... }

Comment thread playwright/tests/conference-transfer-switch-test.spec.ts Outdated
Comment thread playwright/suites/conference-mpc-transfer-tests.spec.ts Outdated
@Shreyas281299
Copy link
Copy Markdown
Contributor

@codex review

Copy link
Copy Markdown

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

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: a1ae3d74d4

ℹ️ 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 playwright/tests/conference-transfer-switch-test.spec.ts Outdated
@rsarika rsarika requested a review from akulakum February 23, 2026 06:31
@rsarika rsarika force-pushed the multi-party-conference-e2e-tests branch from 218548a to adb3d19 Compare March 4, 2026 09:51
@rsarika rsarika requested a review from a team as a code owner March 4, 2026 09:51
Copy link
Copy Markdown

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

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: 5f5fe689c8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread playwright/global.setup.ts Outdated
Copy link
Copy Markdown

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

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: be6585adf8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +74 to +75
await Promise.race([handleStrayTasks(page, validAuxiliaryPage), timeoutPromise]);
} catch {
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 Prevent timed-out cleanup from leaking into next test

safeHandleStrayTasks uses Promise.race with a 60s timeout, but when the timeout wins, handleStrayTasks(...) keeps running in the background because it is never canceled. In that case beforeEach/afterEach can return and the next test starts while the previous cleanup is still clicking end/wrapup controls on the same pages, which creates nondeterministic cross-test interference and flaky conference results.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

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

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: 121ac907ba

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread playwright/Utils/advancedTaskControlUtils.ts
Comment thread playwright/global.setup.ts Outdated
Copy link
Copy Markdown

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

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: 3caeeb4e06

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread playwright/tests/multiparty-conference-set-7-test.spec.ts
Copy link
Copy Markdown

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

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: 8b001150dd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread playwright/Utils/conferenceUtils.ts
Comment thread playwright/Utils/conferenceUtils.ts
Comment thread playwright/tests/multiparty-conference-set-9-test.spec.ts
Copy link
Copy Markdown

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

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: 9b9fb612e1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread playwright/Utils/conferenceUtils.ts
Copy link
Copy Markdown

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

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: 05ebcfc147

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread playwright/Utils/conferenceUtils.ts
@rsarika rsarika force-pushed the multi-party-conference-e2e-tests branch from 05ebcfc to 3caeeb4 Compare March 9, 2026 16:10
Copy link
Copy Markdown

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

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: 855e4f0464

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread playwright/Utils/conferenceUtils.ts
@rsarika rsarika closed this Mar 10, 2026
@rsarika rsarika force-pushed the multi-party-conference-e2e-tests branch from 4e57920 to 2961cf0 Compare March 10, 2026 01:41
@rsarika rsarika reopened this Mar 10, 2026
@rsarika rsarika force-pushed the multi-party-conference-e2e-tests branch from 855e4f0 to 3caeeb4 Compare March 10, 2026 01:51
Copy link
Copy Markdown

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

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: 66e28c39bb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread playwright/Utils/taskControlUtils.ts Outdated
Copy link
Copy Markdown

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

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: 6812bca655

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +178 to +181
private async runBestEffortWithTimeout(operation: () => Promise<void>, timeout: number = OPERATION_TIMEOUT): Promise<void> {
const guardedOperation = operation().catch(() => {});
const timeoutGuard = new Promise<void>((resolve) => setTimeout(resolve, timeout));
await Promise.race([guardedOperation, timeoutGuard]);
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 Clear timeout guard after best-effort race returns

runBestEffortWithTimeout schedules a setTimeout for each call but never clears it when operation() finishes first. Since safeHandleStrayTasks/safeStationLogout call this repeatedly during softCleanup() and cleanup(), successful cleanups still leave many 30s+ active timers, which can keep the worker event loop alive and noticeably delay or hang teardown at suite end. Store the timeout handle and clearTimeout it once the raced operation settles.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

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

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: 1715146b51

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +44 to +45
hasVisibleEndControl: false,
hasVisibleWrapup: true,
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 Don't require all end controls to disappear before wrap-up

waitForWrapupAfterCallEnd currently requires hasVisibleEndControl: false before it succeeds, but these flows can still have a visible (often disabled) end-call control while wrap-up is already the correct actionable state; this commit’s other control-handling code already accounts for that pattern. With the new call-site in incoming telephony, this strict condition can timeout healthy call-end flows and fail tests even when wrap-up is ready. Gate on wrap-up readiness instead of full end-control disappearance.

Useful? React with 👍 / 👎.

Comment thread playwright/Utils/conferenceUtils.ts Outdated
Comment on lines +224 to +227
const hasEndControl = await getAgentPage(1)
.getByTestId('call-control:end-call')
.first()
.isVisible()
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 Check any visible end control in baseline call readiness

startBaselineCallOnAgent1 validates readiness using only call-control:end-call.first(). In conference layouts with multiple control groups, the first match can be hidden while another end control is visible/enabled (which is why this commit added multi-control scans in other helpers), so hasEndControl can stay false and the readiness poll times out despite a valid active call. Scan all matching end controls (or reuse the shared visible-control helper) before failing baseline setup.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

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

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: 1c36e05221

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +168 to +170
const controlCount = await controls.count().catch(() => 0);

for (let i = 0; i < controlCount; i++) {
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 Retry until consult/transfer control becomes actionable

openConsultOrTransferMenu now snapshots controls.count() once and immediately throws when no visible+enabled control is present, so it no longer waits for the consult/transfer button to appear after recent state transitions (for example, right after accept/merge/cancel). In these common timing windows the function fails with No visible enabled ... control found even though the control becomes actionable within the existing timeout budget, introducing avoidable flakiness across all consultOrTransfer(...) callers.

Useful? React with 👍 / 👎.

Comment on lines +100 to +104
const hasEnd = await page
.getByTestId('call-control:end-call')
.first()
.isVisible()
.catch(() => false);
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 Detect post-disconnect controls across all rendered groups

This readiness check only inspects .first() for both call-control:end-call and call-control:wrapup-button, but conference pages can render multiple control groups where the first match is hidden while another instance is visible/enabled. In that layout, expectPostCustomerLeaveControls can timeout after customer disconnect even though valid end or wrap-up controls are already present, causing false failures in CTS-MPC-07/09/10.

Useful? React with 👍 / 👎.

@rsarika rsarika merged commit 3876709 into webex:next Mar 11, 2026
7 of 8 checks passed
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.

3 participants