Revert integration_test in flutter create template (#74068)

* Revert "Add integration_test template to create template (#70240)"

This reverts commit d047d108eb.

* test
This commit is contained in:
Dan Field
2021-01-15 13:13:46 -08:00
committed by GitHub
parent 6a4808b4ed
commit 6a32859eb9
7 changed files with 1 additions and 129 deletions

View File

@@ -299,8 +299,6 @@ void main() {
'ios/Runner/main.m',
'lib/main.dart',
'test/widget_test.dart',
'integration_test/app_test.dart',
'integration_test/driver.dart',
],
);
}, overrides: <Type, Generator>{
@@ -366,8 +364,6 @@ void main() {
'ios/Runner/main.m',
'lib/main.dart',
'test/widget_test.dart',
'integration_test/app_test.dart',
'integration_test/driver.dart',
],
);
return _runFlutterTest(projectDir);

View File

@@ -258,10 +258,8 @@ void main() {
final PackagesCommand command = await runCommandIn(exampleProjectPath, 'get');
final PackagesGetCommand getCommand = command.subcommands['get'] as PackagesGetCommand;
// Should be 1 instead of 2, but integration_test is always included.
// https://github.com/flutter/flutter/issues/56591
expect(await getCommand.usageValues,
containsPair(CustomDimensions.commandPackagesNumberPlugins, '2'));
containsPair(CustomDimensions.commandPackagesNumberPlugins, '1'));
}, overrides: <Type, Generator>{
Pub: () => Pub(
fileSystem: globals.fs,

View File

@@ -1,62 +0,0 @@
// Copyright 2014 The Flutter 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:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/io.dart';
import '../src/common.dart';
import 'test_utils.dart';
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', platform.isWindows ? 'flutter.bat' : 'flutter');
void main() {
Directory tempDir;
setUpAll(() {
tempDir = createResolvedTempDirectorySync('int_test.');
});
tearDownAll(() {
tryToDelete(tempDir);
});
testWithoutContext('flutter project default integration_test smoke test', () async {
const String projectName = 'integration_test_sample';
ProcessResult result = await processManager.run(
<String>[
flutterBin,
'create',
projectName,
],
workingDirectory: tempDir.path,
);
expect(result.exitCode, 0);
final Directory projectDir = tempDir.childDirectory(projectName);
expect(projectDir.existsSync(), true);
final Directory integrationTestDir = projectDir.childDirectory('integration_test');
expect(integrationTestDir.existsSync(), true);
expect(integrationTestDir.childFile('driver.dart').existsSync(), true);
expect(integrationTestDir.childFile('app_test.dart').existsSync(), true);
result = await processManager.run(
<String>[
flutterBin,
'drive',
'-d', 'flutter-tester',
'--driver', 'integration_test/driver.dart',
'-t', 'integration_test/app_test.dart',
],
workingDirectory: projectDir.path,
);
if (result.exitCode != 0) {
print('================================= STDOUT =======================================');
print(result.stdout);
print('================================= STDERR =======================================');
print(result.stderr);
fail('flutter drive failed, see output.');
}
});
}