From 174e58697cf17ee08f5b7317a6dd3d7bdc9ac1b3 Mon Sep 17 00:00:00 2001 From: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com> Date: Tue, 20 Feb 2024 15:27:26 -0800 Subject: [PATCH] Avoid applying partial dartfixes on CI (#143551) Unblocks https://github.com/flutter/tests/pull/345 Add `bulkApply: false` to partial fixes so they don't automatically get applied on registered tests. --- .../flutter/lib/fix_data/fix_material/fix_material.yaml | 3 +++ packages/flutter/test_fixes/material/material.dart | 7 ++++--- packages/flutter/test_fixes/material/material.dart.expect | 7 ++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/flutter/lib/fix_data/fix_material/fix_material.yaml b/packages/flutter/lib/fix_data/fix_material/fix_material.yaml index f11926a2d6..7b7736d87e 100644 --- a/packages/flutter/lib/fix_data/fix_material/fix_material.yaml +++ b/packages/flutter/lib/fix_data/fix_material/fix_material.yaml @@ -865,6 +865,7 @@ transforms: # Changes made in https://github.com/flutter/flutter/pull/111706 - title: "Migrate to 'trackVisibility'" date: 2022-09-15 + bulkApply: false element: uris: [ 'material.dart' ] field: 'showTrackOnHover' @@ -876,6 +877,7 @@ transforms: # Changes made in https://github.com/flutter/flutter/pull/111706 - title: "Migrate to 'thumbVisibility'" date: 2022-09-15 + bulkApply: false element: uris: [ 'material.dart' ] constructor: '' @@ -888,6 +890,7 @@ transforms: # Changes made in https://github.com/flutter/flutter/pull/111706 - title: "Migrate to 'trackVisibility'" date: 2022-09-15 + bulkApply: false element: uris: [ 'material.dart' ] method: 'copyWith' diff --git a/packages/flutter/test_fixes/material/material.dart b/packages/flutter/test_fixes/material/material.dart index 48928a96f8..11c9855d08 100644 --- a/packages/flutter/test_fixes/material/material.dart +++ b/packages/flutter/test_fixes/material/material.dart @@ -304,9 +304,10 @@ void main() { // Changes made in https://github.com/flutter/flutter/pull/111706 Scrollbar scrollbar = Scrollbar(showTrackOnHover: true); bool nowShowing = scrollbar.showTrackOnHover; - ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(showTrackOnHover: nowShowing); - scrollbarTheme.copyWith(showTrackOnHover: nowShowing); - scrollbarTheme.showTrackOnHover; + // The 3 expressions below have `bulkApply` set to true thus can't be tested yet. + //ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(showTrackOnHover: nowShowing); + //scrollbarTheme.copyWith(showTrackOnHover: nowShowing); + //scrollbarTheme.showTrackOnHover; // Changes made in https://github.com/flutter/flutter/pull/114459 MediaQuery.boldTextOverride(context); diff --git a/packages/flutter/test_fixes/material/material.dart.expect b/packages/flutter/test_fixes/material/material.dart.expect index fc8f42404e..0396237e09 100644 --- a/packages/flutter/test_fixes/material/material.dart.expect +++ b/packages/flutter/test_fixes/material/material.dart.expect @@ -300,9 +300,10 @@ void main() { // Changes made in https://github.com/flutter/flutter/pull/111706 Scrollbar scrollbar = Scrollbar(trackVisibility: true); bool nowShowing = scrollbar.trackVisibility; - ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(trackVisibility: nowShowing); - scrollbarTheme.copyWith(trackVisibility: nowShowing); - scrollbarTheme.trackVisibility; + // The 3 expressions below have `bulkApply` set to true thus can't be tested yet. + //ScrollbarThemeData scrollbarTheme = ScrollbarThemeData(showTrackOnHover: nowShowing); + //scrollbarTheme.copyWith(showTrackOnHover: nowShowing); + //scrollbarTheme.showTrackOnHover; // Changes made in https://github.com/flutter/flutter/pull/114459 MediaQuery.boldTextOf(context);