Add an integration test to plugin template example (#117062)

* Add an integration test to plugin template example

Dart unit tests don't exercise host-side plugin code at all, so the
example tests in the plugin template currently have very little
meaningful coverage. This adds an integration test to the example app
when creating a plugin, so that there's an example of how to actually
test that a complete round-trip plugin call works.

This is done as a separate template that's currently only used by the
plugin template because I don't know what a good example for a
non-plugin case would be that isn't largely just a duplicate of the
widget tests. However, the integration test pre-includes conditionals
around the parts that are plugin-specific so that it can more easily be
expanded to other use cases later (e.g., in
https://github.com/flutter/flutter/issues/68818).

Part of https://github.com/flutter/flutter/issues/82458

* Add integration test to expected dependencies of a plugin app

* Test fixes

* Make an explicit test case
This commit is contained in:
stuartmorgan
2022-12-15 14:49:14 -05:00
committed by GitHub
parent b122200d4c
commit f1d157bc29
8 changed files with 66 additions and 2 deletions

View File

@@ -215,6 +215,10 @@ public class DummyPluginAClass {
final List<dynamic> dependencyGraph = jsonContent['dependencyGraph'] as List<dynamic>;
const String kExpectedPluginsDependenciesContent =
'['
'{'
'"name":"integration_test",'
'"dependencies":[]'
'},'
'{'
'"name":"plugin_a",'
'"dependencies":["plugin_b","plugin_c","plugin_d"]'