Skip to content

feat(cc-widgets): outdial widget e2e tests#640

Merged
eigengravy merged 8 commits intowebex:nextfrom
eigengravy:outdial-e2e-tests
Mar 18, 2026
Merged

feat(cc-widgets): outdial widget e2e tests#640
eigengravy merged 8 commits intowebex:nextfrom
eigengravy:outdial-e2e-tests

Conversation

@eigengravy
Copy link
Contributor

@eigengravy eigengravy commented Mar 4, 2026

COMPLETES CAI-7682

This pull request addresses

Adding end-to-end Playwright tests for the outdial call workflow across two agent login modes (Desktop and Extension).

by making the following changes

  • Added playwright/tests/outdial-call-test.spec.ts — new E2E test suite with three describe blocks covering the full outdial lifecycle (enter number, dial, connect, verify call controls, end call, wrapup) for:
    • Desktop mode — auto-connect first leg, no manual accept
    • Extension mode — first leg rings on Webex Calling extension, agent must answer before customer is dialed
    • Updated playwright/suites/station-login-user-state-tests.spec.ts — wired the new createOutdialCallTests into the existing suite entrypoint
    • Updated OutdialCall/ARCHITECTURE.md — documented the post-dial flow by login mode with Mermaid sequence diagrams explaining auto-connect (Desktop) vs manual-answer (Extension) behavior
    • Updated playwright/ai-docs/ — minor updates to AGENTS.md and ARCHITECTURE.md to reflect the new outdial test coverage

The following scenarios were tested

  • yarn test:e2e --project=SET_3 --grep "Outdial"

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
    • Claude Code
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

@aws-amplify-us-east-2
Copy link

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

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

@eigengravy eigengravy changed the title OutDial Widget e2e tests feat(cc-widgets): outdial widget e2e tests Mar 5, 2026
@eigengravy eigengravy force-pushed the outdial-e2e-tests branch 2 times, most recently from e694b97 to 6f9a30b Compare March 10, 2026 05:18
@eigengravy eigengravy marked this pull request as ready for review March 10, 2026 05:18
@eigengravy eigengravy requested a review from a team as a code owner March 10, 2026 05:18
Copy link

@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: 6f9a30ba55

ℹ️ 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".

@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 Mar 11, 2026
Copy link

@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: 5b6edddcdf

ℹ️ 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".

Copy link

@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: d2f5f9592d

ℹ️ 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".

Copy link

@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: 43f98cde15

ℹ️ 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".

Copy link

@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: 217573a34e

ℹ️ 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".

Copy link

@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: 33bf3bad7c

ℹ️ 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".

import createOutdialCallTests from '../tests/outdial-call-test.spec';

test.describe('Dial Number Task Control Tests', createDialNumberTaskControlTests);
test.describe('Outdial Call Tests', createOutdialCallTests);

Choose a reason for hiding this comment

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

P1 Badge Split outdial tests from dial-number suite state

Adding createOutdialCallTests to SET_6 makes these tests run after createDialNumberTaskControlTests, but that test factory never performs a full testManager.cleanup() teardown, so the first agent session remains active in Desktop mode before outdial setup starts. In a full --project=SET_6 run, setupForOutdialDesktop then reuses the same ${projectName}_AGENT1_ACCESS_TOKEN for a second station login while the prior session is still alive, which can block the new login and fail the outdial suite before test steps begin.

Useful? React with 👍 / 👎.

});
}

async setupForOutdialDesktop(browser: Browser): Promise<void> {
Copy link
Contributor

Choose a reason for hiding this comment

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

🟡 Medium Severity - No cleanup on setup failure

These methods call this.setup() followed by this.setupOutdialCustomer(). If setupOutdialCustomer fails, the agent setup from this.setup() is already done but won't be cleaned up since the test will fail in beforeAll.

Impact: Resource leaks and potential conflicts in subsequent test runs.

Suggestion: Consider wrapping in try/catch with cleanup, or document that cleanup is the caller's responsibility on setup failure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No other test in the codebase uses try/catch in beforeAll — the convention is to let failures propagate to the test runner. Added the if (testManager) guard in afterAll to match the pattern used across all other test files (14 instances).

import createOutdialCallTests from '../tests/outdial-call-test.spec';

test.describe('Dial Number Task Control Tests', createDialNumberTaskControlTests);
test.describe('Outdial Call Tests', createOutdialCallTests);
Copy link
Contributor

Choose a reason for hiding this comment

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

🟡 Medium Severity - Test isolation concern

The outdial tests now share SET_6 with dial-number task control tests. If the dial-number tests don't fully clean up their agent sessions in afterAll, the subsequent outdial setup may conflict with stale session state.

Impact: Potential test conflicts and failures.

Suggestion: Verify that dial-number-task-control-test.spec.ts has proper afterAll cleanup, or consider running outdial tests in a separate suite/set for better isolation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not seeing issues with shared SET_6 currently. Both suites have afterAll cleanup that handles session teardown.

Copy link
Contributor

@Shreyas281299 Shreyas281299 left a comment

Choose a reason for hiding this comment

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

Review Summary: Found 2 High severity and 7 Medium severity issues. High: env-var validation problems causing unhelpful test failures. Medium: multiple hard-coded timeouts (flaky test anti-patterns), inconsistent test patterns, and test isolation concerns. Please address the High severity issues and consider fixing the Medium severity timeouts to improve test reliability.

Copy link
Contributor

@Shreyas281299 Shreyas281299 left a comment

Choose a reason for hiding this comment

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

Changes look good, lets ensure the e2e test failure is not due to this PR.

@eigengravy eigengravy merged commit d87aa93 into webex:next Mar 18, 2026
7 of 8 checks passed
@eigengravy eigengravy deleted the outdial-e2e-tests branch March 18, 2026 10:47
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