Skip to content

Commit

Permalink
[flutter_tools] update feature defaults (#102937)
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherfujino committed May 2, 2022
1 parent 32fd8e1 commit 9d59532
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/flutter_tools/lib/src/features.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,15 @@ const Feature flutterMacOSDesktopFeature = Feature(
environmentOverride: 'FLUTTER_MACOS',
master: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
stable: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
);

Expand All @@ -108,12 +111,15 @@ const Feature flutterLinuxDesktopFeature = Feature(
environmentOverride: 'FLUTTER_LINUX',
master: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
beta: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
stable: FeatureChannelSetting(
available: true,
enabledByDefault: true,
),
);

Expand Down
20 changes: 20 additions & 0 deletions packages/flutter_tools/test/general.shard/features_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -364,5 +364,25 @@ void main() {

expect(featureFlags.isWindowsEnabled, true);
});

for (final Feature feature in <Feature>[
flutterWindowsDesktopFeature,
flutterMacOSDesktopFeature,
flutterLinuxDesktopFeature,
]) {
test('${feature.name} available and enabled by default on master', () {
expect(feature.master.enabledByDefault, true);
expect(feature.master.available, true);
});
test('${feature.name} available and enabled by default on beta', () {
expect(feature.beta.enabledByDefault, true);
expect(feature.beta.available, true);
});
test('${feature.name} available and enabled by default on stable', () {
expect(feature.stable.enabledByDefault, true);
expect(feature.stable.available, true);
});
}

});
}

0 comments on commit 9d59532

Please sign in to comment.