ISSUE-268 # Support timezone-aware datetime assertions - #771
ISSUE-268 # Support timezone-aware datetime assertions#771officialasishkumar wants to merge 1 commit into
Conversation
|
CI is running here now, once Green, we'll have a review soon. Also, can you add couple of integration tests as well? |
|
Hi @officialasishkumar @authorjapps — I saw #784 was still open asking for the missing integration test scenario for this timezone-aware datetime fix, so I put one together. It's on my fork here: It adds
Ran locally against this branch and both tests pass ( |
Support timezone-aware datetime assertions
Fixed Which Issue?
PR Branch
https://github.com/officialasishkumar/zerocode/tree/issue-268-date-timezone
Motivation and Context
$LOCAL.DATETIME.AFTERand$LOCAL.DATETIME.BEFOREparsed ISO datetimes intoLocalDateTime, which ignored offset semantics for values such asZor+02:00. That meant comparisons used the wall-clock value instead of comparing equivalent instants.This change adds a shared datetime parser for assertion expected values and actual response values. It preserves plain ISO local datetime support, honors ISO offsets and
Z, and adds RFC-1123 HTTP-date parsing for values such asLast-Modified.Validation run locally:
mvn -pl core -Dtest=ZeroCodeAssertionsProcessorImplTest test -ntpChecklist:
1. New Unit tests were added
2. Integration tests were added
3. Test names are meaningful
3.1 Feature manually tested and outcome is successful
4. PR doesn't break any of the earlier features for end users
5. PR doesn't break the HTML report features directly
/targetfolder and they look fine6. PR doesn't break any HTML report features indirectly
7. Branch build passed in CI
8. No 'package.*' in the imports
9. Relevant DOcumentation page added or updated with clear instructions and examples for the end user
10. Http test added to
http-testing-examplesmodule(if applicable) ?11. Kafka test added to
kafka-testing-examplesmodule(if applicable) ?