update flutter doctor to display versions for installed IntelliJ plugins (#7125)
This commit is contained in:
@@ -26,6 +26,7 @@ import 'daemon_test.dart' as daemon_test;
|
||||
import 'devfs_test.dart' as devfs_test;
|
||||
import 'device_test.dart' as device_test;
|
||||
import 'devices_test.dart' as devices_test;
|
||||
import 'doctor_test.dart' as doctor_test;
|
||||
import 'drive_test.dart' as drive_test;
|
||||
import 'format_test.dart' as format_test;
|
||||
import 'install_test.dart' as install_test;
|
||||
@@ -60,6 +61,7 @@ void main() {
|
||||
devfs_test.main();
|
||||
device_test.main();
|
||||
devices_test.main();
|
||||
doctor_test.main();
|
||||
drive_test.main();
|
||||
format_test.main();
|
||||
install_test.main();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
38
packages/flutter_tools/test/doctor_test.dart
Normal file
38
packages/flutter_tools/test/doctor_test.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:flutter_tools/src/doctor.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import 'src/context.dart';
|
||||
|
||||
void main() {
|
||||
group('doctor', () {
|
||||
testUsingContext('intellij validator', () async {
|
||||
ValidationResult result = await new IntelliJValidatorTestTarget('Test').validate();
|
||||
expect(result.type, ValidationType.installed);
|
||||
expect(result.statusInfo, 'version test.test.test');
|
||||
expect(result.messages, hasLength(2));
|
||||
|
||||
ValidationMessage message = result.messages
|
||||
.firstWhere((ValidationMessage m) => m.message.startsWith('Dart '));
|
||||
expect(message.message, 'Dart plugin version 162.2485');
|
||||
|
||||
message = result.messages
|
||||
.firstWhere((ValidationMessage m) => m.message.startsWith('Flutter '));
|
||||
expect(message.message, 'Flutter plugin version 0.1.3');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
class IntelliJValidatorTestTarget extends IntelliJValidator {
|
||||
IntelliJValidatorTestTarget(String title) : super(title);
|
||||
|
||||
@override
|
||||
String get pluginsPath => path.join('test', 'data', 'intellij', 'plugins');
|
||||
|
||||
@override
|
||||
String get version => 'test.test.test';
|
||||
}
|
||||
Reference in New Issue
Block a user