Skip to content

feat(contact-center): add Playwright E2E ai-docs framework for migration#4752

Open
ciscoRankush wants to merge 1 commit intowebex:task-refactorfrom
ciscoRankush:CAI-7523
Open

feat(contact-center): add Playwright E2E ai-docs framework for migration#4752
ciscoRankush wants to merge 1 commit intowebex:task-refactorfrom
ciscoRankush:CAI-7523

Conversation

@ciscoRankush
Copy link

@ciscoRankush ciscoRankush commented Mar 5, 2026

This pull request addresses

The @webex/contact-center package currently has zero E2E tests. The existing browser testing uses WebdriverIO (wdio.conf.js) for browser-plugin-meetings only. This PR establishes the complete AI-docs framework for a Playwright E2E migration, mirroring the patterns established in ccWidgets' Playwright framework but adapted for SDK-level testing (SUT is the vanilla JS sample app at docs/samples/contact-center/).

This PR adds task type G (E2E Test Work) to the root AGENTS.md orchestrator so AI agents can properly route, classify, and implement Playwright E2E tasks.

by making the following changes

Root AGENTS.md updates (1 file modified)

  • Added task type G to Quick Start Workflow (A-F → A-G)
  • Added Q0 (Playwright E2E) as first question in Task Classification Decision Tree
  • Added G row to Signal Keywords table
  • Added G option to Disambiguation Rule
  • Added G routing block to Task Type Routing section
  • Added "For E2E Test Work" to Context Loading section
  • Added playwright/ tree to Repository Structure
  • Added Playwright E2E row to Service Routing Table
  • Added Playwright docs to Documentation Update Gate
  • Added E2E patterns link to Need More Context section

E2E templates (5 new files)

  • ai-docs/templates/e2e/00-master.md — Orchestrator with 11 E2E task types (G1-G11)
  • ai-docs/templates/e2e/01-pre-questions.md — 12 mandatory questions across 5 sections, including SDK Methods Under Test
  • ai-docs/templates/e2e/02-test-implementation.md — 4 implementation paths (A: new test, B: new suite/SET, C: fix flaky/broken, D: update for SDK change)
  • ai-docs/templates/e2e/03-framework-and-doc-updates.md — MANDATORY doc update checklist (not optional)
  • ai-docs/templates/e2e/04-validation.md — Test execution commands and documentation sync checklist

Playwright ai-docs (2 new files)

  • playwright/ai-docs/AGENTS.md — Usage guide, common commands, baseline counts, context for new contributors
  • playwright/ai-docs/ARCHITECTURE.md — Full technical reference: SUT (sample app DOM elements → SDK methods), TestManager (constructor, SetupConfig with 10 options, 7 page properties, 3-phase parallel setup, cleanup), Utils reference (8 files), Constants (7 enums, 12-level timeout hierarchy, console patterns), Console Log Verification Pattern, Set→Suite→Test mapping, file topology, extension points, stability principles

E2E patterns (1 new file)

  • ai-docs/patterns/e2e-patterns.md — 8 reusable patterns (test factory, console log verification, multi-agent coordination, setup/cleanup lifecycle, timeout selection, state verification, network resilience, RONA handling) + anti-patterns section

Change Type

  • Documentation update
  • New feature (non-breaking change which adds functionality)

The following scenarios were tested

  • Verified all internal markdown links resolve correctly
  • Verified AGENTS.md decision tree routes Task Type G before other types (Q0 position)
  • Verified Service Routing Table includes Playwright E2E row with correct paths
  • Verified Repository Structure tree matches actual new file locations
  • Verified ARCHITECTURE.md DOM element table matches actual docs/samples/contact-center/app.js selectors
  • Verified timeout hierarchy values match ccWidgets constants.ts reference
  • Verified all 9 files have no conflicts with upstream/task-refactor base

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was used to create a draft that was subsequently customized or modified
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Other - Claude Code (Anthropic)
  • This PR is related to
    • Feature
    • Automation

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

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>
@ciscoRankush ciscoRankush requested a review from a team as a code owner March 5, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant