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
debb3a5d
Unverified
Commit
debb3a5d
authored
Jul 09, 2020
by
Kate Lovett
Committed by
GitHub
Jul 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip Audit - Widgets Library (#60936)
parent
266aeb81
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
73 additions
and
113 deletions
+73
-113
actions_test.dart
packages/flutter/test/widgets/actions_test.dart
+1
-1
baseline_test.dart
packages/flutter/test/widgets/baseline_test.dart
+3
-3
basic_test.dart
packages/flutter/test/widgets/basic_test.dart
+3
-4
custom_painter_test.dart
packages/flutter/test/widgets/custom_painter_test.dart
+1
-1
draggable_scrollable_sheet_test.dart
...flutter/test/widgets/draggable_scrollable_sheet_test.dart
+8
-8
draggable_test.dart
packages/flutter/test/widgets/draggable_test.dart
+1
-1
editable_text_cursor_test.dart
packages/flutter/test/widgets/editable_text_cursor_test.dart
+6
-6
editable_text_test.dart
packages/flutter/test/widgets/editable_text_test.dart
+15
-15
ensure_visible_test.dart
packages/flutter/test/widgets/ensure_visible_test.dart
+1
-1
focus_traversal_test.dart
packages/flutter/test/widgets/focus_traversal_test.dart
+3
-4
image_filter_test.dart
packages/flutter/test/widgets/image_filter_test.dart
+1
-1
image_headers_test.dart
packages/flutter/test/widgets/image_headers_test.dart
+1
-1
image_test.dart
packages/flutter/test/widgets/image_test.dart
+5
-9
list_view_fling_test.dart
packages/flutter/test/widgets/list_view_fling_test.dart
+1
-1
navigator_test.dart
packages/flutter/test/widgets/navigator_test.dart
+1
-7
opacity_test.dart
packages/flutter/test/widgets/opacity_test.dart
+1
-1
scrollable_test.dart
packages/flutter/test/widgets/scrollable_test.dart
+7
-35
shader_mask_test.dart
packages/flutter/test/widgets/shader_mask_test.dart
+3
-3
text_test.dart
packages/flutter/test/widgets/text_test.dart
+8
-8
widget_inspector_test.dart
packages/flutter/test/widgets/widget_inspector_test.dart
+3
-3
No files found.
packages/flutter/test/widgets/actions_test.dart
View file @
debb3a5d
...
...
@@ -806,6 +806,6 @@ void main() {
expect
(
description
.
length
,
equals
(
2
));
expect
(
description
[
0
],
equalsIgnoringHashCodes
(
'dispatcher: ActionDispatcher#00000'
));
expect
(
description
[
1
],
equalsIgnoringHashCodes
(
'actions: {TestIntent: TestAction#00000}'
));
}
,
skip:
isBrowser
);
});
});
}
packages/flutter/test/widgets/baseline_test.dart
View file @
debb3a5d
...
...
@@ -21,7 +21,7 @@ void main() {
),
);
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
text
(
'X'
)).
size
,
const
Size
(
100.0
,
100.0
));
}
,
skip:
isBrowser
);
});
testWidgets
(
'Baseline - position test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -42,7 +42,7 @@ void main() {
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
text
(
'X'
)).
size
,
const
Size
(
100.0
,
100.0
));
expect
(
tester
.
renderObject
<
RenderBox
>(
find
.
byType
(
Baseline
)).
size
,
within
<
Size
>(
from:
const
Size
(
100.0
,
200.0
),
distance:
0.001
));
}
,
skip:
isBrowser
);
});
testWidgets
(
'Chip caches baseline'
,
(
WidgetTester
tester
)
async
{
int
calls
=
0
;
...
...
@@ -67,7 +67,7 @@ void main() {
tester
.
renderObject
<
RenderBaselineDetector
>(
find
.
byType
(
BaselineDetector
)).
dirty
();
await
tester
.
pump
();
expect
(
calls
,
2
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'ListTile caches baseline'
,
(
WidgetTester
tester
)
async
{
int
calls
=
0
;
...
...
packages/flutter/test/widgets/basic_test.dart
View file @
debb3a5d
...
...
@@ -55,7 +55,7 @@ void main() {
expect
(
tester
.
hitTestOnBinding
(
const
Offset
(
100.0
,
300.0
)),
hits
(
renderPhysicalShape
));
expect
(
tester
.
hitTestOnBinding
(
const
Offset
(
100.0
,
299.0
)),
doesNotHit
(
renderPhysicalShape
));
expect
(
tester
.
hitTestOnBinding
(
const
Offset
(
100.0
,
301.0
)),
doesNotHit
(
renderPhysicalShape
));
}
,
skip:
isBrowser
);
});
});
...
...
@@ -269,7 +269,7 @@ void main() {
tester
.
getTopLeft
(
find
.
byKey
(
key2
)).
dy
,
closeTo
(
aboveBaseline1
-
aboveBaseline2
,
.
001
),
);
}
,
skip:
isBrowser
);
});
});
test
(
'UnconstrainedBox toString'
,
()
{
...
...
@@ -397,8 +397,7 @@ void main() {
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'inconsequential_golden_file.png'
),
);
// TODO(Piinks): Remove skip once web goldens are supported, https://github.com/flutter/flutter/issues/40297
},
skip:
isBrowser
);
});
testWidgets
(
'IgnorePointer ignores pointers'
,
(
WidgetTester
tester
)
async
{
final
List
<
String
>
logs
=
<
String
>[];
...
...
packages/flutter/test/widgets/custom_painter_test.dart
View file @
debb3a5d
...
...
@@ -502,7 +502,7 @@ void _defineTests() {
);
expect
(
semantics
,
hasSemantics
(
expectedSemantics
,
ignoreRect:
true
,
ignoreTransform:
true
));
semantics
.
dispose
();
}
,
skip:
isBrowser
);
});
group
(
'diffing'
,
()
{
testWidgets
(
'complains about duplicate keys'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test/widgets/draggable_scrollable_sheet_test.dart
View file @
debb3a5d
...
...
@@ -107,7 +107,7 @@ void main() {
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 21'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 31'
),
findsOneWidget
);
},
skip:
isBrowser
,
variant:
TargetPlatformVariant
.
all
());
},
variant:
TargetPlatformVariant
.
all
());
testWidgets
(
'Can be dragged down when not full height'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
_boilerplate
(
null
));
...
...
@@ -120,7 +120,7 @@ void main() {
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 21'
),
findsNothing
);
expect
(
find
.
text
(
'Item 36'
),
findsNothing
);
},
skip:
isBrowser
,
variant:
TargetPlatformVariant
.
all
());
},
variant:
TargetPlatformVariant
.
all
());
testWidgets
(
'Can be dragged down when list is shorter than full height'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
_boilerplate
(
null
,
itemCount:
30
,
initialChildSize:
.
25
));
...
...
@@ -137,7 +137,7 @@ void main() {
await
tester
.
pumpAndSettle
();
expect
(
find
.
text
(
'Item 1'
).
hitTestable
(),
findsOneWidget
);
expect
(
find
.
text
(
'Item 29'
).
hitTestable
(),
findsNothing
);
},
skip:
isBrowser
,
variant:
TargetPlatformVariant
.
all
());
},
variant:
TargetPlatformVariant
.
all
());
testWidgets
(
'Can be dragged up and cover its container and scroll in single motion, and then dragged back down'
,
(
WidgetTester
tester
)
async
{
int
taps
=
0
;
...
...
@@ -166,7 +166,7 @@ void main() {
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 18'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 36'
),
findsNothing
);
},
skip:
isBrowser
,
variant:
TargetPlatformVariant
.
all
());
},
variant:
TargetPlatformVariant
.
all
());
testWidgets
(
'Can be flung up gently'
,
(
WidgetTester
tester
)
async
{
int
taps
=
0
;
...
...
@@ -189,7 +189,7 @@ void main() {
expect
(
find
.
text
(
'Item 21'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 36'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 70'
),
findsNothing
);
},
skip:
isBrowser
,
variant:
TargetPlatformVariant
.
all
());
},
variant:
TargetPlatformVariant
.
all
());
testWidgets
(
'Can be flung up'
,
(
WidgetTester
tester
)
async
{
int
taps
=
0
;
...
...
@@ -210,7 +210,7 @@ void main() {
expect
(
find
.
text
(
'Item 1'
),
findsNothing
);
expect
(
find
.
text
(
'Item 21'
),
findsNothing
);
expect
(
find
.
text
(
'Item 70'
),
findsOneWidget
);
},
skip:
isBrowser
,
variant:
TargetPlatformVariant
.
all
());
},
variant:
TargetPlatformVariant
.
all
());
testWidgets
(
'Can be flung down when not full height'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
_boilerplate
(
null
));
...
...
@@ -223,7 +223,7 @@ void main() {
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 21'
),
findsNothing
);
expect
(
find
.
text
(
'Item 36'
),
findsNothing
);
},
skip:
isBrowser
,
variant:
TargetPlatformVariant
.
all
());
},
variant:
TargetPlatformVariant
.
all
());
testWidgets
(
'Can be flung up and then back down'
,
(
WidgetTester
tester
)
async
{
int
taps
=
0
;
...
...
@@ -262,7 +262,7 @@ void main() {
expect
(
find
.
text
(
'Item 1'
),
findsOneWidget
);
expect
(
find
.
text
(
'Item 21'
),
findsNothing
);
expect
(
find
.
text
(
'Item 70'
),
findsNothing
);
},
skip:
isBrowser
,
variant:
TargetPlatformVariant
.
all
());
},
variant:
TargetPlatformVariant
.
all
());
debugDefaultTargetPlatformOverride
=
null
;
});
...
...
packages/flutter/test/widgets/draggable_test.dart
View file @
debb3a5d
...
...
@@ -2394,7 +2394,7 @@ void main() {
],
),
ignoreTransform:
true
,
ignoreRect:
true
));
semantics
.
dispose
();
}
,
skip:
isBrowser
);
});
}
Future
<
void
>
_testLongPressDraggableHapticFeedback
({
WidgetTester
tester
,
bool
hapticFeedbackOnStart
,
int
expectedHapticFeedbackCount
})
async
{
...
...
packages/flutter/test/widgets/editable_text_cursor_test.dart
View file @
debb3a5d
...
...
@@ -449,7 +449,7 @@ void main() {
await
tester
.
pumpAndSettle
();
expect
(
controller
.
selection
.
baseOffset
,
10
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'Updating the floating cursor correctly moves the cursor'
,
(
WidgetTester
tester
)
async
{
const
String
text
=
'hello world this is fun and cool and awesome!'
;
...
...
@@ -505,7 +505,7 @@ void main() {
await
tester
.
pumpAndSettle
();
// The cursor has been set.
expect
(
controller
.
selection
.
baseOffset
,
10
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'Updating the floating cursor can end without update'
,
(
WidgetTester
tester
)
async
{
const
String
text
=
'hello world this is fun and cool and awesome!'
;
...
...
@@ -549,7 +549,7 @@ void main() {
// The cursor did not change.
expect
(
controller
.
selection
.
baseOffset
,
29
);
expect
(
tester
.
takeException
(),
null
);
}
,
skip:
isBrowser
);
});
// Regression test for https://github.com/flutter/flutter/pull/30475.
testWidgets
(
'Trying to select with the floating cursor does not crash'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -615,7 +615,7 @@ void main() {
offset:
const
Offset
(-
250
,
20
)));
editableTextState
.
updateFloatingCursor
(
RawFloatingCursorPoint
(
state:
FloatingCursorDragState
.
End
));
await
tester
.
pumpAndSettle
();
}
,
skip:
isBrowser
);
});
testWidgets
(
'autofocus sets cursor to the end of text'
,
(
WidgetTester
tester
)
async
{
const
String
text
=
'hello world'
;
...
...
@@ -647,7 +647,7 @@ void main() {
expect
(
focusNode
.
hasFocus
,
true
);
expect
(
controller
.
selection
.
isCollapsed
,
true
);
expect
(
controller
.
selection
.
baseOffset
,
text
.
length
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'Floating cursor is painted'
,
(
WidgetTester
tester
)
async
{
final
TextEditingController
controller
=
TextEditingController
();
...
...
@@ -731,7 +731,7 @@ void main() {
editableTextState
.
updateFloatingCursor
(
RawFloatingCursorPoint
(
state:
FloatingCursorDragState
.
End
));
await
tester
.
pumpAndSettle
();
debugDefaultTargetPlatformOverride
=
null
;
},
skip:
isBrowser
,
variant:
const
TargetPlatformVariant
(<
TargetPlatform
>{
TargetPlatform
.
iOS
,
TargetPlatform
.
macOS
}));
},
variant:
const
TargetPlatformVariant
(<
TargetPlatform
>{
TargetPlatform
.
iOS
,
TargetPlatform
.
macOS
}));
testWidgets
(
'cursor layout'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
<
EditableTextState
>
editableTextKey
=
GlobalKey
<
EditableTextState
>();
...
...
packages/flutter/test/widgets/editable_text_test.dart
View file @
debb3a5d
...
...
@@ -164,7 +164,7 @@ void main() {
equals
(
'TextInputType.text'
));
expect
(
tester
.
testTextInput
.
setClientArgs
[
'inputAction'
],
equals
(
'TextInputAction.done'
));
}
,
skip:
isBrowser
);
});
testWidgets
(
'Keyboard is configured for "unspecified" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
...
...
@@ -196,7 +196,7 @@ void main() {
action:
TextInputAction
.
send
,
serializedActionName:
'TextInputAction.send'
,
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'Keyboard is configured for "go" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
...
...
@@ -220,7 +220,7 @@ void main() {
action:
TextInputAction
.
send
,
serializedActionName:
'TextInputAction.send'
,
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'Keyboard is configured for "next" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
...
...
@@ -228,7 +228,7 @@ void main() {
action:
TextInputAction
.
next
,
serializedActionName:
'TextInputAction.next'
,
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'Keyboard is configured for "previous" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
...
...
@@ -236,7 +236,7 @@ void main() {
action:
TextInputAction
.
previous
,
serializedActionName:
'TextInputAction.previous'
,
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'Keyboard is configured for "continue" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
...
...
@@ -244,7 +244,7 @@ void main() {
action:
TextInputAction
.
continueAction
,
serializedActionName:
'TextInputAction.continueAction'
,
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'Keyboard is configured for "join" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
...
...
@@ -252,7 +252,7 @@ void main() {
action:
TextInputAction
.
join
,
serializedActionName:
'TextInputAction.join'
,
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'Keyboard is configured for "route" action when explicitly requested'
,
(
WidgetTester
tester
)
async
{
await
_desiredKeyboardActionIsRequested
(
...
...
@@ -1120,7 +1120,7 @@ void main() {
expect
(
state
.
showToolbar
(),
true
);
await
tester
.
pumpAndSettle
();
expect
(
find
.
text
(
'Paste'
),
findsOneWidget
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'can show the toolbar after clearing all text'
,
(
WidgetTester
tester
)
async
{
// Regression test for https://github.com/flutter/flutter/issues/35998.
...
...
@@ -2146,7 +2146,7 @@ void main() {
expect
(
controller
.
selection
.
extentOffset
,
9
);
semantics
.
dispose
();
}
,
skip:
isBrowser
);
});
testWidgets
(
'can extend selection with a11y means - character'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
...
@@ -2246,7 +2246,7 @@ void main() {
expect
(
controller
.
selection
.
extentOffset
,
2
);
semantics
.
dispose
();
}
,
skip:
isBrowser
);
});
testWidgets
(
'can extend selection with a11y means - word'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
...
@@ -2347,7 +2347,7 @@ void main() {
expect
(
controller
.
selection
.
extentOffset
,
9
);
semantics
.
dispose
();
}
,
skip:
isBrowser
);
});
testWidgets
(
'password fields have correct semantics'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
...
@@ -3344,7 +3344,7 @@ void main() {
// at all. Again, both handles should be invisible.
scrollable
.
controller
.
jumpTo
(
0
);
await
verifyVisibility
(
HandlePositionInViewport
.
rightEdge
,
false
,
HandlePositionInViewport
.
rightEdge
,
false
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'text selection handle visibility RTL'
,
(
WidgetTester
tester
)
async
{
// Text with two separate words to select.
...
...
@@ -3403,7 +3403,7 @@ void main() {
expect
(
state
.
selectionOverlay
.
handlesAreVisible
,
isTrue
);
expect
(
controller
.
selection
.
base
.
offset
,
0
);
expect
(
controller
.
selection
.
extent
.
offset
,
5
);
}
,
skip:
isBrowser
);
});
const
String
testText
=
'Now is the time for
\n
'
'all good people
\n
'
...
...
@@ -4179,7 +4179,7 @@ void main() {
// at all. Again, both handles should be invisible.
scrollable
.
controller
.
jumpTo
(
0
);
await
verifyVisibility
(
HandlePositionInViewport
.
rightEdge
,
false
,
HandlePositionInViewport
.
rightEdge
,
false
);
},
skip:
isBrowser
,
variant:
const
TargetPlatformVariant
(<
TargetPlatform
>{
TargetPlatform
.
iOS
,
TargetPlatform
.
macOS
}));
},
variant:
const
TargetPlatformVariant
(<
TargetPlatform
>{
TargetPlatform
.
iOS
,
TargetPlatform
.
macOS
}));
testWidgets
(
"scrolling doesn't bounce"
,
(
WidgetTester
tester
)
async
{
// 3 lines of text, where the last line overflows and requires scrolling.
...
...
@@ -4229,7 +4229,7 @@ void main() {
await
tester
.
pump
();
expect
(
scrollable
.
controller
.
position
.
pixels
,
equals
(
14
));
expect
(
scrollable
.
controller
.
position
.
pixels
,
equals
(
renderEditable
.
maxScrollExtent
));
}
,
skip:
isBrowser
);
});
testWidgets
(
'bringIntoView brings the caret into view when in a viewport'
,
(
WidgetTester
tester
)
async
{
// Regression test for https://github.com/flutter/flutter/issues/55547.
...
...
packages/flutter/test/widgets/ensure_visible_test.dart
View file @
debb3a5d
...
...
@@ -428,7 +428,7 @@ void main() {
Scrollable
.
ensureVisible
(
findContext
(
2
));
await
tester
.
pump
();
expect
(
getOffset
(),
equals
(-
400.0
));
},
skip:
true
);
},
skip:
true
);
// https://github.com/flutter/flutter/issues/7919
testWidgets
(
'ListView ensureVisible rotated child'
,
(
WidgetTester
tester
)
async
{
BuildContext
findContext
(
int
i
)
=>
tester
.
element
(
findKey
(
i
));
...
...
packages/flutter/test/widgets/focus_traversal_test.dart
View file @
debb3a5d
...
...
@@ -6,7 +6,6 @@
import
'dart:ui'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -1683,7 +1682,7 @@ void main() {
expect
(
Focus
.
of
(
lowerLeftKey
.
currentContext
).
hasPrimaryFocus
,
isTrue
);
await
tester
.
sendKeyEvent
(
LogicalKeyboardKey
.
arrowUp
);
expect
(
Focus
.
of
(
upperLeftKey
.
currentContext
).
hasPrimaryFocus
,
isTrue
);
},
skip:
kIsWeb
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/35347
testWidgets
(
'Focus traversal inside a vertical scrollable scrolls to stay visible.'
,
(
WidgetTester
tester
)
async
{
final
List
<
int
>
items
=
List
<
int
>.
generate
(
11
,
(
int
index
)
=>
index
).
toList
();
...
...
@@ -1781,7 +1780,7 @@ void main() {
await
tester
.
pump
();
expect
(
topNode
.
hasPrimaryFocus
,
isTrue
);
expect
(
controller
.
offset
,
equals
(
0.0
));
},
skip:
kIsWeb
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/35347
testWidgets
(
'Focus traversal inside a horizontal scrollable scrolls to stay visible.'
,
(
WidgetTester
tester
)
async
{
final
List
<
int
>
items
=
List
<
int
>.
generate
(
11
,
(
int
index
)
=>
index
).
toList
();
...
...
@@ -1879,7 +1878,7 @@ void main() {
await
tester
.
pump
();
expect
(
leftNode
.
hasPrimaryFocus
,
isTrue
);
expect
(
controller
.
offset
,
equals
(
0.0
));
},
skip:
kIsWeb
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/35347
testWidgets
(
'Arrow focus traversal actions can be re-enabled for text fields.'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
upperLeftKey
=
GlobalKey
(
debugLabel:
'upperLeftKey'
);
...
...
packages/flutter/test/widgets/image_filter_test.dart
View file @
debb3a5d
...
...
@@ -62,7 +62,7 @@ void main() {
find
.
byType
(
ImageFiltered
),
matchesGoldenFile
(
'image_filter_matrix.png'
),
);
},
skip:
isBrowser
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/45213
testWidgets
(
'Image filter - reuses its layer'
,
(
WidgetTester
tester
)
async
{
Future
<
void
>
pumpWithSigma
(
double
sigma
)
async
{
...
...
packages/flutter/test/widgets/image_headers_test.dart
View file @
debb3a5d
...
...
@@ -43,7 +43,7 @@ void main() {
});
return
client
;
});
},
skip:
isBrowser
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/57187
}
class
MockHttpClient
extends
Mock
implements
HttpClient
{}
...
...
packages/flutter/test/widgets/image_test.dart
View file @
debb3a5d
...
...
@@ -1213,7 +1213,7 @@ void main() {
expect
(
chunkEvents
.
length
,
4
);
expect
(
find
.
byType
(
Text
),
findsNothing
);
expect
(
find
.
byType
(
RawImage
),
findsOneWidget
);
}
,
skip:
isBrowser
);
});
testWidgets
(
"Image doesn't rebuild on chunk events if loadingBuilder is null"
,
(
WidgetTester
tester
)
async
{
final
ui
.
Image
image
=
await
tester
.
runAsync
(
createTestImage
);
...
...
@@ -1266,7 +1266,7 @@ void main() {
expect
(
find
.
byType
(
RawImage
),
findsOneWidget
);
expect
(
tester
.
widget
<
Center
>(
find
.
byType
(
Center
)).
child
,
isA
<
Padding
>());
expect
(
tester
.
widget
<
Padding
>(
find
.
byType
(
Padding
)).
child
,
isA
<
RawImage
>());
}
,
skip:
isBrowser
);
});
testWidgets
(
'Image state handles loadingBuilder update from null to non-null'
,
(
WidgetTester
tester
)
async
{
final
TestImageStreamCompleter
streamCompleter
=
TestImageStreamCompleter
();
...
...
@@ -1298,7 +1298,7 @@ void main() {
await
tester
.
pump
();
expect
(
find
.
byType
(
Center
),
findsOneWidget
);
expect
(
find
.
byType
(
RawImage
),
findsOneWidget
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'Image state handles loadingBuilder update from non-null to null'
,
(
WidgetTester
tester
)
async
{
final
TestImageStreamCompleter
streamCompleter
=
TestImageStreamCompleter
();
...
...
@@ -1331,7 +1331,7 @@ void main() {
expect
(
tester
.
state
(
find
.
byType
(
Image
)),
same
(
state
));
streamCompleter
.
setData
(
chunkEvent:
const
ImageChunkEvent
(
cumulativeBytesLoaded:
10
,
expectedTotalBytes:
100
));
expect
(
tester
.
binding
.
hasScheduledFrame
,
isFalse
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'Verify Image resets its ImageListeners'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
key
=
GlobalKey
();
...
...
@@ -1725,11 +1725,7 @@ void main() {
await
_testRotatedImage
(
tester
,
true
);
await
_testRotatedImage
(
tester
,
false
);
},
// TODO(hterkelson): figure out why web timed out with `await precacheImage`
// so we can enable this test on web.
//
// See https://github.com/flutter/flutter/issues/54292.
skip:
kIsWeb
,
skip:
kIsWeb
,
// https://github.com/flutter/flutter/issues/54292.
);
testWidgets
(
'Reports image size when painted'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test/widgets/list_view_fling_test.dart
View file @
debb3a5d
...
...
@@ -34,5 +34,5 @@ void main() {
await
tester
.
pump
(
const
Duration
(
milliseconds:
20
));
expect
(
getCurrentOffset
(),
greaterThan
(
lastOffset
));
}
},
skip:
true
);
//
see
https://github.com/flutter/flutter/issues/5339
},
skip:
true
);
// https://github.com/flutter/flutter/issues/5339
}
packages/flutter/test/widgets/navigator_test.dart
View file @
debb3a5d
...
...
@@ -314,13 +314,7 @@ void main() {
expect
(
log
,
equals
(<
String
>[
'left'
]));
await
gesture
.
up
();
expect
(
log
,
equals
(<
String
>[
'left'
]));
// This test doesn't work because it relies on part of the pointer event
// dispatching mechanism that is mocked out in testing. We should use the real
// mechanism even during testing and enable this test.
// TODO(abarth): Test more of the real code and enable this test.
// See https://github.com/flutter/flutter/issues/4771.
},
skip:
true
);
},
skip:
true
);
// https://github.com/flutter/flutter/issues/4771
testWidgets
(
'popAndPushNamed'
,
(
WidgetTester
tester
)
async
{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
...
...
packages/flutter/test/widgets/opacity_test.dart
View file @
debb3a5d
...
...
@@ -193,5 +193,5 @@ void main() {
// empty opacity layer is sent.
final
OffsetLayer
offsetLayer
=
element
.
renderObject
.
debugLayer
as
OffsetLayer
;
await
offsetLayer
.
toImage
(
const
Rect
.
fromLTRB
(
0.0
,
0.0
,
1.0
,
1.0
));
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/
52856
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/
42767
}
packages/flutter/test/widgets/scrollable_test.dart
View file @
debb3a5d
...
...
@@ -389,11 +389,7 @@ void main() {
await
tester
.
pumpAndSettle
();
expect
(
controller
.
position
.
pixels
,
equals
(
0.0
));
expect
(
tester
.
getRect
(
find
.
byKey
(
const
ValueKey
<
String
>(
'Box 0'
),
skipOffstage:
false
)),
equals
(
const
Rect
.
fromLTRB
(
0.0
,
0.0
,
800.0
,
50.0
)));
// TODO(gspencergoog): Once we can test against TargetPlatform.macOS instead
// of Platform.isMacOS, don't skip this on web anymore.
// https://github.com/flutter/flutter/issues/31366
},
skip:
kIsWeb
);
});
testWidgets
(
'Vertical scrollables are scrolled when activated via keyboard.'
,
(
WidgetTester
tester
)
async
{
final
ScrollController
controller
=
ScrollController
();
...
...
@@ -438,11 +434,7 @@ void main() {
await
tester
.
sendKeyEvent
(
LogicalKeyboardKey
.
pageUp
);
await
tester
.
pumpAndSettle
();
expect
(
tester
.
getRect
(
find
.
byKey
(
const
ValueKey
<
String
>(
'Box 0'
),
skipOffstage:
false
)),
equals
(
const
Rect
.
fromLTRB
(
0.0
,
0.0
,
800.0
,
50.0
)));
// TODO(gspencergoog): Once we can test against TargetPlatform.macOS instead
// of Platform.isMacOS, don't skip this on web anymore.
// https://github.com/flutter/flutter/issues/31366
},
skip:
kIsWeb
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/43694
testWidgets
(
'Horizontal scrollables are scrolled when activated via keyboard.'
,
(
WidgetTester
tester
)
async
{
final
ScrollController
controller
=
ScrollController
();
...
...
@@ -482,11 +474,7 @@ void main() {
await
tester
.
sendKeyUpEvent
(
modifierKey
);
await
tester
.
pumpAndSettle
();
expect
(
tester
.
getRect
(
find
.
byKey
(
const
ValueKey
<
String
>(
'Box 0'
),
skipOffstage:
false
)),
equals
(
const
Rect
.
fromLTRB
(
0.0
,
0.0
,
50.0
,
600.0
)));
// TODO(gspencergoog): Once we can test against TargetPlatform.macOS instead
// of Platform.isMacOS, don't skip this on web anymore.
// https://github.com/flutter/flutter/issues/31366
},
skip:
kIsWeb
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/43694
testWidgets
(
'Horizontal scrollables are scrolled the correct direction in RTL locales.'
,
(
WidgetTester
tester
)
async
{
final
ScrollController
controller
=
ScrollController
();
...
...
@@ -529,11 +517,7 @@ void main() {
await
tester
.
sendKeyUpEvent
(
modifierKey
);
await
tester
.
pumpAndSettle
();
expect
(
tester
.
getRect
(
find
.
byKey
(
const
ValueKey
<
String
>(
'Box 0'
),
skipOffstage:
false
)),
equals
(
const
Rect
.
fromLTRB
(
750.0
,
0.0
,
800.0
,
600.0
)));
// TODO(gspencergoog): Once we can test against TargetPlatform.macOS instead
// of Platform.isMacOS, don't skip this on web anymore.
// https://github.com/flutter/flutter/issues/31366
},
skip:
kIsWeb
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/43694
testWidgets
(
'Reversed vertical scrollables are scrolled when activated via keyboard.'
,
(
WidgetTester
tester
)
async
{
final
ScrollController
controller
=
ScrollController
();
...
...
@@ -581,11 +565,7 @@ void main() {
await
tester
.
sendKeyEvent
(
LogicalKeyboardKey
.
pageDown
);
await
tester
.
pumpAndSettle
();
expect
(
tester
.
getRect
(
find
.
byKey
(
const
ValueKey
<
String
>(
'Box 0'
),
skipOffstage:
false
)),
equals
(
const
Rect
.
fromLTRB
(
0.0
,
550.0
,
800.0
,
600.0
)));
// TODO(gspencergoog): Once we can test against TargetPlatform.macOS instead
// of Platform.isMacOS, don't skip this on web anymore.
// https://github.com/flutter/flutter/issues/31366
},
skip:
kIsWeb
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/43694
testWidgets
(
'Reversed horizontal scrollables are scrolled when activated via keyboard.'
,
(
WidgetTester
tester
)
async
{
final
ScrollController
controller
=
ScrollController
();
...
...
@@ -627,11 +607,7 @@ void main() {
await
tester
.
sendKeyEvent
(
LogicalKeyboardKey
.
arrowRight
);
await
tester
.
sendKeyUpEvent
(
modifierKey
);
await
tester
.
pumpAndSettle
();
// TODO(gspencergoog): Once we can test against TargetPlatform.macOS instead
// of Platform.isMacOS, don't skip this on web anymore.
// https://github.com/flutter/flutter/issues/31366
},
skip:
kIsWeb
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/43694
testWidgets
(
'Custom scrollables with a center sliver are scrolled when activated via keyboard.'
,
(
WidgetTester
tester
)
async
{
final
ScrollController
controller
=
ScrollController
();
...
...
@@ -685,11 +661,7 @@ void main() {
// Goes up two past "center" where it started, so negative.
expect
(
controller
.
position
.
pixels
,
equals
(-
100.0
));
expect
(
tester
.
getRect
(
find
.
byKey
(
const
ValueKey
<
String
>(
'Item 10'
),
skipOffstage:
false
)),
equals
(
const
Rect
.
fromLTRB
(
0.0
,
100.0
,
800.0
,
200.0
)));
// TODO(gspencergoog): Once we can test against TargetPlatform.macOS instead
// of Platform.isMacOS, don't skip this on web anymore.
// https://github.com/flutter/flutter/issues/31366
},
skip:
kIsWeb
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/43694
testWidgets
(
'Can recommendDeferredLoadingForContext - animation'
,
(
WidgetTester
tester
)
async
{
final
List
<
String
>
widgetTracker
=
<
String
>[];
...
...
packages/flutter/test/widgets/shader_mask_test.dart
View file @
debb3a5d
...
...
@@ -23,7 +23,7 @@ void main() {
testWidgets
(
'Can be constructed'
,
(
WidgetTester
tester
)
async
{
const
Widget
child
=
SizedBox
(
width:
100.0
,
height:
100.0
);
await
tester
.
pumpWidget
(
const
ShaderMask
(
child:
child
,
shaderCallback:
createShader
));
},
skip:
isBrowser
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/44152
testWidgets
(
'Bounds rect includes offset'
,
(
WidgetTester
tester
)
async
{
Rect
shaderBounds
;
...
...
@@ -47,7 +47,7 @@ void main() {
// The shader bounds rectangle should reflect the position of the centered SizedBox.
expect
(
shaderBounds
,
equals
(
const
Rect
.
fromLTWH
(
0.0
,
0.0
,
400.0
,
400.0
)));
},
skip:
isBrowser
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/44152
testWidgets
(
'Bounds rect includes offset visual inspection'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -110,5 +110,5 @@ void main() {
find
.
byType
(
RepaintBoundary
),
matchesGoldenFile
(
'shader_mask.bounds.matches_top_left.png'
),
);
},
skip:
isBrowser
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/44152
}
packages/flutter/test/widgets/text_test.dart
View file @
debb3a5d
...
...
@@ -161,7 +161,7 @@ void main() {
),
);
expect
(
tester
.
takeException
(),
null
);
},
skip:
isBrowser
);
//
TODO(yjbanov):
https://github.com/flutter/flutter/issues/42086
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/42086
testWidgets
(
'inline widgets works with textScaleFactor'
,
(
WidgetTester
tester
)
async
{
// Regression test for https://github.com/flutter/flutter/issues/59316
...
...
@@ -225,7 +225,7 @@ void main() {
renderText
=
tester
.
renderObject
(
find
.
byKey
(
key
));
// The RichText in the widget span should wrap into three lines.
expect
(
renderText
.
size
.
height
,
singleLineHeight
*
textScaleFactor
*
3
);
},
skip:
isBrowser
);
//
TODO(yjbanov):
https://github.com/flutter/flutter/issues/42086
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/42086
testWidgets
(
'semanticsLabel can override text label'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
...
@@ -556,7 +556,7 @@ void main() {
),
);
semantics
.
dispose
();
},
skip:
true
);
//
TODO(jonahwilliams): correct once https://github.com/flutter/flutter/issues/20891 is resolved.
},
skip:
true
);
//
https://github.com/flutter/flutter/issues/20891
testWidgets
(
'TapGesture recognizers contribute link semantics'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
...
@@ -670,7 +670,7 @@ void main() {
),
);
semantics
.
dispose
();
},
skip:
isBrowser
);
//
TODO(yjbanov):
https://github.com/flutter/flutter/issues/42086
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/42086
testWidgets
(
'inline widgets semantic nodes scale'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
...
@@ -750,7 +750,7 @@ void main() {
),
);
semantics
.
dispose
();
},
skip:
isBrowser
);
//
TODO(yjbanov):
https://github.com/flutter/flutter/issues/42086
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/42086
testWidgets
(
'Overflow is clipping correctly - short text with overflow: clip'
,
(
WidgetTester
tester
)
async
{
await
_pumpTextWidget
(
...
...
@@ -773,7 +773,7 @@ void main() {
find
.
byType
(
Text
),
paints
..
clipRect
(
rect:
const
Rect
.
fromLTWH
(
0
,
0
,
50
,
50
)),
);
},
skip:
isBrowser
);
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/33523
testWidgets
(
'Overflow is clipping correctly - short text with overflow: ellipsis'
,
(
WidgetTester
tester
)
async
{
await
_pumpTextWidget
(
...
...
@@ -864,7 +864,7 @@ void main() {
final
Size
textSizeLongestLine
=
tester
.
getSize
(
find
.
byType
(
Text
));
expect
(
textSizeLongestLine
.
width
,
equals
(
630.0
));
expect
(
textSizeLongestLine
.
height
,
equals
(
fontHeight
*
2
));
},
skip:
isBrowser
);
//
TODO(yjbanov):
https://github.com/flutter/flutter/issues/44020
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/44020
testWidgets
(
'textWidthBasis with textAlign still obeys parent alignment'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -914,7 +914,7 @@ void main() {
expect
(
tester
.
getSize
(
find
.
text
(
'RIGHT ALIGNED, PARENT'
)).
width
,
lessThan
(
width
));
expect
(
tester
.
getSize
(
find
.
text
(
'LEFT ALIGNED, LONGEST LINE'
)).
width
,
lessThan
(
width
));
expect
(
tester
.
getSize
(
find
.
text
(
'RIGHT ALIGNED, LONGEST LINE'
)).
width
,
equals
(
width
));
},
skip:
isBrowser
);
//
TODO(yjbanov):
https://github.com/flutter/flutter/issues/44020
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/44020
testWidgets
(
'Paragraph.getBoxesForRange returns nothing when selection range is zero length'
,
(
WidgetTester
tester
)
async
{
final
ui
.
ParagraphBuilder
builder
=
ui
.
ParagraphBuilder
(
ui
.
ParagraphStyle
());
...
...
packages/flutter/test/widgets/widget_inspector_test.dart
View file @
debb3a5d
...
...
@@ -2224,7 +2224,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
),
matchesGoldenFile
(
'inspector.sizedBox_debugPaint_margin.png'
),
);
}
,
skip:
isBrowser
);
});
test
(
'ext.flutter.inspector.structuredErrors'
,
()
async
{
List
<
Map
<
Object
,
Object
>>
flutterErrorEvents
=
service
.
getEventsDispatched
(
'Flutter.Error'
);
...
...
@@ -2398,7 +2398,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
),
matchesGoldenFile
(
'inspector.composited_transform.only_offsets_target.png'
),
);
}
,
skip:
isBrowser
);
});
testWidgets
(
'Screenshot composited transforms - with rotations'
,
(
WidgetTester
tester
)
async
{
final
LayerLink
link
=
LayerLink
();
...
...
@@ -2504,7 +2504,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
expect
(
identical
(
key2
.
currentContext
.
findRenderObject
(),
box2
),
isTrue
);
expect
(
box1
.
localToGlobal
(
Offset
.
zero
),
equals
(
position1
));
expect
(
box2
.
localToGlobal
(
Offset
.
zero
),
equals
(
position2
));
}
,
skip:
isBrowser
);
});
testWidgets
(
'getChildrenDetailsSubtree'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
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