PAE-1131: add journey test for suspended accreditation#362
Merged
Conversation
- Add step definition for updating accreditation status - Add scenario verifying all rows are IGNORED when accreditation is suspended Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… steps Switch from PATCH to PUT dev endpoint so statusHistory timestamps are preserved. Add statusHistory entries for registrations and org with updatedAt set to validFrom (before load dates) so isAccreditationApprovedAtDate works correctly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When updating accreditation status (e.g. to suspended), use the accreditation validFrom date instead of new Date(). This ensures the status change is before the load dates so isAccreditedAtDates correctly classifies loads as IGNORED. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Using validFrom directly caused the suspension to have the same date as the approval statusHistory default (2025-01-01), making it impossible to find an approved status. Use validFrom + 1 day so the suspension is after the approval but before load dates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
With status history checks, IGNORED rows (outside accreditation period or suspended) are excluded from valid/invalid counts. Only row 4000 (REPROCESSED_LOADS, no classifyForWasteBalance) remains as added.valid. Rows 1000, 1001, 5000 are all IGNORED. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When all waste-balance rows are IGNORED (suspended accreditation), no waste balance record is created. Removed the assertion expecting a zero-amount record since no record exists at all. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GraemeF
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: PAE-1131
Summary
replaceRawendpoint, preserving caller-providedstatusHistorytimestampsstatusHistoryentries in the update step with explicit dates (usingvalidFrom)validFromfor status change timestamps (e.g. suspended) soisAccreditedAtDatescorrectly classifies loadsTest plan
🤖 Generated with Claude Code