Conversation
Add task type G (E2E Test Work) to root AGENTS.md orchestrator with decision tree, signal keywords, routing, context loading, and service routing table entries. Create complete template set (00-master through 04-validation), playwright-specific AGENTS.md and ARCHITECTURE.md with TestManager, Utils, Constants, and Console Log Verification reference, and e2e-patterns.md covering 8 patterns + anti-patterns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tion Add cc_playwright directory with E2E test infrastructure, configure Playwright with playwright.config.ts, and update dependencies. Update contact-center sample app for testing support. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 653a669185
ℹ️ 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".
| process.env[key] = value; | ||
| } | ||
|
|
||
| envContent = envContent.replace(/\n{3,}/g, '\n\n'); | ||
| fs.writeFileSync(ENV_PATH, envContent, 'utf8'); |
There was a problem hiding this comment.
Propagate OAuth tokens beyond setup worker
This only updates process.env inside the OAuth setup test worker and writes .env to disk, but dependent projects read tokens directly from process.env (for example in TestManager.getEnvTokens) without reloading from file. In Playwright project-dependency runs, that means the fresh ${SET}_AGENT*_ACCESS_TOKEN values generated here are not reliably visible to the actual test projects, so runs can fail with empty or expired tokens.
Useful? React with 👍 / 👎.
| if (state === 'new' && !agentJoined) { | ||
| const taskCreatedAt = taskCreationTimes.get(taskId); | ||
| const taskAgeMs = Date.now() - taskCreatedAt; | ||
|
|
||
| if (taskAgeMs > ALERTING_STALE_THRESHOLD_MS) { | ||
| console.warn( | ||
| `⚠️ Customer disconnect in ALERTING detected - filtering stale task ${taskId} ` + | ||
| `(age: ${Math.round(taskAgeMs/1000)}s, threshold: ${ALERTING_STALE_THRESHOLD_MS/1000}s)` | ||
| ); | ||
| taskCreationTimes.delete(taskId); // Clean up tracking | ||
| return false; |
There was a problem hiding this comment.
Avoid timing out valid NEW tasks from task list
This filters out any task that stays in state === 'new' for more than 25 seconds when the agent has not joined, but that state can legitimately persist for digital tasks (chat/email/social) and longer queue scenarios. In those cases the task is still actionable, yet it disappears from the UI and the agent loses the ability to accept it.
Useful? React with 👍 / 👎.
…tors
Migrated advanced task control and basic task control tests from widget-style
data-testid selectors to sample app plain HTML ID selectors.
Key changes:
- Fixed waitForPrimaryCallAfterConsult() to use #consult, #end-consult, #end buttons
instead of widget testids (call-control:consult, call-control:end-call)
- Fixed isCallHeld() to check button text ("Resume"/"Hold") instead of icon name
- Added consultTransferWorkaround.ts to handle SDK limitation where consultingAgentId
is not populated in task data
- Updated submitWrapup() to use #wrapupCodesDropdown and #wrapup button
- Improved login detection in pageSetup() to check logout button visibility,
login mode selection, AND state dropdown (more reliable than single check)
- Updated afterAll cleanup to check #end button visibility instead of Engaged state
(Desktop mode doesn't auto-transition to Engaged)
- Added ESLint rules for Playwright test patterns (no-await-in-loop, etc.)
Test results: 10 passed, 2 skipped, 0 failed (100% success rate)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4fe16f3d4d
ℹ️ 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 {defineConfig, devices} from '@playwright/test'; | ||
| import dotenv from 'dotenv'; | ||
| import path from 'path'; | ||
| import {USER_SETS} from './cc_playwright/test-data'; |
There was a problem hiding this comment.
Load dotenv before importing USER_SETS
USER_SETS is imported before dotenv.config({path: ...}), so cc_playwright/test-data.ts is evaluated before cc_playwright/.env is loaded and it snapshots ENTRY_POINT/CHAT_URL values from an uninitialized environment. In runs where variables are provided via cc_playwright/.env (the file global setup writes), this yields empty or undefined-* set values, and downstream setup propagates blank ${SET}_ENTRY_POINT/${SET}_CHAT_URL, breaking call/chat task creation.
Useful? React with 👍 / 👎.
| }); | ||
|
|
||
| test.beforeEach(async () => { | ||
| testManager.softCleanup(); |
There was a problem hiding this comment.
Await soft cleanup before resetting agent states
softCleanup() is async, but this hook does not await it, so stray-task cleanup can run concurrently with the next test's state changes. When cleanup is still in progress, the following test starts with leftover task/wrapup UI and becomes flaky (for example, state transitions and incoming-task assertions race with unfinished teardown).
Useful? React with 👍 / 👎.
Retained only the two core test suites and their dependencies: - station-login-user-state-tests.spec.ts (uses: station-login-test, user-state-test, incoming-telephony-task-test) - basic-advanced-task-controls-tests.spec.ts (uses: basic-task-controls-test, advance-task-control-combinations-test) Removed suites: - advanced-task-controls-tests - dial-number-tests - digital-incoming-task-tests - multiparty-conference-set-7/8/9-tests - task-list-multi-session-tests Removed test files: - advanced-task-controls-test - dial-number-task-control-test - digital-incoming-task-and-task-controls - incoming-task-and-controls-multi-session - multiparty-conference-set-7/8/9-test - tasklist-test All utility files remain intact for use by the retained test suites. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3dcea68473
ℹ️ 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".
| CHAT_URL: `${env.PW_CHAT_URL}-e2e.html`, | ||
| EMAIL_ENTRY_POINT: `${env.PW_SANDBOX}.e2e@gmail.com`, | ||
| ENTRY_POINT: env.PW_ENTRY_POINT1, | ||
| TEST_SUITE: 'digital-incoming-task-tests.spec.ts', |
There was a problem hiding this comment.
Point each USER_SET to an existing suite file
This TEST_SUITE mapping (and similar entries for SET_2 and SET_5–SET_9) references suite filenames that are not present under cc_playwright/suites in this commit, so those Playwright projects will be created but execute zero tests. That silently drops most configured set coverage while still running setup/dependency work, which can make CI look green without actually validating those sets.
Useful? React with 👍 / 👎.
| taskCreationTimes.delete(taskId); // Clean up tracking | ||
| return false; |
There was a problem hiding this comment.
Preserve stale-task timestamps until task is removed
Deleting the timestamp when a task first crosses the stale threshold causes the same still-present task to be treated as brand new on the next renderTaskList() call (taskCreationTimes is recreated at first sight), so orphaned tasks can reappear for another 25s and then disappear again in cycles. This makes filtering non-deterministic whenever unrelated updates trigger another render; keep the timestamp until the task actually leaves taskList.
Useful? React with 👍 / 👎.
… improved advanced controls - Enhanced advancedTaskControlUtils with dialog visibility waits instead of fixed timeouts - Implemented smart dropdown selection for handling duplicate IDs (#consultDestination, #transfer-destination) - Added 7 test suite orchestration files covering all test scenarios - Added 9 test implementation files for comprehensive E2E coverage - Fixed basic-task-controls-test with proper UI cleanup verification Test coverage: digital tasks, task lists, multi-session, station login, user states, basic/advanced task controls, dial number, and multiparty conference (3 sets). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
COMPLETES #< https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7523>
This pull request addresses
by making the following changes
< Contains tests for station login, user state management, telephony tasks and basic call task controls>
Change Type
The following scenarios were tested
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
The GAI Coding Policy And Copyright Annotation Best Practices
I certified that
Make sure to have followed the contributing guidelines before submitting.