Do not show plugin embedding warning with missing example app (#76406)

This commit is contained in:
Jenn Magder
2021-02-19 17:41:02 -08:00
committed by GitHub
parent c6a74e0a5e
commit 841f2e082e
2 changed files with 13 additions and 1 deletions

View File

@@ -185,6 +185,13 @@ void main() {
await project.regeneratePlatformSpecificTooling();
expect(testLogger.statusText, contains('https://flutter.dev/go/android-project-migration'));
});
_testInMemory('Android plugin without example app does not show a warning', () async {
final FlutterProject project = await aPluginProject();
project.example.directory.deleteSync();
await project.regeneratePlatformSpecificTooling();
expect(testLogger.statusText, isNot(contains('https://flutter.dev/go/android-project-migration')));
});
_testInMemory('updates local properties for Android', () async {
final FlutterProject project = await someProject();
await project.regeneratePlatformSpecificTooling();
@@ -306,6 +313,7 @@ void main() {
group('example', () {
_testInMemory('exists for plugin in legacy format', () async {
final FlutterProject project = await aPluginProject();
expect(project.isPlugin, isTrue);
expect(project.hasExampleApp, isTrue);
});
_testInMemory('exists for plugin in multi-platform format', () async {
@@ -314,6 +322,7 @@ void main() {
});
_testInMemory('does not exist for non-plugin', () async {
final FlutterProject project = await someProject();
expect(project.isPlugin, isFalse);
expect(project.hasExampleApp, isFalse);
});
});