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