Conversation
… starting queryGenerator test coverage
This reverts commit e241998.
There was a problem hiding this comment.
Pull request overview
This PR adds three new searchable properties (study_type, institute, and experimental_approaches) to dataset search functionality and introduces comprehensive test coverage for the search API and query builder. The changes centralize field definitions in datasetFields.js and refactor query generation logic to be more maintainable and testable.
Changes:
- Added
instituteandexperimental_approachesto dataset field mappings with search and highlight support - Refactored query generation to use centralized field constants and improved validation
- Added comprehensive test suites for query builder and dataset search service
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added rollup as dev dependency for build tooling |
| Utils/datasetFields.js | Centralized dataset field definitions with new constants for search, highlight, and return fields; added institute and experimental_approaches mappings |
| Services/queryGenerator.js | Refactored to use centralized field constants; added validation helpers and improved query construction with better null handling |
| Services/queryGenerator.test.js | Added comprehensive test suite covering parameter validation, edge cases, and query construction |
| Services/queryGenerator.test.fixtures.js | Added test fixtures for query generator tests |
| Services/dataset.service.js | Updated to use centralized field constants and improved input validation |
| Services/dataset.service.test.js | Added integration tests for dataset search service |
| Services/dataset.service.test.fixtures.js | Added test fixtures for dataset service tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
huuaho
left a comment
There was a problem hiding this comment.
LGTM, thanks for walking me through it
Overview
Added new properties to dataset search.
Change Details (Specifics)
Dataset search returns properties
study_type,institute, andexperimental_approaches. Highlights added for those properties, too. Tests for/searchAPI endpoint and query builder.Related Ticket(s)
INS-1513