Skip to content

fixed failed tests#336

Merged
sunil-lakshman merged 1 commit intodevelopmentfrom
fix/asset_fields_tests
Feb 27, 2026
Merged

fixed failed tests#336
sunil-lakshman merged 1 commit intodevelopmentfrom
fix/asset_fields_tests

Conversation

@sunil-lakshman
Copy link
Contributor

No description provided.

@sunil-lakshman sunil-lakshman marked this pull request as ready for review February 27, 2026 11:02
@sunil-lakshman sunil-lakshman requested a review from a team as a code owner February 27, 2026 11:02
@github-actions
Copy link

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 99.32% 877/883
🟢 Branches 97.23% 281/289
🟢 Functions 97.95% 191/195
🟢 Lines 99.4% 832/837

Test suite run success

653 tests passing in 31 suites.

Report generated by 🧪jest coverage report action from 117e7e6

@sunil-lakshman sunil-lakshman merged commit d134838 into development Feb 27, 2026
11 checks passed
@sunil-lakshman sunil-lakshman deleted the fix/asset_fields_tests branch February 27, 2026 11:04
AniketDev7 added a commit that referenced this pull request Feb 27, 2026
The previous PR #336 partially fixed asset_fields parameters but used
incorrect field names. This commit corrects all parameter names to match
the CDA API specification.

Changes:
- Changed 'ai_suggested' to 'ai_generated_metadata' in all test files
- Updated SDK documentation to reflect correct parameter names
- All asset_fields tests now pass (verified locally)

Valid asset_fields[] values per API:
- user_defined_fields
- embedded_metadata (not 'embedded')
- ai_generated_metadata (not 'ai_suggested')
- visual_markups

API Error that revealed the issue:
"Invalid values found, supported values are user_defined_fields,
embedded_metadata, ai_generated_metadata, visual_markups"

Files Modified:
- test/api/asset.spec.ts
- test/api/asset-query.spec.ts
- test/api/entry.spec.ts
- test/api/entries.spec.ts
- src/assets/asset.ts (JSDoc)
- src/query/asset-query.ts (JSDoc)
- src/entries/entry.ts (JSDoc)
- src/entries/entries.ts (JSDoc)

Test Results: All 16 asset_fields tests passing (8 API + 8 unit)
AniketDev7 added a commit that referenced this pull request Feb 27, 2026
The previous PR #336 partially fixed asset_fields parameters but used
incorrect field names. This commit corrects all parameter names to match
the CDA API specification.

Changes:
- Changed 'ai_suggested' to 'ai_generated_metadata' in all test files
- Updated SDK documentation to reflect correct parameter names
- All asset_fields tests now pass (verified locally)

Valid asset_fields[] values per API:
- user_defined_fields
- embedded_metadata (not 'embedded')
- ai_generated_metadata (not 'ai_suggested')
- visual_markups

API Error that revealed the issue:
"Invalid values found, supported values are user_defined_fields,
embedded_metadata, ai_generated_metadata, visual_markups"

Files Modified:
- test/api/asset.spec.ts
- test/api/asset-query.spec.ts
- test/api/entry.spec.ts
- test/api/entries.spec.ts
- src/assets/asset.ts (JSDoc)
- src/query/asset-query.ts (JSDoc)
- src/entries/entry.ts (JSDoc)
- src/entries/entries.ts (JSDoc)

Test Results: All 16 asset_fields tests passing (8 API + 8 unit)
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.

2 participants