Uh oh!
There was an error while loading. Please reload this page.
Add tests verifying consumption/removal on challenge completion - #413
Merged
Conversation
Covers the removal checklist from #111: items taken (and not taken), block and entity removal for island challenges, money/XP consumption in the full completion flow, and that nothing is consumed when a requirement fails. Tests added: - testInventoryChallengeWithTakeItemsTrue: verifies items removed when takeItems=true - testInventoryChallengeWithTakeItemsFalse: verifies items NOT removed when takeItems=false - testInventoryChallengeMultipleItemsRemoved: verifies multiple item types removed correctly - testIslandChallengeWithRemoveBlocksTrue: verifies blocks set to AIR when removeBlocks=true - testIslandChallengeWithRemoveBlocksFalse: verifies blocks NOT removed when removeBlocks=false - testIslandChallengeWithRemoveEntitiesTrue: verifies entities removed when removeEntities=true - testIslandChallengeWithRemoveEntitiesFalse: verifies entities NOT removed when removeEntities=false - testOtherChallengeMoneyWithdrawn: verifies money withdrawn when takeMoney=true - testOtherChallengeMoneyNotWithdrawn: verifies money NOT withdrawn when takeMoney=false - testOtherChallengeExperienceWithdrawn: verifies XP taken when takeExperience=true - testOtherChallengeExperienceNotWithdrawn: verifies XP NOT taken when takeExperience=false - testInventoryChallengeFailureDoesNotRemoveItems: verifies no items removed on requirement failure - testIslandChallengeBlockRemovalFailureDoesNotRemoveBlocks: verifies no blocks removed on failure - testIslandChallengeEntityRemovalFailureDoesNotRemoveEntities: verifies no entities removed on failure - testOtherChallengeFailureDoesNotWithdrawMoney: verifies no money withdrawn on failure - testOtherChallengeFailureDoesNotWithdrawExperience: verifies no XP taken on failure - testMultipleInventoryItemsPartialRemovalFailure: verifies no items removed if any item requirement fails Part of #111 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.



Addresses the coverage checklist in #111.
What
17 new tests in
TryToCompleteTestcovering the consumption side of the completion pipeline, which previously had little direct coverage:takeItems=true, untouched when false, multiple item types all removedremoveBlocks=true, untouched when falseremoveEntities=true, untouched when falsetakeMoney/takeExperienceare set, untouched otherwiseTests-only change; production code untouched, and no bugs were found by the new coverage — the removal logic behaves as intended. Suite: 74/74 in
TryToCompleteTest, full run 483 tests, 0 failures.If this coverage satisfies the checklist, #111 can be closed when this merges.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v