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
38f318b4
Unverified
Commit
38f318b4
authored
Oct 23, 2023
by
Kostia Sokolovskyi
Committed by
GitHub
Oct 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cover last test/material tests with leak tracking. (#137004)
parent
abf20877
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
48 deletions
+84
-48
input_date_picker_form_field_test.dart
...tter/test/material/input_date_picker_form_field_test.dart
+2
-1
search_test.dart
packages/flutter/test/material/search_test.dart
+68
-35
search_view_theme_test.dart
packages/flutter/test/material/search_view_theme_test.dart
+6
-6
time_picker_theme_test.dart
packages/flutter/test/material/time_picker_theme_test.dart
+4
-4
tooltip_test.dart
packages/flutter/test/material/tooltip_test.dart
+4
-2
No files found.
packages/flutter/test/material/input_date_picker_form_field_test.dart
View file @
38f318b4
...
...
@@ -381,8 +381,9 @@ void main() {
});
});
testWidgets
(
'FocusNode can request focus'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'FocusNode can request focus'
,
(
WidgetTester
tester
)
async
{
final
FocusNode
focusNode
=
FocusNode
();
addTearDown
(
focusNode
.
dispose
);
await
tester
.
pumpWidget
(
inputDatePickerField
(
focusNode:
focusNode
,
));
...
...
packages/flutter/test/material/search_test.dart
View file @
38f318b4
This diff is collapsed.
Click to expand it.
packages/flutter/test/material/search_view_theme_test.dart
View file @
38f318b4
...
...
@@ -196,21 +196,21 @@ void main() {
expect
(
inputText
.
style
.
fontSize
,
headerTextStyle
.
fontSize
);
}
testWidgets
(
'SearchView properties overrides defaults'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'SearchView properties overrides defaults'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
buildFrame
(
useSearchViewProperties:
true
));
await
tester
.
tap
(
find
.
byIcon
(
Icons
.
search
));
await
tester
.
pumpAndSettle
();
// allow the animations to finish
checkSearchView
(
tester
);
});
testWidgets
(
'SearchView theme data overrides defaults'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'SearchView theme data overrides defaults'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
buildFrame
(
searchViewThemeData:
searchViewTheme
));
await
tester
.
tap
(
find
.
byIcon
(
Icons
.
search
));
await
tester
.
pumpAndSettle
();
checkSearchView
(
tester
);
});
testWidgets
(
'Overall Theme SearchView theme overrides defaults'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Overall Theme SearchView theme overrides defaults'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
buildFrame
(
overallTheme:
searchViewTheme
));
await
tester
.
tap
(
find
.
byIcon
(
Icons
.
search
));
await
tester
.
pumpAndSettle
();
...
...
@@ -219,7 +219,7 @@ void main() {
// Same as the previous tests with empty SearchViewThemeData's instead of null.
testWidgets
(
'SearchView properties overrides defaults, empty theme and overall theme'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'SearchView properties overrides defaults, empty theme and overall theme'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
buildFrame
(
useSearchViewProperties:
true
,
searchViewThemeData:
const
SearchViewThemeData
(),
overallTheme:
const
SearchViewThemeData
()));
...
...
@@ -228,7 +228,7 @@ void main() {
checkSearchView
(
tester
);
});
testWidgets
(
'SearchView theme overrides defaults and overall theme'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'SearchView theme overrides defaults and overall theme'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
buildFrame
(
searchViewThemeData:
searchViewTheme
,
overallTheme:
const
SearchViewThemeData
()));
await
tester
.
tap
(
find
.
byIcon
(
Icons
.
search
));
...
...
@@ -236,7 +236,7 @@ void main() {
checkSearchView
(
tester
);
});
testWidgets
(
'Overall Theme SearchView theme overrides defaults and null theme'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Overall Theme SearchView theme overrides defaults and null theme'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
buildFrame
(
overallTheme:
searchViewTheme
));
await
tester
.
tap
(
find
.
byIcon
(
Icons
.
search
));
await
tester
.
pumpAndSettle
();
// allow the animations to finish
...
...
packages/flutter/test/material/time_picker_theme_test.dart
View file @
38f318b4
...
...
@@ -404,7 +404,7 @@ void main() {
expect
(
confirmButtonStyle
.
toString
(),
equalsIgnoringHashCodes
(
TextButton
.
styleFrom
().
toString
()));
});
testWidgets
(
'Material2 - Passing no TimePickerThemeData uses defaults - input mode'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Material2 - Passing no TimePickerThemeData uses defaults - input mode'
,
(
WidgetTester
tester
)
async
{
final
ThemeData
defaultTheme
=
ThemeData
(
useMaterial3:
false
);
await
tester
.
pumpWidget
(
_TimePickerLauncher
(
themeData:
defaultTheme
,
entryMode:
TimePickerEntryMode
.
input
));
await
tester
.
tap
(
find
.
text
(
'X'
));
...
...
@@ -446,7 +446,7 @@ void main() {
expect
(
confirmButtonStyle
.
toString
(),
equalsIgnoringHashCodes
(
TextButton
.
styleFrom
().
toString
()));
});
testWidgets
(
'Material3 - Passing no TimePickerThemeData uses defaults - input mode'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Material3 - Passing no TimePickerThemeData uses defaults - input mode'
,
(
WidgetTester
tester
)
async
{
final
ThemeData
defaultTheme
=
ThemeData
(
useMaterial3:
true
);
await
tester
.
pumpWidget
(
_TimePickerLauncher
(
themeData:
defaultTheme
,
entryMode:
TimePickerEntryMode
.
input
));
await
tester
.
tap
(
find
.
text
(
'X'
));
...
...
@@ -737,7 +737,7 @@ void main() {
expect
(
confirmButtonStyle
.
toString
(),
equalsIgnoringHashCodes
(
timePickerTheme
.
confirmButtonStyle
.
toString
()));
});
testWidgets
(
'Time picker uses values from TimePickerThemeData with InputDecorationTheme - input mode'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Time picker uses values from TimePickerThemeData with InputDecorationTheme - input mode'
,
(
WidgetTester
tester
)
async
{
final
TimePickerThemeData
timePickerTheme
=
_timePickerTheme
(
includeInputDecoration:
true
);
final
ThemeData
theme
=
ThemeData
(
timePickerTheme:
timePickerTheme
);
await
tester
.
pumpWidget
(
_TimePickerLauncher
(
themeData:
theme
,
entryMode:
TimePickerEntryMode
.
input
));
...
...
@@ -754,7 +754,7 @@ void main() {
expect
(
hourDecoration
.
hintStyle
,
timePickerTheme
.
inputDecorationTheme
!.
hintStyle
);
});
testWidgets
(
'Time picker uses values from TimePickerThemeData without InputDecorationTheme - input mode'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Time picker uses values from TimePickerThemeData without InputDecorationTheme - input mode'
,
(
WidgetTester
tester
)
async
{
final
TimePickerThemeData
timePickerTheme
=
_timePickerTheme
();
final
ThemeData
theme
=
ThemeData
(
timePickerTheme:
timePickerTheme
);
await
tester
.
pumpWidget
(
_TimePickerLauncher
(
themeData:
theme
,
entryMode:
TimePickerEntryMode
.
input
));
...
...
packages/flutter/test/material/tooltip_test.dart
View file @
38f318b4
...
...
@@ -1480,16 +1480,18 @@ void main() {
semantics
.
dispose
();
});
testWidgets
(
'Tooltip semantics does not merge into child'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Tooltip semantics does not merge into child'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
final
GlobalKey
<
TooltipState
>
tooltipKey
=
GlobalKey
<
TooltipState
>();
late
final
OverlayEntry
entry
;
addTearDown
(()
=>
entry
..
remove
()..
dispose
());
await
tester
.
pumpWidget
(
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
Overlay
(
initialEntries:
<
OverlayEntry
>[
OverlayEntry
(
entry
=
OverlayEntry
(
builder:
(
BuildContext
context
)
{
return
ListView
(
children:
<
Widget
>[
...
...
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