Conversation
Follows-up #1311. Since QUnit 2.7.0, when viewing a finished test run and turning on "Hide passed" and then turning it off again, resulted in the same results being shown again, but in reversed order. This was because we hide the tests from top to bottom (and push into the array), but then upon re-inserting them we used pop(), which means we first append the last test to the end of the page, but then the before-last is popped after that and appended to what is now the end of the page, etc. The end result is the tests first displaying from A-Z, then after toggling on/off, displaying from Z-A.
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.
Follows-up #1311.
This fixes a regression in QUnit 2.7.0. When viewing a finished test run and turning on "Hide passed" and then turning it off again, the second click, reverses the result order.
This was because we hide each test from top to bottom (and push into the array), but then upon re-inserting them we used
pop(), which means we first append the last test to the end of the page, and then the before-last is popped after that and appended to what is now the end of the page, etc. The end result is the tests originally display from A-Z, and are stored in the array from A-Z as well, but then after toggling on/off, get rendered Z-A.