Skip to content

(test) O3-3926 Improve inline-date-adapter test coverage.#674

Open
suubi-joshua wants to merge 2 commits intoopenmrs:mainfrom
suubi-joshua:O3-3926
Open

(test) O3-3926 Improve inline-date-adapter test coverage.#674
suubi-joshua wants to merge 2 commits intoopenmrs:mainfrom
suubi-joshua:O3-3926

Conversation

@suubi-joshua
Copy link

@suubi-joshua suubi-joshua commented Jan 28, 2026

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

Ensure inline-date-adapter.ts is robust against edge cases in OpenMRS form engine.
Test Scenarios Implemented

  1. Overwrite target field's obs date prop value
    Tests submission updates with Date objects and strings.

  2. Edit previously associated date in edit mode
    Optimization test: Only updates obsDatetime when value actually changes

  3. Commit side-effects when target field has value or submission
    Tests submission creation with current or initial values
    New validation: Prevents submission when target field has NO value
    Ensures no orphaned dates without observation data

  4. Extract initial value from target field's obs
    Tests retrieval from target field's observation object
    Handles missing data and edge cases

Screenshots

Related Issue

https://openmrs.atlassian.net/browse/O3-3926

Other

@suubi-joshua suubi-joshua changed the title test(O3-3926): improve inline-date-adapter test coverage for required… test(O3-3926): Improve inline-date-adapter test coverage for required… Jan 28, 2026
@suubi-joshua suubi-joshua changed the title test(O3-3926): Improve inline-date-adapter test coverage for required… test(O3-3926): Improve inline-date-adapter test coverage. Jan 28, 2026
@pirupius pirupius changed the title test(O3-3926): Improve inline-date-adapter test coverage. (test) O3-3926 Improve inline-date-adapter test coverage. Jan 30, 2026
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.

1 participant