test(calling): added palywright E2E test for Calling sdk contacts#4960
test(calling): added palywright E2E test for Calling sdk contacts#4960vivekv1504 wants to merge 2 commits intowebex:nextfrom
Conversation
There was a problem hiding this comment.
💡 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".
| contacts | ||
| .filter((c) => c.contactType === 'CUSTOM') | ||
| .map((c) => safeDeleteContact(page, c.contactId)) | ||
| ); |
There was a problem hiding this comment.
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 👍 / 👎.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
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
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.