fix(e2e): addStockAdjustment fills qty + new required unit-cost field (unblocks e2e-select)#334
Merged
OneTwo3D merged 1 commit intoJun 21, 2026
Conversation
…it-cost field
The 4 allocation e2e tests (regressions, sales-fulfillment, sales-management) failed
at addStockAdjustment waiting for '1 adjustment saved' that never appeared. Root
cause (reproduced against an isolated e2e DB): a unit-cost number field was added to
the bulk-adjustment dialog, so the helper's input[type=number].last() now filled
UNIT COST instead of qty — leaving qty empty ('Enter a non-zero quantity'), so the
save never persisted (stock_movements stayed 0). Target the qty field specifically
(step=1) and supply the now-required unit cost for the positive new-product line.
Not a production bug: the stock adjustment flow works; the helper selector was stale.
Verified all 4 previously-failing specs pass locally against an isolated ims_e2e DB.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Fixes the 4 pre-existing
e2e-selectallocation-test failures (regressions, sales-fulfillment, sales-management) that #333 surfaced once CI migrate was unblocked.Root cause (reproduced against an isolated e2e DB)
A unit-cost number field was added to the bulk stock-adjustment dialog. The e2e helper
addStockAdjustmentfilledinput[type=number].last(), which now targets unit cost instead of qty — leaving qty empty (Enter a non-zero quantity), so the save never persisted (stock_movementsstayed 0) and the '1 adjustment saved' confirmation never appeared. Not a production bug — the stock-adjustment flow works; the helper selector was stale.Fix
Target the qty field specifically (
step="1") and supply the now-required unit cost for the positive new-product line.addStockAdjustmentis used by 16+ specs.Validation
Set up an isolated
ims_e2ePostgres, applied all migrations (also confirms #333's trigger fix applies cleanly on a fresh DB), and ran the 4 previously-failing specs locally — all pass. Watching CI e2e.🤖 Generated with Claude Code