Unverified Commit 9818d2df authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Add web workflow to default validators (#39006)

parent 663dc1d7
......@@ -125,6 +125,9 @@ class _DefaultDoctorValidatorsProvider implements DoctorValidatorsProvider {
if (windowsWorkflow.appliesToHostPlatform)
_workflows.add(windowsWorkflow);
if (webWorkflow.appliesToHostPlatform)
_workflows.add(webWorkflow);
}
return _workflows;
}
......
......@@ -4,6 +4,9 @@
import 'dart:async';
import 'package:flutter_tools/src/base/process_manager.dart';
import 'package:flutter_tools/src/features.dart';
import 'package:flutter_tools/src/web/workflow.dart';
import 'package:mockito/mockito.dart';
import 'package:process/process.dart';
......@@ -22,6 +25,7 @@ import 'package:flutter_tools/src/vscode/vscode_validator.dart';
import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/testbed.dart';
final Generator _kNoColorOutputPlatform = () => FakePlatform.fromPlatform(const LocalPlatform())..stdoutSupportsAnsi = false;
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator>{
......@@ -587,6 +591,15 @@ void main() {
expect(testLogger.statusText, startsWith('[✗]'));
}, overrides: noColorTerminalOverride);
});
testUsingContext('WebWorkflow is a part of validator workflows if enabled', () async {
when(processManager.canRun(any)).thenReturn(true);
expect(DoctorValidatorsProvider.defaultInstance.workflows.contains(webWorkflow), true);
}, overrides: <Type, Generator>{
FeatureFlags: () => TestFeatureFlags(isWebEnabled: true),
ProcessManager: () => MockProcessManager(),
});
}
class MockUsage extends Mock implements Usage {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment