Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
1a9d635f
Unverified
Commit
1a9d635f
authored
Oct 10, 2020
by
Jonah Williams
Committed by
GitHub
Oct 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] remove --with-driver-test (#67783)
Remove flutter create --with-driver-test . Fixes #64095
parent
da92fc92
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
99 deletions
+11
-99
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+11
-9
main.dart.tmpl
packages/flutter_tools/templates/app/lib/main.dart.tmpl
+0
-8
pubspec.yaml.tmpl
packages/flutter_tools/templates/app/pubspec.yaml.tmpl
+0
-5
main_test.dart.tmpl
packages/flutter_tools/templates/driver/main_test.dart.tmpl
+0
-38
main.dart.tmpl
.../flutter_tools/templates/module/common/lib/main.dart.tmpl
+0
-13
pubspec.yaml.tmpl
...s/flutter_tools/templates/module/common/pubspec.yaml.tmpl
+0
-4
pubspec.yaml.tmpl
packages/flutter_tools/templates/package/pubspec.yaml.tmpl
+0
-4
template_manifest.json
packages/flutter_tools/templates/template_manifest.json
+0
-1
create_test.dart
...tter_tools/test/commands.shard/permeable/create_test.dart
+0
-17
No files found.
packages/flutter_tools/lib/src/commands/create.dart
View file @
1a9d635f
...
...
@@ -62,7 +62,9 @@ class CreateCommand extends FlutterCommand {
'with-driver-test'
,
negatable:
true
,
defaultsTo:
false
,
help:
"Also add a flutter_driver dependency and generate a sample 'flutter drive' test."
,
help:
'(Deprecated) Also add a flutter_driver dependency and generate a '
"sample 'flutter drive' test. This flag has been deprecated, instead see "
'package:integration_test at https://pub.dev/packages/integration_test .'
,
);
argParser
.
addOption
(
'template'
,
...
...
@@ -399,12 +401,19 @@ class CreateCommand extends FlutterCommand {
throwToolExit
(
error
);
}
if
(
boolArg
(
'with-driver-test'
))
{
globals
.
printError
(
'--with-driver-test has been deprecated and will no longer add a flutter '
'driver template. Instead, learn how to use package:integration_test by '
'visiting https://pub.dev/packages/integration_test .'
);
}
final
Map
<
String
,
dynamic
>
templateContext
=
_createTemplateContext
(
organization:
organization
,
projectName:
projectName
,
projectDescription:
stringArg
(
'description'
),
flutterRoot:
flutterRoot
,
renderDriverTest:
boolArg
(
'with-driver-test'
),
withPluginHook:
generatePlugin
,
androidLanguage:
stringArg
(
'android-language'
),
iosLanguage:
stringArg
(
'ios-language'
),
...
...
@@ -663,11 +672,6 @@ https://flutter.dev/docs/development/packages-and-plugins/developing-packages#pl
generatedCount
+=
_injectGradleWrapper
(
project
);
}
if
(
boolArg
(
'with-driver-test'
))
{
final
Directory
testDirectory
=
directory
.
childDirectory
(
'test_driver'
);
generatedCount
+=
await
_renderTemplate
(
'driver'
,
testDirectory
,
templateContext
,
overwrite:
overwrite
);
}
if
(
boolArg
(
'pub'
))
{
await
pub
.
get
(
context:
PubContext
.
create
,
...
...
@@ -721,7 +725,6 @@ https://flutter.dev/docs/development/packages-and-plugins/developing-packages#pl
String
androidLanguage
,
String
iosLanguage
,
String
flutterRoot
,
bool
renderDriverTest
=
false
,
bool
withPluginHook
=
false
,
bool
ios
=
false
,
bool
android
=
false
,
...
...
@@ -755,7 +758,6 @@ https://flutter.dev/docs/development/packages-and-plugins/developing-packages#pl
'dartSdk'
:
'
$flutterRoot
/bin/cache/dart-sdk'
,
'androidMinApiLevel'
:
android_common
.
minApiLevel
,
'androidSdkVersion'
:
kAndroidSdkMinVersion
,
'withDriverTest'
:
renderDriverTest
,
'pluginClass'
:
pluginClass
,
'pluginClassSnakeCase'
:
pluginClassSnakeCase
,
'pluginClassCapitalSnakeCase'
:
pluginClassCapitalSnakeCase
,
...
...
packages/flutter_tools/templates/app/lib/main.dart.tmpl
View file @
1a9d635f
import 'package:flutter/material.dart';
{{#withDriverTest}}
import 'package:flutter_driver/driver_extension.dart';
{{/withDriverTest}}
{{#withPluginHook}}
import 'dart:async';
...
...
@@ -10,11 +7,6 @@ import 'package:{{pluginProjectName}}/{{pluginProjectName}}.dart';
{{/withPluginHook}}
void main() {
{{#withDriverTest}}
// Enable integration testing with the Flutter Driver extension.
// See https://flutter.dev/testing/ for more info.
enableFlutterDriverExtension();
{{/withDriverTest}}
runApp(MyApp());
}
...
...
packages/flutter_tools/templates/app/pubspec.yaml.tmpl
View file @
1a9d635f
...
...
@@ -43,11 +43,6 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
{{#withDriverTest}}
flutter_driver:
sdk: flutter
test: ^1.16.0-nullsafety
{{/withDriverTest}}
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
...
...
packages/flutter_tools/templates/driver/main_test.dart.tmpl
deleted
100644 → 0
View file @
da92fc92
// This is a basic Flutter Driver test for the application. A Flutter Driver
// test is an end-to-end test that "drives" your application from another
// process or even from another computer. If you are familiar with
// Selenium/WebDriver for web, Espresso for Android or UI Automation for iOS,
// this is simply Flutter's version of that.
import 'package:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart';
void main() {
group('end-to-end test', () {
FlutterDriver driver;
setUpAll(() async {
// Connect to a running Flutter application instance.
driver = await FlutterDriver.connect();
});
tearDownAll(() async {
if (driver != null)
driver.close();
});
test('tap on the floating action button; verify counter', () async {
// Finds the floating action button (fab) to tap on
SerializableFinder fab = find.byTooltip('Increment');
// Wait for the floating action button to appear
await driver.waitFor(fab);
// Tap on the fab
await driver.tap(fab);
// Wait for text to change to the desired value
await driver.waitFor(find.text('1'));
});
});
}
packages/flutter_tools/templates/module/common/lib/main.dart.tmpl
View file @
1a9d635f
import 'package:flutter/material.dart';
{{#withDriverTest}}
import 'package:flutter_driver/driver_extension.dart';
{{/withDriverTest}}
{{#withPluginHook}}
import 'dart:async';
...
...
@@ -9,17 +6,7 @@ import 'package:flutter/services.dart';
import 'package:{{pluginProjectName}}/{{pluginProjectName}}.dart';
{{/withPluginHook}}
{{^withDriverTest}}
void main() => runApp(MyApp());
{{/withDriverTest}}
{{#withDriverTest}}
void main() {
// Enable integration testing with the Flutter Driver extension.
// See https://flutter.dev/testing/ for more info.
enableFlutterDriverExtension();
runApp(MyApp());
}
{{/withDriverTest}}
{{^withPluginHook}}
class MyApp extends StatelessWidget {
...
...
packages/flutter_tools/templates/module/common/pubspec.yaml.tmpl
View file @
1a9d635f
...
...
@@ -31,10 +31,6 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
{{#withDriverTest}}
flutter_driver:
sdk: flutter
{{/withDriverTest}}
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
...
...
packages/flutter_tools/templates/package/pubspec.yaml.tmpl
View file @
1a9d635f
...
...
@@ -15,10 +15,6 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
{{#withDriverTest}}
flutter_driver:
sdk: flutter
{{/withDriverTest}}
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
...
...
packages/flutter_tools/templates/template_manifest.json
View file @
1a9d635f
...
...
@@ -139,7 +139,6 @@
"templates/cocoapods/Podfile-ios-objc"
,
"templates/cocoapods/Podfile-ios-swift"
,
"templates/cocoapods/Podfile-macos"
,
"templates/driver/main_test.dart.tmpl"
,
"templates/module/android/gradle/build.gradle.copy.tmpl"
,
"templates/module/android/gradle/gradle.properties.tmpl"
,
"templates/module/android/host_app_common/app.tmpl/build.gradle.tmpl"
,
...
...
packages/flutter_tools/test/commands.shard/permeable/create_test.dart
View file @
1a9d635f
...
...
@@ -535,23 +535,6 @@ void main() {
);
});
testUsingContext
(
'legacy app project with-driver-test'
,
()
async
{
return
_createAndAnalyzeProject
(
projectDir
,
<
String
>[
'--with-driver-test'
,
'--template=app'
],
<
String
>[
'lib/main.dart'
],
);
},
overrides:
<
Type
,
Generator
>{
Pub:
()
=>
Pub
(
fileSystem:
globals
.
fs
,
logger:
globals
.
logger
,
processManager:
globals
.
processManager
,
usage:
globals
.
flutterUsage
,
botDetector:
globals
.
botDetector
,
platform:
globals
.
platform
,
),
});
testUsingContext
(
'module project with pub'
,
()
async
{
return
_createProject
(
projectDir
,
<
String
>[
'--template=module'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment