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
6bd54753
Unverified
Commit
6bd54753
authored
Feb 01, 2021
by
Jenn Magder
Committed by
GitHub
Feb 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Migrate driver tests in example/ to NNBD (#75022)" (#75161)
This reverts commit
50a8ecb7
.
parent
00aa1442
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
smoke_web_engine_test.dart
examples/hello_world/test_driver/smoke_web_engine_test.dart
+2
-1
button_tap_test.dart
examples/platform_channel/test_driver/button_tap_test.dart
+7
-3
button_tap_test.dart
...s/platform_channel_swift/test_driver/button_tap_test.dart
+7
-3
No files found.
examples/hello_world/test_driver/smoke_web_engine_test.dart
View file @
6bd54753
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'dart:async'
;
import
'dart:async'
;
import
'package:flutter_driver/flutter_driver.dart'
;
import
'package:flutter_driver/flutter_driver.dart'
;
...
@@ -14,7 +15,7 @@ void main() {
...
@@ -14,7 +15,7 @@ void main() {
group
(
'Hello World App'
,
()
{
group
(
'Hello World App'
,
()
{
final
SerializableFinder
titleFinder
=
find
.
byValueKey
(
'title'
);
final
SerializableFinder
titleFinder
=
find
.
byValueKey
(
'title'
);
late
FlutterDriver
driver
;
FlutterDriver
driver
;
// Connect to the Flutter driver before running any tests.
// Connect to the Flutter driver before running any tests.
setUpAll
(()
async
{
setUpAll
(()
async
{
...
...
examples/platform_channel/test_driver/button_tap_test.dart
View file @
6bd54753
...
@@ -2,19 +2,23 @@
...
@@ -2,19 +2,23 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// TODO(goderbauer): migrate this file to null-safety when flutter_driver is null-safe.
// @dart = 2.9
import
'package:flutter_driver/flutter_driver.dart'
;
import
'package:flutter_driver/flutter_driver.dart'
;
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
void
main
(
)
{
group
(
'button tap test'
,
()
{
group
(
'button tap test'
,
()
{
late
FlutterDriver
driver
;
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
});
});
tearDownAll
(()
async
{
tearDownAll
(()
async
{
driver
.
close
();
if
(
driver
!=
null
)
driver
.
close
();
});
});
test
(
'tap on the button, verify result'
,
()
async
{
test
(
'tap on the button, verify result'
,
()
async
{
...
@@ -26,7 +30,7 @@ void main() {
...
@@ -26,7 +30,7 @@ void main() {
await
driver
.
waitFor
(
button
);
await
driver
.
waitFor
(
button
);
await
driver
.
tap
(
button
);
await
driver
.
tap
(
button
);
String
?
batteryLevel
;
String
batteryLevel
;
while
(
batteryLevel
==
null
||
batteryLevel
.
contains
(
'unknown'
))
{
while
(
batteryLevel
==
null
||
batteryLevel
.
contains
(
'unknown'
))
{
batteryLevel
=
await
driver
.
getText
(
batteryLevelLabel
);
batteryLevel
=
await
driver
.
getText
(
batteryLevelLabel
);
}
}
...
...
examples/platform_channel_swift/test_driver/button_tap_test.dart
View file @
6bd54753
...
@@ -2,19 +2,23 @@
...
@@ -2,19 +2,23 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// TODO(goderbauer): migrate this file to null-safety when flutter_driver is null-safe.
// @dart = 2.9
import
'package:flutter_driver/flutter_driver.dart'
;
import
'package:flutter_driver/flutter_driver.dart'
;
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
void
main
(
)
{
group
(
'button tap test'
,
()
{
group
(
'button tap test'
,
()
{
late
FlutterDriver
driver
;
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
});
});
tearDownAll
(()
async
{
tearDownAll
(()
async
{
driver
.
close
();
if
(
driver
!=
null
)
driver
.
close
();
});
});
test
(
'tap on the button, verify result'
,
()
async
{
test
(
'tap on the button, verify result'
,
()
async
{
...
@@ -26,7 +30,7 @@ void main() {
...
@@ -26,7 +30,7 @@ void main() {
await
driver
.
waitFor
(
button
);
await
driver
.
waitFor
(
button
);
await
driver
.
tap
(
button
);
await
driver
.
tap
(
button
);
String
?
batteryLevel
;
String
batteryLevel
;
while
(
batteryLevel
==
null
||
batteryLevel
.
contains
(
'unknown'
))
{
while
(
batteryLevel
==
null
||
batteryLevel
.
contains
(
'unknown'
))
{
batteryLevel
=
await
driver
.
getText
(
batteryLevelLabel
);
batteryLevel
=
await
driver
.
getText
(
batteryLevelLabel
);
}
}
...
...
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