[flutter_tools] update windows config feature (#65867)

This commit is contained in:
Jonah Williams 2020-09-17 15:24:52 -07:00 committed by GitHub
parent 50fd10fc6f
commit bc11c2a8c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -173,6 +173,10 @@ const Feature flutterWindowsDesktopFeature = Feature(
available: true,
enabledByDefault: false,
),
dev: FeatureChannelSetting(
available: true,
enabledByDefault: false,
),
);
/// The [Feature] for Android devices.

View file

@ -98,7 +98,7 @@ void main() {
test('flutter Windows desktop help string', () {
expect(flutterWindowsDesktopFeature.generateHelpMessage(),
'Enable or disable Flutter for desktop on Windows. '
'This setting will take effect on the master channel.');
'This setting will take effect on the master and dev channels.');
});
test('help string on multiple channels', () {
@ -387,18 +387,18 @@ void main() {
expect(featureFlags.isWindowsEnabled, false);
}));
test('flutter windows desktop not enabled with config on dev', () => testbed.run(() {
test('flutter windows desktop enabled with config on dev', () => testbed.run(() {
when(mockFlutterVerion.channel).thenReturn('dev');
when<bool>(mockFlutterConfig.getValue('enable-windows-desktop') as bool).thenReturn(true);
expect(featureFlags.isWindowsEnabled, false);
expect(featureFlags.isWindowsEnabled, true);
}));
test('flutter windows desktop not enabled with environment variable on dev', () => testbed.run(() {
when(mockFlutterVerion.channel).thenReturn('dev');
when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_WINDOWS': 'true'});
expect(featureFlags.isWindowsEnabled, false);
expect(featureFlags.isWindowsEnabled, true);
}));
test('flutter windows desktop off by default on beta', () => testbed.run(() {