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
Show 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"
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"
dev/integration_tests/ui/lib/commands.dart
View file @
a195bcc0
...
...
@@ -11,14 +11,14 @@ void main() {
}
class
Test
extends
SingleChildRenderObjectWidget
{
const
Test
({
Key
key
})
:
super
(
key:
key
);
const
Test
({
Key
?
key
})
:
super
(
key:
key
);
@override
RenderTest
createRenderObject
(
BuildContext
context
)
=>
RenderTest
();
}
class
RenderTest
extends
RenderProxyBox
{
RenderTest
({
RenderBox
child
})
:
super
(
child
);
RenderTest
({
RenderBox
?
child
})
:
super
(
child
);
@override
void
debugPaintSize
(
PaintingContext
context
,
Offset
offset
)
{
...
...
dev/integration_tests/ui/lib/driver.dart
View file @
a195bcc0
...
...
@@ -11,7 +11,7 @@ void main() {
}
class
DriverTestApp
extends
StatefulWidget
{
const
DriverTestApp
({
Key
key
})
:
super
(
key:
key
);
const
DriverTestApp
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
StatefulWidget
>
createState
()
{
...
...
@@ -59,9 +59,9 @@ class DriverTestAppState extends State<DriverTestApp> {
DropdownButton
<
Letter
>(
key:
const
ValueKey
<
String
>(
'dropdown'
),
value:
_selectedValue
,
onChanged:
(
Letter
newValue
)
{
onChanged:
(
Letter
?
newValue
)
{
setState
(()
{
_selectedValue
=
newValue
;
_selectedValue
=
newValue
!
;
});
},
items:
const
<
DropdownMenuItem
<
Letter
>>[
...
...
dev/integration_tests/ui/lib/empty.dart
View file @
a195bcc0
...
...
@@ -12,7 +12,7 @@ void main() {
}
class
Empty
extends
StatelessWidget
{
const
Empty
({
Key
key
})
:
super
(
key:
key
);
const
Empty
({
Key
?
key
})
:
super
(
key:
key
);
@override
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';
import
'keys.dart'
as
keys
;
void
main
(
)
{
enableFlutterDriverExtension
(
handler:
(
String
message
)
async
{
enableFlutterDriverExtension
(
handler:
(
String
?
message
)
async
{
// TODO(cbernaschina): remove when test flakiness is resolved
return
'keyboard_resize'
;
});
...
...
@@ -16,7 +16,7 @@ void main() {
}
class
MyApp
extends
StatelessWidget
{
const
MyApp
({
Key
key
})
:
super
(
key:
key
);
const
MyApp
({
Key
?
key
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -29,7 +29,7 @@ class MyApp extends StatelessWidget {
}
class
MyHomePage
extends
StatefulWidget
{
const
MyHomePage
({
Key
key
})
:
super
(
key:
key
);
const
MyHomePage
({
Key
?
key
})
:
super
(
key:
key
);
@override
_MyHomePageState
createState
()
=>
_MyHomePageState
();
...
...
@@ -60,7 +60,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
floatingActionButton:
FloatingActionButton
(
key:
const
Key
(
keys
.
kUnfocusButton
),
onPressed:
()
{
textField
.
focusNode
.
unfocus
();
},
onPressed:
()
{
textField
.
focusNode
!
.
unfocus
();
},
tooltip:
'Unfocus'
,
child:
const
Icon
(
Icons
.
done
),
),
...
...
dev/integration_tests/ui/lib/keyboard_textfield.dart
View file @
a195bcc0
...
...
@@ -14,7 +14,7 @@ void main() {
}
class
MyApp
extends
StatelessWidget
{
const
MyApp
({
Key
key
})
:
super
(
key:
key
);
const
MyApp
({
Key
?
key
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -27,7 +27,7 @@ class MyApp extends StatelessWidget {
}
class
MyHomePage
extends
StatefulWidget
{
const
MyHomePage
({
Key
key
})
:
super
(
key:
key
);
const
MyHomePage
({
Key
?
key
})
:
super
(
key:
key
);
@override
_MyHomePageState
createState
()
=>
_MyHomePageState
();
...
...
dev/integration_tests/ui/lib/license_check.dart
View file @
a195bcc0
...
...
@@ -14,13 +14,13 @@ void main() {
}
class
ShowLicenses
extends
StatelessWidget
{
const
ShowLicenses
({
Key
key
})
:
super
(
key:
key
);
const
ShowLicenses
({
Key
?
key
})
:
super
(
key:
key
);
Widget
_buildTestResultWidget
(
BuildContext
context
,
AsyncSnapshot
<
List
<
LicenseEntry
>>
snapshot
,
)
{
final
List
<
LicenseEntry
>
entries
=
snapshot
.
data
;
final
List
<
LicenseEntry
>
entries
=
snapshot
.
data
??
<
LicenseEntry
>[]
;
String
flutterPackage
=
''
;
final
List
<
String
>
flutterParagraphs
=
<
String
>[];
String
enginePackage
=
''
;
...
...
@@ -41,7 +41,6 @@ class ShowLicenses extends StatelessWidget {
}
final
List
<
Widget
>
result
=
<
Widget
>[];
if
(
entries
.
isNotEmpty
)
{
result
.
addAll
(<
Widget
>[
const
Text
(
'License Check Test'
,
key:
ValueKey
<
String
>(
'Header'
)),
Text
(
flutterPackage
,
key:
const
ValueKey
<
String
>(
'FlutterPackage'
)),
...
...
@@ -51,7 +50,6 @@ class ShowLicenses extends StatelessWidget {
Text
(
engineParagraphs
.
join
(
' '
),
key:
const
ValueKey
<
String
>(
'EngineLicense'
)),
Text
(
'
${engineParagraphs.length}
'
,
key:
const
ValueKey
<
String
>(
'EngineCount'
)),
]);
}
return
ListView
(
children:
result
,
...
...
dev/integration_tests/ui/lib/main.dart
View file @
a195bcc0
...
...
@@ -18,9 +18,9 @@ void main() {
textDirection:
TextDirection
.
ltr
,
),
onPressed:
()
{
Navigator
.
push
<
Object
>(
Navigator
.
push
<
Object
?
>(
context
,
MaterialPageRoute
<
dynamic
>(
MaterialPageRoute
<
Object
?
>(
builder:
(
BuildContext
context
)
{
return
const
Material
(
child:
Center
(
...
...
dev/integration_tests/ui/lib/overflow.dart
View file @
a195bcc0
...
...
@@ -9,7 +9,7 @@ void main() {
}
class
Test
extends
StatefulWidget
{
const
Test
({
Key
key
})
:
super
(
key:
key
);
const
Test
({
Key
?
key
})
:
super
(
key:
key
);
@override
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';
// To use this test: "flutter drive --route '/smuggle-it' lib/route.dart"
void
main
(
)
{
enableFlutterDriverExtension
(
handler:
(
String
message
)
async
{
enableFlutterDriverExtension
(
handler:
(
String
?
message
)
async
{
return
ui
.
window
.
defaultRouteName
;
});
}
dev/integration_tests/ui/lib/screenshot.dart
View file @
a195bcc0
...
...
@@ -16,7 +16,7 @@ void main() {
}
class
Toggler
extends
StatefulWidget
{
const
Toggler
({
Key
key
})
:
super
(
key:
key
);
const
Toggler
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
Toggler
>
createState
()
=>
TogglerState
();
...
...
dev/integration_tests/ui/pubspec.yaml
View file @
a195bcc0
...
...
@@ -2,7 +2,7 @@ name: integration_ui
description
:
Flutter non-plugin UI integration tests.
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
# 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';
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
});
tearDownAll
(()
async
{
await
driver
?
.
close
();
await
driver
.
close
();
});
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';
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
});
tearDownAll
(()
async
{
await
driver
?
.
close
();
await
driver
.
close
();
});
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';
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
});
tearDownAll
(()
async
{
await
driver
?
.
close
();
await
driver
.
close
();
});
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';
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
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;
void
main
(
)
{
group
(
'FlutterDriver'
,
()
{
final
SerializableFinder
presentText
=
find
.
text
(
'present'
);
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
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;
// Connect and disconnect from the empty app.
void
main
(
)
{
group
(
'FlutterDriver'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
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;
void
main
(
)
{
group
(
'end-to-end test'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
});
tearDownAll
(()
async
{
await
driver
?
.
close
();
await
driver
.
close
();
});
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;
void
main
(
)
{
group
(
'end-to-end test'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
});
tearDownAll
(()
async
{
await
driver
?
.
close
();
await
driver
.
close
();
});
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() {
final
String
license
=
licenseFile
.
readAsStringSync
().
split
(
newlineSplit
).
join
(
' '
).
trim
();
group
(
'License file check'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
...
...
@@ -28,9 +28,7 @@ void main() {
});
tearDownAll
(()
async
{
if
(
driver
!=
null
)
{
await
driver
.
close
();
}
});
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;
void
main
(
)
{
group
(
'flutter run test --route'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
});
tearDownAll
(()
async
{
await
driver
?
.
close
();
await
driver
.
close
();
});
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;
void
main
(
)
{
group
(
'FlutterDriver'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
...
...
@@ -32,18 +32,18 @@ void main() {
await
driver
.
waitFor
(
toggleBtn
);
bool
cardsShouldBeVisible
=
false
;
Image
imageBefore
=
decodePng
(
await
driver
.
screenshot
());
Image
?
imageBefore
=
decodePng
(
await
driver
.
screenshot
());
for
(
int
i
=
0
;
i
<
10
;
i
+=
1
)
{
await
driver
.
tap
(
toggleBtn
);
cardsShouldBeVisible
=
!
cardsShouldBeVisible
;
final
Image
imageAfter
=
decodePng
(
await
driver
.
screenshot
());
final
Image
?
imageAfter
=
decodePng
(
await
driver
.
screenshot
());
if
(
cardsShouldBeVisible
)
{
expect
(
imageBefore
.
data
,
isNot
(
cardsAreVisible
));
expect
(
imageAfter
.
data
,
cardsAreVisible
);
expect
(
imageBefore
?
.
data
,
isNot
(
cardsAreVisible
));
expect
(
imageAfter
?
.
data
,
cardsAreVisible
);
}
else
{
expect
(
imageBefore
.
data
,
cardsAreVisible
);
expect
(
imageAfter
.
data
,
isNot
(
cardsAreVisible
));
expect
(
imageBefore
?
.
data
,
cardsAreVisible
);
expect
(
imageAfter
?
.
data
,
isNot
(
cardsAreVisible
));
}
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