Unverified Commit e71655b7 authored by Danny Tuppeny's avatar Danny Tuppeny Committed by GitHub

Include VS Code + Android Studio URLs in the No IDE message (#69194)

parent 92d9630e
...@@ -34,7 +34,11 @@ class UserMessages { ...@@ -34,7 +34,11 @@ class UserMessages {
// Messages used in NoIdeValidator // Messages used in NoIdeValidator
String get noIdeStatusInfo => 'No supported IDEs installed'; String get noIdeStatusInfo => 'No supported IDEs installed';
String get noIdeInstallationInfo => 'IntelliJ - https://www.jetbrains.com/idea/'; List<String> get noIdeInstallationInfo => <String>[
'IntelliJ - https://www.jetbrains.com/idea/',
'Android Studio - https://developer.android.com/studio/',
'VS Code - https://code.visualstudio.com/',
];
// Messages used in IntellijValidator // Messages used in IntellijValidator
String intellijStatusInfo(String version) => 'version $version'; String intellijStatusInfo(String version) => 'version $version';
......
...@@ -769,9 +769,11 @@ class NoIdeValidator extends DoctorValidator { ...@@ -769,9 +769,11 @@ class NoIdeValidator extends DoctorValidator {
@override @override
Future<ValidationResult> validate() async { Future<ValidationResult> validate() async {
return ValidationResult(ValidationType.missing, <ValidationMessage>[ return ValidationResult(
ValidationMessage(userMessages.noIdeInstallationInfo), ValidationType.missing,
], statusInfo: userMessages.noIdeStatusInfo); userMessages.noIdeInstallationInfo.map((String ideInfo) => ValidationMessage(ideInfo)).toList(),
statusInfo: userMessages.noIdeStatusInfo,
);
} }
} }
......
...@@ -85,6 +85,16 @@ void main() { ...@@ -85,6 +85,16 @@ void main() {
expect(message.isError, isFalse); expect(message.isError, isFalse);
}, overrides: noColorTerminalOverride); }, overrides: noColorTerminalOverride);
testUsingContext('No IDE Validator includes expected installation messages', () async {
final ValidationResult result = await NoIdeValidator().validate();
expect(result.type, ValidationType.missing);
expect(
result.messages.map((ValidationMessage vm) => vm.message),
UserMessages().noIdeInstallationInfo,
);
}, overrides: noColorTerminalOverride);
testUsingContext('vs code validator when 64bit installed', () async { testUsingContext('vs code validator when 64bit installed', () async {
expect(VsCodeValidatorTestTargets.installedWithExtension64bit.title, 'VS Code, 64-bit edition'); expect(VsCodeValidatorTestTargets.installedWithExtension64bit.title, 'VS Code, 64-bit edition');
final ValidationResult result = await VsCodeValidatorTestTargets.installedWithExtension64bit.validate(); final ValidationResult result = await VsCodeValidatorTestTargets.installedWithExtension64bit.validate();
......
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