feat(cc-widgets): outdial widget e2e tests#640
Conversation
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
e694b97 to
6f9a30b
Compare
There was a problem hiding this comment.
💡 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".
6f9a30b to
5b6eddd
Compare
There was a problem hiding this comment.
💡 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".
5b6eddd to
d2f5f95
Compare
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
💡 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); |
There was a problem hiding this comment.
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> { |
There was a problem hiding this comment.
🟡 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.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
🟡 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.
There was a problem hiding this comment.
Not seeing issues with shared SET_6 currently. Both suites have afterAll cleanup that handles session teardown.
Shreyas281299
left a comment
There was a problem hiding this comment.
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.
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
The following scenarios were tested
The GAI Coding Policy And Copyright Annotation Best Practices