Skip to content

test(calling): added palywright E2E test for Calling sdk contacts#4960

Open
vivekv1504 wants to merge 2 commits intowebex:nextfrom
vivekv1504:callingSDK-contacts
Open

test(calling): added palywright E2E test for Calling sdk contacts#4960
vivekv1504 wants to merge 2 commits intowebex:nextfrom
vivekv1504:callingSDK-contacts

Conversation

@vivekv1504
Copy link
Copy Markdown
Contributor

@vivekv1504 vivekv1504 commented May 6, 2026

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

This pull request addresses

The Contacts supplementary service in the Calling SDK lacked E2E test coverage.
This change adds a Playwright E2E test suite for the ContactsClient API, covering contact list retrieval, contact group CRUD, contact creation, and contact deletion against both PROD and INT environments. Linked to Jira ticket CAI-7877.

by making the following changes

  • Added packages/calling/playwright/suites/contacts.spec.ts — entry point that
    registers all 4 Contacts test suites

  • Added packages/calling/playwright/test-groups/contacts.ts — 19 test cases
    (CONT-001 to CONT-019) across 4 suites:

    Suite 1 — Contact List (CONT-001 to CONT-004):
    • getContacts returns valid response shape (contacts and groups arrays)
    • Each contact has required fields and correct contactType
    • Each group has required fields and correct groupType
    • CUSTOM contact displayName is returned decrypted

    Suite 2 — Contact Group CRUD (CONT-005 to CONT-010):
    • Create group with NORMAL type succeeds (201)
    • Create group with EXTERNAL type persists correctly
    • Duplicate displayName returns 400 error
    • Created group appears in subsequent getContacts call
    • Delete group returns 204 with no error
    • Deleted group no longer appears in getContacts

    Suite 3 — Create Contact (CONT-011 to CONT-017):
    • CUSTOM contact with minimal fields succeeds (201)
    • All optional fields (name, company, emails, phones, SIP) are persisted
    • Contact with empty groups is auto-assigned to default group
    • Contact is assigned to a specified group
    • CLOUD contact without contactId returns 400
    • Unknown contactType returns 400
    • Created contact appears in getContacts with correct fields

    Suite 4 — Delete Contact (CONT-018 to CONT-019):
    • Delete contact returns 204 and contact is removed from getContacts
    • Deleting a non-existent contactId returns 4xx error

  • Updated packages/calling/playwright.config.ts — added SET_CONTACTS project
    for both PROD and INT environments

  • Updated packages/calling/playwright/test-data.ts — registered SET_CONTACTS
    user set using USER_6 account

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

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
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • 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

Make sure to have followed the contributing guidelines before submitting.

@vivekv1504 vivekv1504 requested a review from a team as a code owner May 6, 2026 18:41
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: 7a2382f4f1

ℹ️ 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 +169 to +172
contacts
.filter((c) => c.contactType === 'CUSTOM')
.map((c) => safeDeleteContact(page, c.contactId))
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Limit cleanup to records created by these tests

When the contacts suite runs against the configured PROD/INT projects, this cleanup deletes every existing CUSTOM contact for the authenticated account, not just the CONT-* records created by the test. If the E2E account contains seeded/manual contacts, each suite's afterAll will permanently remove them; cleanup should track created IDs or filter by the test prefix before deleting.

Useful? React with 👍 / 👎.

@vivekv1504 vivekv1504 added the validated If the pull request is validated for automation. label May 6, 2026
@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-4960.d3m3l2kee0btzx.amplifyapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant