test(ensemble): regression tests for Page dispose and ListViewCore scroll rebinding#2244
Draft
cursor[bot] wants to merge 1 commit into
Draft
test(ensemble): regression tests for Page dispose and ListViewCore scroll rebinding#2244cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
… swap Add regression tests for recent fixes: - PageState must cancel collapsible-header poll timers on dispose without setState-after-dispose errors when timers would have fired post-unmount. - ListViewCore must rebind CustomScrollView and dispose implicit controllers when scrollController changes at runtime. Co-authored-by: Sharjeel Yunus <sharjeelyunus@users.noreply.github.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.
Description
Adds unit/widget tests for two recent production fixes that lacked dedicated regression coverage.
Related Issue
Cron test-coverage automation (missing tests for merged fixes).
Type of Change
What Has Changed
modules/ensemble/test/page_header_dispose_test.dart— VerifiesPageStatetears down collapsible-header storage poll timers on dispose withoutsetState-after-dispose errors when timers would fire post-unmount (regression for #2c45e427).modules/ensemble/test/widget/list_view_core_test.dart— VerifiesListViewCorerebindsCustomScrollView.controllerwhenscrollControlleris swapped at runtime and disposes the implicit controller when switching to an external one (regression for #c792a8a6).Risky behavior now covered
Timer.periodiccallbacks and duplicate storageModelChangeEventlisteners could leak resources or callsetStateafter dispose.ScrollControlleronCustomScrollViewafter parent retargets controller (e.g. FooterScope) caused scroll position drift and disposed-controller use.How to Test
cd modules/ensemble && flutter test test/page_header_dispose_test.dart test/widget/list_view_core_test.dartChecklist
flutter analyzeand addressed any new warningsflutter testand all tests pass (targeted new tests)