Update configuration for flutter features (#45914)

This commit is contained in:
Jonah Williams
2019-12-02 17:06:41 -08:00
committed by GitHub
parent 8cf20f3be7
commit b63683b6cd
2 changed files with 8 additions and 4 deletions
@@ -91,6 +91,10 @@ const Feature flutterWebFeature = Feature(
available: true,
enabledByDefault: false,
),
beta: FeatureChannelSetting(
available: true,
enabledByDefault: false,
),
);
/// The [Feature] for macOS desktop.
@@ -78,7 +78,7 @@ void main() {
}));
test('flutter web help string', () {
expect(flutterWebFeature.generateHelpMessage(), 'Enable or disable Flutter for web. This setting will take effect on the master and dev channels.');
expect(flutterWebFeature.generateHelpMessage(), 'Enable or disable Flutter for web. This setting will take effect on the master, dev, and beta channels.');
});
test('flutter macOS desktop help string', () {
@@ -155,18 +155,18 @@ void main() {
expect(featureFlags.isWebEnabled, false);
}));
test('flutter web not enabled with config on beta', () => testbed.run(() {
test('flutter web enabled with config on beta', () => testbed.run(() {
when(mockFlutterVerion.channel).thenReturn('beta');
when<bool>(mockFlutterConfig.getValue('enable-web') as bool).thenReturn(true);
expect(featureFlags.isWebEnabled, false);
expect(featureFlags.isWebEnabled, true);
}));
test('flutter web not enabled with environment variable on beta', () => testbed.run(() {
when(mockFlutterVerion.channel).thenReturn('beta');
when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_WEB': 'true'});
expect(featureFlags.isWebEnabled, false);
expect(featureFlags.isWebEnabled, true);
}));
test('flutter web off by default on stable', () => testbed.run(() {