Renamed 'flutter materialize' to 'flutter make-host-app-editable'. The iOS version is still incomplete and will therefore require additional renaming. (#21771) (#22006)

This commit is contained in:
matthew-carroll
2018-09-18 17:58:20 -07:00
committed by GitHub
parent 3c22d7b025
commit 18d5b9dc45
6 changed files with 46 additions and 46 deletions

View File

@@ -89,22 +89,22 @@ void main() {
});
});
group('materialize Android', () {
group('editable Android host app', () {
testInMemory('fails on non-module', () async {
final FlutterProject project = await someProject();
await expectLater(
project.android.materialize(),
project.android.makeHostAppEditable(),
throwsA(isInstanceOf<AssertionError>()),
);
});
testInMemory('exits on already materialized module', () async {
testInMemory('exits on already editable module', () async {
final FlutterProject project = await aModuleProject();
await project.android.materialize();
return expectToolExitLater(project.android.materialize(), contains('already materialized'));
await project.android.makeHostAppEditable();
return expectToolExitLater(project.android.makeHostAppEditable(), contains('already editable'));
});
testInMemory('creates android/app folder in place of .android/app', () async {
final FlutterProject project = await aModuleProject();
await project.android.materialize();
await project.android.makeHostAppEditable();
expectNotExists(project.directory.childDirectory('.android').childDirectory('app'));
expect(
project.directory.childDirectory('.android').childFile('settings.gradle').readAsStringSync(),
@@ -119,7 +119,7 @@ void main() {
});
testInMemory('retains .android/Flutter folder and references it', () async {
final FlutterProject project = await aModuleProject();
await project.android.materialize();
await project.android.makeHostAppEditable();
expectExists(project.directory.childDirectory('.android').childDirectory('Flutter'));
expect(
project.directory.childDirectory('android').childFile('settings.gradle').readAsStringSync(),
@@ -128,9 +128,9 @@ void main() {
});
testInMemory('can be redone after deletion', () async {
final FlutterProject project = await aModuleProject();
await project.android.materialize();
await project.android.makeHostAppEditable();
project.directory.childDirectory('android').deleteSync(recursive: true);
await project.android.materialize();
await project.android.makeHostAppEditable();
expectExists(project.directory.childDirectory('android').childDirectory('app'));
});
});