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
a195bcc0
Unverified
Commit
a195bcc0
authored
Apr 28, 2021
by
Abhishek Ghaskata
Committed by
GitHub
Apr 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate dev/integration_tests/ui to null safety (#80624)
parent
0379dcd0
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
55 additions
and
57 deletions
+55
-57
Debug.xcconfig
dev/integration_tests/ui/ios/Flutter/Debug.xcconfig
+1
-0
Release.xcconfig
dev/integration_tests/ui/ios/Flutter/Release.xcconfig
+1
-0
commands.dart
dev/integration_tests/ui/lib/commands.dart
+2
-2
driver.dart
dev/integration_tests/ui/lib/driver.dart
+3
-3
empty.dart
dev/integration_tests/ui/lib/empty.dart
+1
-1
keyboard_resize.dart
dev/integration_tests/ui/lib/keyboard_resize.dart
+4
-4
keyboard_textfield.dart
dev/integration_tests/ui/lib/keyboard_textfield.dart
+2
-2
license_check.dart
dev/integration_tests/ui/lib/license_check.dart
+11
-13
main.dart
dev/integration_tests/ui/lib/main.dart
+2
-2
overflow.dart
dev/integration_tests/ui/lib/overflow.dart
+1
-1
route.dart
dev/integration_tests/ui/lib/route.dart
+1
-1
screenshot.dart
dev/integration_tests/ui/lib/screenshot.dart
+1
-1
pubspec.yaml
dev/integration_tests/ui/pubspec.yaml
+1
-1
commands_debug_paint_test.dart
...ation_tests/ui/test_driver/commands_debug_paint_test.dart
+2
-2
commands_none_test.dart
dev/integration_tests/ui/test_driver/commands_none_test.dart
+2
-2
commands_performance_overlay_test.dart
...sts/ui/test_driver/commands_performance_overlay_test.dart
+2
-2
defines_test.dart
dev/integration_tests/ui/test_driver/defines_test.dart
+1
-1
driver_test.dart
dev/integration_tests/ui/test_driver/driver_test.dart
+1
-1
empty_test.dart
dev/integration_tests/ui/test_driver/empty_test.dart
+1
-1
keyboard_resize_test.dart
...ntegration_tests/ui/test_driver/keyboard_resize_test.dart
+2
-2
keyboard_textfield_test.dart
...gration_tests/ui/test_driver/keyboard_textfield_test.dart
+2
-2
license_check_test.dart
dev/integration_tests/ui/test_driver/license_check_test.dart
+2
-4
route_test.dart
dev/integration_tests/ui/test_driver/route_test.dart
+2
-2
screenshot_test.dart
dev/integration_tests/ui/test_driver/screenshot_test.dart
+7
-7
No files found.
dev/integration_tests/ui/ios/Flutter/Debug.xcconfig
View file @
a195bcc0
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
#include "Generated.xcconfig"
dev/integration_tests/ui/ios/Flutter/Release.xcconfig
View file @
a195bcc0
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
#include "Generated.xcconfig"
dev/integration_tests/ui/lib/commands.dart
View file @
a195bcc0
...
@@ -11,14 +11,14 @@ void main() {
...
@@ -11,14 +11,14 @@ void main() {
}
}
class
Test
extends
SingleChildRenderObjectWidget
{
class
Test
extends
SingleChildRenderObjectWidget
{
const
Test
({
Key
key
})
:
super
(
key:
key
);
const
Test
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
RenderTest
createRenderObject
(
BuildContext
context
)
=>
RenderTest
();
RenderTest
createRenderObject
(
BuildContext
context
)
=>
RenderTest
();
}
}
class
RenderTest
extends
RenderProxyBox
{
class
RenderTest
extends
RenderProxyBox
{
RenderTest
({
RenderBox
child
})
:
super
(
child
);
RenderTest
({
RenderBox
?
child
})
:
super
(
child
);
@override
@override
void
debugPaintSize
(
PaintingContext
context
,
Offset
offset
)
{
void
debugPaintSize
(
PaintingContext
context
,
Offset
offset
)
{
...
...
dev/integration_tests/ui/lib/driver.dart
View file @
a195bcc0
...
@@ -11,7 +11,7 @@ void main() {
...
@@ -11,7 +11,7 @@ void main() {
}
}
class
DriverTestApp
extends
StatefulWidget
{
class
DriverTestApp
extends
StatefulWidget
{
const
DriverTestApp
({
Key
key
})
:
super
(
key:
key
);
const
DriverTestApp
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
State
<
StatefulWidget
>
createState
()
{
State
<
StatefulWidget
>
createState
()
{
...
@@ -59,9 +59,9 @@ class DriverTestAppState extends State<DriverTestApp> {
...
@@ -59,9 +59,9 @@ class DriverTestAppState extends State<DriverTestApp> {
DropdownButton
<
Letter
>(
DropdownButton
<
Letter
>(
key:
const
ValueKey
<
String
>(
'dropdown'
),
key:
const
ValueKey
<
String
>(
'dropdown'
),
value:
_selectedValue
,
value:
_selectedValue
,
onChanged:
(
Letter
newValue
)
{
onChanged:
(
Letter
?
newValue
)
{
setState
(()
{
setState
(()
{
_selectedValue
=
newValue
;
_selectedValue
=
newValue
!
;
});
});
},
},
items:
const
<
DropdownMenuItem
<
Letter
>>[
items:
const
<
DropdownMenuItem
<
Letter
>>[
...
...
dev/integration_tests/ui/lib/empty.dart
View file @
a195bcc0
...
@@ -12,7 +12,7 @@ void main() {
...
@@ -12,7 +12,7 @@ void main() {
}
}
class
Empty
extends
StatelessWidget
{
class
Empty
extends
StatelessWidget
{
const
Empty
({
Key
key
})
:
super
(
key:
key
);
const
Empty
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
Widget
build
(
BuildContext
context
)
=>
Container
();
Widget
build
(
BuildContext
context
)
=>
Container
();
...
...
dev/integration_tests/ui/lib/keyboard_resize.dart
View file @
a195bcc0
...
@@ -8,7 +8,7 @@ import 'package:flutter_driver/driver_extension.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_driver/driver_extension.dart';
import
'keys.dart'
as
keys
;
import
'keys.dart'
as
keys
;
void
main
(
)
{
void
main
(
)
{
enableFlutterDriverExtension
(
handler:
(
String
message
)
async
{
enableFlutterDriverExtension
(
handler:
(
String
?
message
)
async
{
// TODO(cbernaschina): remove when test flakiness is resolved
// TODO(cbernaschina): remove when test flakiness is resolved
return
'keyboard_resize'
;
return
'keyboard_resize'
;
});
});
...
@@ -16,7 +16,7 @@ void main() {
...
@@ -16,7 +16,7 @@ void main() {
}
}
class
MyApp
extends
StatelessWidget
{
class
MyApp
extends
StatelessWidget
{
const
MyApp
({
Key
key
})
:
super
(
key:
key
);
const
MyApp
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -29,7 +29,7 @@ class MyApp extends StatelessWidget {
...
@@ -29,7 +29,7 @@ class MyApp extends StatelessWidget {
}
}
class
MyHomePage
extends
StatefulWidget
{
class
MyHomePage
extends
StatefulWidget
{
const
MyHomePage
({
Key
key
})
:
super
(
key:
key
);
const
MyHomePage
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
_MyHomePageState
createState
()
=>
_MyHomePageState
();
_MyHomePageState
createState
()
=>
_MyHomePageState
();
...
@@ -60,7 +60,7 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -60,7 +60,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
floatingActionButton:
FloatingActionButton
(
floatingActionButton:
FloatingActionButton
(
key:
const
Key
(
keys
.
kUnfocusButton
),
key:
const
Key
(
keys
.
kUnfocusButton
),
onPressed:
()
{
textField
.
focusNode
.
unfocus
();
},
onPressed:
()
{
textField
.
focusNode
!
.
unfocus
();
},
tooltip:
'Unfocus'
,
tooltip:
'Unfocus'
,
child:
const
Icon
(
Icons
.
done
),
child:
const
Icon
(
Icons
.
done
),
),
),
...
...
dev/integration_tests/ui/lib/keyboard_textfield.dart
View file @
a195bcc0
...
@@ -14,7 +14,7 @@ void main() {
...
@@ -14,7 +14,7 @@ void main() {
}
}
class
MyApp
extends
StatelessWidget
{
class
MyApp
extends
StatelessWidget
{
const
MyApp
({
Key
key
})
:
super
(
key:
key
);
const
MyApp
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -27,7 +27,7 @@ class MyApp extends StatelessWidget {
...
@@ -27,7 +27,7 @@ class MyApp extends StatelessWidget {
}
}
class
MyHomePage
extends
StatefulWidget
{
class
MyHomePage
extends
StatefulWidget
{
const
MyHomePage
({
Key
key
})
:
super
(
key:
key
);
const
MyHomePage
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
_MyHomePageState
createState
()
=>
_MyHomePageState
();
_MyHomePageState
createState
()
=>
_MyHomePageState
();
...
...
dev/integration_tests/ui/lib/license_check.dart
View file @
a195bcc0
...
@@ -14,13 +14,13 @@ void main() {
...
@@ -14,13 +14,13 @@ void main() {
}
}
class
ShowLicenses
extends
StatelessWidget
{
class
ShowLicenses
extends
StatelessWidget
{
const
ShowLicenses
({
Key
key
})
:
super
(
key:
key
);
const
ShowLicenses
({
Key
?
key
})
:
super
(
key:
key
);
Widget
_buildTestResultWidget
(
Widget
_buildTestResultWidget
(
BuildContext
context
,
BuildContext
context
,
AsyncSnapshot
<
List
<
LicenseEntry
>>
snapshot
,
AsyncSnapshot
<
List
<
LicenseEntry
>>
snapshot
,
)
{
)
{
final
List
<
LicenseEntry
>
entries
=
snapshot
.
data
;
final
List
<
LicenseEntry
>
entries
=
snapshot
.
data
??
<
LicenseEntry
>[]
;
String
flutterPackage
=
''
;
String
flutterPackage
=
''
;
final
List
<
String
>
flutterParagraphs
=
<
String
>[];
final
List
<
String
>
flutterParagraphs
=
<
String
>[];
String
enginePackage
=
''
;
String
enginePackage
=
''
;
...
@@ -41,17 +41,15 @@ class ShowLicenses extends StatelessWidget {
...
@@ -41,17 +41,15 @@ class ShowLicenses extends StatelessWidget {
}
}
final
List
<
Widget
>
result
=
<
Widget
>[];
final
List
<
Widget
>
result
=
<
Widget
>[];
if
(
entries
.
isNotEmpty
)
{
result
.
addAll
(<
Widget
>[
result
.
addAll
(<
Widget
>[
const
Text
(
'License Check Test'
,
key:
ValueKey
<
String
>(
'Header'
)),
const
Text
(
'License Check Test'
,
key:
ValueKey
<
String
>(
'Header'
)),
Text
(
flutterPackage
,
key:
const
ValueKey
<
String
>(
'FlutterPackage'
)),
Text
(
flutterPackage
,
key:
const
ValueKey
<
String
>(
'FlutterPackage'
)),
Text
(
flutterParagraphs
.
join
(
' '
),
key:
const
ValueKey
<
String
>(
'FlutterLicense'
)),
Text
(
flutterParagraphs
.
join
(
' '
),
key:
const
ValueKey
<
String
>(
'FlutterLicense'
)),
Text
(
'
${flutterParagraphs.length}
'
,
key:
const
ValueKey
<
String
>(
'FlutterCount'
)),
Text
(
'
${flutterParagraphs.length}
'
,
key:
const
ValueKey
<
String
>(
'FlutterCount'
)),
Text
(
enginePackage
,
key:
const
ValueKey
<
String
>(
'EnginePackage'
)),
Text
(
enginePackage
,
key:
const
ValueKey
<
String
>(
'EnginePackage'
)),
Text
(
engineParagraphs
.
join
(
' '
),
key:
const
ValueKey
<
String
>(
'EngineLicense'
)),
Text
(
engineParagraphs
.
join
(
' '
),
key:
const
ValueKey
<
String
>(
'EngineLicense'
)),
Text
(
'
${engineParagraphs.length}
'
,
key:
const
ValueKey
<
String
>(
'EngineCount'
)),
Text
(
'
${engineParagraphs.length}
'
,
key:
const
ValueKey
<
String
>(
'EngineCount'
)),
]);
]);
}
return
ListView
(
return
ListView
(
children:
result
,
children:
result
,
...
...
dev/integration_tests/ui/lib/main.dart
View file @
a195bcc0
...
@@ -18,9 +18,9 @@ void main() {
...
@@ -18,9 +18,9 @@ void main() {
textDirection:
TextDirection
.
ltr
,
textDirection:
TextDirection
.
ltr
,
),
),
onPressed:
()
{
onPressed:
()
{
Navigator
.
push
<
Object
>(
Navigator
.
push
<
Object
?
>(
context
,
context
,
MaterialPageRoute
<
dynamic
>(
MaterialPageRoute
<
Object
?
>(
builder:
(
BuildContext
context
)
{
builder:
(
BuildContext
context
)
{
return
const
Material
(
return
const
Material
(
child:
Center
(
child:
Center
(
...
...
dev/integration_tests/ui/lib/overflow.dart
View file @
a195bcc0
...
@@ -9,7 +9,7 @@ void main() {
...
@@ -9,7 +9,7 @@ void main() {
}
}
class
Test
extends
StatefulWidget
{
class
Test
extends
StatefulWidget
{
const
Test
({
Key
key
})
:
super
(
key:
key
);
const
Test
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
State
<
Test
>
createState
()
=>
_TestState
();
State
<
Test
>
createState
()
=>
_TestState
();
...
...
dev/integration_tests/ui/lib/route.dart
View file @
a195bcc0
...
@@ -9,7 +9,7 @@ import 'package:flutter_driver/driver_extension.dart';
...
@@ -9,7 +9,7 @@ import 'package:flutter_driver/driver_extension.dart';
// To use this test: "flutter drive --route '/smuggle-it' lib/route.dart"
// To use this test: "flutter drive --route '/smuggle-it' lib/route.dart"
void
main
(
)
{
void
main
(
)
{
enableFlutterDriverExtension
(
handler:
(
String
message
)
async
{
enableFlutterDriverExtension
(
handler:
(
String
?
message
)
async
{
return
ui
.
window
.
defaultRouteName
;
return
ui
.
window
.
defaultRouteName
;
});
});
}
}
dev/integration_tests/ui/lib/screenshot.dart
View file @
a195bcc0
...
@@ -16,7 +16,7 @@ void main() {
...
@@ -16,7 +16,7 @@ void main() {
}
}
class
Toggler
extends
StatefulWidget
{
class
Toggler
extends
StatefulWidget
{
const
Toggler
({
Key
key
})
:
super
(
key:
key
);
const
Toggler
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
State
<
Toggler
>
createState
()
=>
TogglerState
();
State
<
Toggler
>
createState
()
=>
TogglerState
();
...
...
dev/integration_tests/ui/pubspec.yaml
View file @
a195bcc0
...
@@ -2,7 +2,7 @@ name: integration_ui
...
@@ -2,7 +2,7 @@ name: integration_ui
description
:
Flutter non-plugin UI integration tests.
description
:
Flutter non-plugin UI integration tests.
environment
:
environment
:
sdk
:
"
>=2.
8
.0
<3.0.0"
sdk
:
"
>=2.
12
.0
<3.0.0"
# The "image" dependency below seems to only be needed for test_driver/screenshot_test.dart
# The "image" dependency below seems to only be needed for test_driver/screenshot_test.dart
# It can probably be removed, see the comment in that file.
# It can probably be removed, see the comment in that file.
...
...
dev/integration_tests/ui/test_driver/commands_debug_paint_test.dart
View file @
a195bcc0
...
@@ -6,14 +6,14 @@ import 'package:flutter_driver/flutter_driver.dart';
...
@@ -6,14 +6,14 @@ 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
(
)
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
});
});
tearDownAll
(()
async
{
tearDownAll
(()
async
{
await
driver
?
.
close
();
await
driver
.
close
();
});
});
test
(
'check that we are painting in debugPaintSize mode'
,
()
async
{
test
(
'check that we are painting in debugPaintSize mode'
,
()
async
{
...
...
dev/integration_tests/ui/test_driver/commands_none_test.dart
View file @
a195bcc0
...
@@ -6,14 +6,14 @@ import 'package:flutter_driver/flutter_driver.dart';
...
@@ -6,14 +6,14 @@ 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
(
)
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
});
});
tearDownAll
(()
async
{
tearDownAll
(()
async
{
await
driver
?
.
close
();
await
driver
.
close
();
});
});
test
(
'check that we are in normal mode'
,
()
async
{
test
(
'check that we are in normal mode'
,
()
async
{
...
...
dev/integration_tests/ui/test_driver/commands_performance_overlay_test.dart
View file @
a195bcc0
...
@@ -6,14 +6,14 @@ import 'package:flutter_driver/flutter_driver.dart';
...
@@ -6,14 +6,14 @@ 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
(
)
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
});
});
tearDownAll
(()
async
{
tearDownAll
(()
async
{
await
driver
?
.
close
();
await
driver
.
close
();
});
});
test
(
'check that we are showing the performance overlay'
,
()
async
{
test
(
'check that we are showing the performance overlay'
,
()
async
{
...
...
dev/integration_tests/ui/test_driver/defines_test.dart
View file @
a195bcc0
...
@@ -6,7 +6,7 @@ import 'package:flutter_driver/flutter_driver.dart';
...
@@ -6,7 +6,7 @@ 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
(
)
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
...
...
dev/integration_tests/ui/test_driver/driver_test.dart
View file @
a195bcc0
...
@@ -11,7 +11,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
...
@@ -11,7 +11,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
void
main
(
)
{
void
main
(
)
{
group
(
'FlutterDriver'
,
()
{
group
(
'FlutterDriver'
,
()
{
final
SerializableFinder
presentText
=
find
.
text
(
'present'
);
final
SerializableFinder
presentText
=
find
.
text
(
'present'
);
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
...
...
dev/integration_tests/ui/test_driver/empty_test.dart
View file @
a195bcc0
...
@@ -8,7 +8,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
...
@@ -8,7 +8,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
// Connect and disconnect from the empty app.
// Connect and disconnect from the empty app.
void
main
(
)
{
void
main
(
)
{
group
(
'FlutterDriver'
,
()
{
group
(
'FlutterDriver'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
...
...
dev/integration_tests/ui/test_driver/keyboard_resize_test.dart
View file @
a195bcc0
...
@@ -8,14 +8,14 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
...
@@ -8,14 +8,14 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
void
main
(
)
{
void
main
(
)
{
group
(
'end-to-end test'
,
()
{
group
(
'end-to-end test'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
});
});
tearDownAll
(()
async
{
tearDownAll
(()
async
{
await
driver
?
.
close
();
await
driver
.
close
();
});
});
test
(
'Ensure keyboard dismissal resizes the view to original size'
,
()
async
{
test
(
'Ensure keyboard dismissal resizes the view to original size'
,
()
async
{
...
...
dev/integration_tests/ui/test_driver/keyboard_textfield_test.dart
View file @
a195bcc0
...
@@ -8,14 +8,14 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
...
@@ -8,14 +8,14 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
void
main
(
)
{
void
main
(
)
{
group
(
'end-to-end test'
,
()
{
group
(
'end-to-end test'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
});
});
tearDownAll
(()
async
{
tearDownAll
(()
async
{
await
driver
?
.
close
();
await
driver
.
close
();
});
});
test
(
'Textfield scrolls back into view after covered by keyboard'
,
()
async
{
test
(
'Textfield scrolls back into view after covered by keyboard'
,
()
async
{
...
...
dev/integration_tests/ui/test_driver/license_check_test.dart
View file @
a195bcc0
...
@@ -20,7 +20,7 @@ void main() {
...
@@ -20,7 +20,7 @@ void main() {
final
String
license
=
licenseFile
.
readAsStringSync
().
split
(
newlineSplit
).
join
(
' '
).
trim
();
final
String
license
=
licenseFile
.
readAsStringSync
().
split
(
newlineSplit
).
join
(
' '
).
trim
();
group
(
'License file check'
,
()
{
group
(
'License file check'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
...
@@ -28,9 +28,7 @@ void main() {
...
@@ -28,9 +28,7 @@ void main() {
});
});
tearDownAll
(()
async
{
tearDownAll
(()
async
{
if
(
driver
!=
null
)
{
await
driver
.
close
();
await
driver
.
close
();
}
});
});
test
(
'flutter license'
,
()
async
{
test
(
'flutter license'
,
()
async
{
...
...
dev/integration_tests/ui/test_driver/route_test.dart
View file @
a195bcc0
...
@@ -8,14 +8,14 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
...
@@ -8,14 +8,14 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
void
main
(
)
{
void
main
(
)
{
group
(
'flutter run test --route'
,
()
{
group
(
'flutter run test --route'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
});
});
tearDownAll
(()
async
{
tearDownAll
(()
async
{
await
driver
?
.
close
();
await
driver
.
close
();
});
});
test
(
'sanity check flutter drive --route'
,
()
async
{
test
(
'sanity check flutter drive --route'
,
()
async
{
...
...
dev/integration_tests/ui/test_driver/screenshot_test.dart
View file @
a195bcc0
...
@@ -15,7 +15,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
...
@@ -15,7 +15,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
void
main
(
)
{
void
main
(
)
{
group
(
'FlutterDriver'
,
()
{
group
(
'FlutterDriver'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
driver
=
await
FlutterDriver
.
connect
();
...
@@ -32,18 +32,18 @@ void main() {
...
@@ -32,18 +32,18 @@ void main() {
await
driver
.
waitFor
(
toggleBtn
);
await
driver
.
waitFor
(
toggleBtn
);
bool
cardsShouldBeVisible
=
false
;
bool
cardsShouldBeVisible
=
false
;
Image
imageBefore
=
decodePng
(
await
driver
.
screenshot
());
Image
?
imageBefore
=
decodePng
(
await
driver
.
screenshot
());
for
(
int
i
=
0
;
i
<
10
;
i
+=
1
)
{
for
(
int
i
=
0
;
i
<
10
;
i
+=
1
)
{
await
driver
.
tap
(
toggleBtn
);
await
driver
.
tap
(
toggleBtn
);
cardsShouldBeVisible
=
!
cardsShouldBeVisible
;
cardsShouldBeVisible
=
!
cardsShouldBeVisible
;
final
Image
imageAfter
=
decodePng
(
await
driver
.
screenshot
());
final
Image
?
imageAfter
=
decodePng
(
await
driver
.
screenshot
());
if
(
cardsShouldBeVisible
)
{
if
(
cardsShouldBeVisible
)
{
expect
(
imageBefore
.
data
,
isNot
(
cardsAreVisible
));
expect
(
imageBefore
?
.
data
,
isNot
(
cardsAreVisible
));
expect
(
imageAfter
.
data
,
cardsAreVisible
);
expect
(
imageAfter
?
.
data
,
cardsAreVisible
);
}
else
{
}
else
{
expect
(
imageBefore
.
data
,
cardsAreVisible
);
expect
(
imageBefore
?
.
data
,
cardsAreVisible
);
expect
(
imageAfter
.
data
,
isNot
(
cardsAreVisible
));
expect
(
imageAfter
?
.
data
,
isNot
(
cardsAreVisible
));
}
}
imageBefore
=
imageAfter
;
imageBefore
=
imageAfter
;
...
...
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