Skip to content

test: add API tests for custom profile fields management APIs #7454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: charles-log-11674-api-implementation
Choose a base branch
from

Conversation

charIeszhao
Copy link
Member

Summary

Add API integration tests for the CURD management APIs of custom profile fields.

Testing

CI

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

Copy link

COMPARE TO master

Total Size Diff ⚠️ 📈 +23.59 KB

Diff by File
Name Diff
packages/core/src/libraries/custom-profile-fields.ts 📈 +3.65 KB
packages/core/src/queries/custom-profile-fields.ts 📈 +2.34 KB
packages/core/src/routes/custom-profile-fields.openapi.json 📈 +4.62 KB
packages/core/src/routes/custom-profile-fields.ts 📈 +3.18 KB
packages/core/src/routes/init.ts 📈 +173 Bytes
packages/core/src/routes/swagger/utils/documents.ts 📈 +26 Bytes
packages/core/src/routes/swagger/utils/general.ts 📈 +109 Bytes
packages/core/src/routes/swagger/utils/operation-id.ts 📈 +80 Bytes
packages/core/src/tenants/Libraries.ts 📈 +164 Bytes
packages/core/src/tenants/Queries.ts 📈 +159 Bytes
packages/integration-tests/src/mocks/profile-fields-mock.ts 📈 +1.64 KB
packages/integration-tests/src/api/custom-profile-fields.ts 📈 +1.24 KB
packages/integration-tests/src/api/index.ts 📈 +44 Bytes
packages/integration-tests/src/tests/api/custom-profile-fields.test.ts 📈 +5.73 KB
packages/schemas/alterations/next-1749724664-drop-sie-order-constraint-from-custom-profile-fields.ts 📈 +533 Bytes
packages/schemas/tables/custom_profile_fields.sql 📈 +81 Bytes

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds API integration tests and support for managing custom profile fields.

  • Introduces custom-profile-fields API client methods and integrates them into the test suite.
  • Adds end-to-end tests covering create, read, update, failure cases, and reorder behavior.
  • Supplies mock data for various custom profile field types.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/integration-tests/src/tests/api/custom-profile-fields.test.ts New integration tests for CRUD and SIE reorder flows
packages/integration-tests/src/api/index.ts Export custom-profile-fields API group
packages/integration-tests/src/api/custom-profile-fields.ts Implements client calls for custom profile fields
packages/integration-tests/src/mocks/profile-fields-mock.ts Mock profiles used in tests
Comments suppressed due to low confidence (1)

packages/integration-tests/src/tests/api/custom-profile-fields.test.ts:24

  • [nitpick] There is no explicit test verifying successful deletion of a custom profile field. Consider adding a test that creates, deletes, and then asserts that the field no longer exists.
describe('custom profile fields API', () => {

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

Successfully merging this pull request may close these issues.

1 participant