Repository navigation
test(e2e): stop persisting on the plugin's behalf in anchored paths - #17
Merged
Merged
Conversation
commentOnPhrase() and the edit step called store.persist() from the test, which made the TEST perform the very save it was verifying: if the plugin stopped saving on its own, both scenarios would still have gone green. Same violation already fixed in the add/delete steps. The store saves fire-and-forget (`void this.persist()` at chat-comments-store.js L277 add-anchored, L422 editComment), so a reload can outrun the request -- that race is what the test-side persist was papering over. Replaced with waitForSave(): wait for the plugin's OWN POST to /plugins/chat_comments/comments with action=save, armed before the click. Keeps the determinism, drops the cheat. bdd-lint: 3/3 gates pass.
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.
commentOnPhrase()and the edit step calledstore.persist()from the test — the test performing the very save it was verifying. If the plugin stopped saving on its own, both scenarios would still go green. Same violation already fixed in the add/delete steps.Why it was there: the store saves fire-and-forget (
void this.persist()atchat-comments-store.jsL277 add-anchored, L422 editComment), so a reload can outrun the request.Fix:
waitForSave()— wait for the plugin's OWN POST to/plugins/chat_comments/commentswithaction=save, armed before the click. Keeps determinism, drops the cheat.bdd-lint: 3/3 gates pass.