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
555cb66e
Unverified
Commit
555cb66e
authored
Oct 06, 2020
by
Alexandre Ardhuin
Committed by
GitHub
Oct 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tree (#67410)
parent
f5511784
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
20 deletions
+20
-20
action_sheet_test.dart
packages/flutter/test/cupertino/action_sheet_test.dart
+7
-7
button_test.dart
packages/flutter/test/cupertino/button_test.dart
+4
-4
context_menu_action_test.dart
...ages/flutter/test/cupertino/context_menu_action_test.dart
+1
-1
dialog_test.dart
packages/flutter/test/cupertino/dialog_test.dart
+7
-7
nav_bar_test.dart
packages/flutter/test/cupertino/nav_bar_test.dart
+1
-1
No files found.
packages/flutter/test/cupertino/action_sheet_test.dart
View file @
555cb66e
...
...
@@ -61,7 +61,7 @@ void main() {
final
DefaultTextStyle
widget
=
tester
.
widget
(
find
.
widgetWithText
(
DefaultTextStyle
,
'Ok'
));
expect
(
widget
.
style
!
.
color
,
const
CupertinoDynamicColor
.
withBrightnessAndContrast
(
expect
(
widget
.
style
.
color
,
const
CupertinoDynamicColor
.
withBrightnessAndContrast
(
color:
Color
.
fromARGB
(
255
,
255
,
59
,
48
),
darkColor:
Color
.
fromARGB
(
255
,
255
,
69
,
58
),
highContrastColor:
Color
.
fromARGB
(
255
,
215
,
0
,
21
),
...
...
@@ -84,7 +84,7 @@ void main() {
of:
find
.
widgetWithText
(
CupertinoActionSheetAction
,
text
),
matching:
find
.
byType
(
DefaultTextStyle
),
),
).
style
!
;
).
style
;
}
await
tester
.
pumpWidget
(
...
...
@@ -139,7 +139,7 @@ void main() {
final
DefaultTextStyle
widget
=
tester
.
widget
(
find
.
widgetWithText
(
DefaultTextStyle
,
'Ok'
));
expect
(
widget
.
style
!
.
fontWeight
,
equals
(
FontWeight
.
w600
));
expect
(
widget
.
style
.
fontWeight
,
equals
(
FontWeight
.
w600
));
});
testWidgets
(
'Action sheet text styles are correct when both title and message are included'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -160,8 +160,8 @@ void main() {
final
DefaultTextStyle
messageStyle
=
tester
.
firstWidget
(
find
.
widgetWithText
(
DefaultTextStyle
,
'An action sheet'
));
expect
(
titleStyle
.
style
!
.
fontWeight
,
FontWeight
.
w600
);
expect
(
messageStyle
.
style
!
.
fontWeight
,
FontWeight
.
w400
);
expect
(
titleStyle
.
style
.
fontWeight
,
FontWeight
.
w600
);
expect
(
messageStyle
.
style
.
fontWeight
,
FontWeight
.
w400
);
});
testWidgets
(
'Action sheet text styles are correct when title but no message is included'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -179,7 +179,7 @@ void main() {
final
DefaultTextStyle
titleStyle
=
tester
.
firstWidget
(
find
.
widgetWithText
(
DefaultTextStyle
,
'Action Sheet'
));
expect
(
titleStyle
.
style
!
.
fontWeight
,
FontWeight
.
w400
);
expect
(
titleStyle
.
style
.
fontWeight
,
FontWeight
.
w400
);
});
testWidgets
(
'Action sheet text styles are correct when message but no title is included'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -197,7 +197,7 @@ void main() {
final
DefaultTextStyle
messageStyle
=
tester
.
firstWidget
(
find
.
widgetWithText
(
DefaultTextStyle
,
'An action sheet'
));
expect
(
messageStyle
.
style
!
.
fontWeight
,
FontWeight
.
w600
);
expect
(
messageStyle
.
style
.
fontWeight
,
FontWeight
.
w600
);
});
testWidgets
(
'Content section but no actions'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test/cupertino/button_test.dart
View file @
555cb66e
...
...
@@ -323,7 +323,7 @@ void main() {
home:
CupertinoButton
(
onPressed:
()
{
},
child:
Builder
(
builder:
(
BuildContext
context
)
{
textStyle
=
DefaultTextStyle
.
of
(
context
).
style
!
;
textStyle
=
DefaultTextStyle
.
of
(
context
).
style
;
return
const
Placeholder
();
}),
),
...
...
@@ -337,7 +337,7 @@ void main() {
home:
CupertinoButton
.
filled
(
onPressed:
()
{
},
child:
Builder
(
builder:
(
BuildContext
context
)
{
textStyle
=
DefaultTextStyle
.
of
(
context
).
style
!
;
textStyle
=
DefaultTextStyle
.
of
(
context
).
style
;
return
const
Placeholder
();
}),
),
...
...
@@ -359,7 +359,7 @@ void main() {
home:
CupertinoButton
(
onPressed:
()
{
},
child:
Builder
(
builder:
(
BuildContext
context
)
{
textStyle
=
DefaultTextStyle
.
of
(
context
).
style
!
;
textStyle
=
DefaultTextStyle
.
of
(
context
).
style
;
return
const
Placeholder
();
}),
),
...
...
@@ -373,7 +373,7 @@ void main() {
home:
CupertinoButton
.
filled
(
onPressed:
()
{
},
child:
Builder
(
builder:
(
BuildContext
context
)
{
textStyle
=
DefaultTextStyle
.
of
(
context
).
style
!
;
textStyle
=
DefaultTextStyle
.
of
(
context
).
style
;
return
const
Placeholder
();
}),
),
...
...
packages/flutter/test/cupertino/context_menu_action_test.dart
View file @
555cb66e
...
...
@@ -50,7 +50,7 @@ void main() {
);
expect
(
finder
,
findsOneWidget
);
final
DefaultTextStyle
defaultStyle
=
tester
.
widget
(
finder
);
return
defaultStyle
.
style
!
;
return
defaultStyle
.
style
;
}
Icon
_getIcon
(
WidgetTester
tester
)
{
...
...
packages/flutter/test/cupertino/dialog_test.dart
View file @
555cb66e
...
...
@@ -116,7 +116,7 @@ void main() {
final
DefaultTextStyle
widget
=
tester
.
widget
(
find
.
byType
(
DefaultTextStyle
));
expect
(
widget
.
style
!
.
color
!.
withAlpha
(
255
),
CupertinoColors
.
systemRed
.
color
);
expect
(
widget
.
style
.
color
!.
withAlpha
(
255
),
CupertinoColors
.
systemRed
.
color
);
});
testWidgets
(
'Dialog dark theme'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -231,7 +231,7 @@ void main() {
final
DefaultTextStyle
widget
=
tester
.
widget
(
find
.
byType
(
DefaultTextStyle
));
expect
(
widget
.
style
!
.
fontWeight
,
equals
(
FontWeight
.
w600
));
expect
(
widget
.
style
.
fontWeight
,
equals
(
FontWeight
.
w600
));
});
testWidgets
(
'Dialog default and destructive action styles'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -243,8 +243,8 @@ void main() {
final
DefaultTextStyle
widget
=
tester
.
widget
(
find
.
byType
(
DefaultTextStyle
));
expect
(
widget
.
style
!
.
color
!.
withAlpha
(
255
),
CupertinoColors
.
systemRed
.
color
);
expect
(
widget
.
style
!
.
fontWeight
,
equals
(
FontWeight
.
w600
));
expect
(
widget
.
style
.
color
!.
withAlpha
(
255
),
CupertinoColors
.
systemRed
.
color
);
expect
(
widget
.
style
.
fontWeight
,
equals
(
FontWeight
.
w600
));
});
testWidgets
(
'Dialog disabled action style'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -254,8 +254,8 @@ void main() {
final
DefaultTextStyle
widget
=
tester
.
widget
(
find
.
byType
(
DefaultTextStyle
));
expect
(
widget
.
style
!
.
color
!.
opacity
,
greaterThanOrEqualTo
(
127
/
255
));
expect
(
widget
.
style
!
.
color
!.
opacity
,
lessThanOrEqualTo
(
128
/
255
));
expect
(
widget
.
style
.
color
!.
opacity
,
greaterThanOrEqualTo
(
127
/
255
));
expect
(
widget
.
style
.
color
!.
opacity
,
lessThanOrEqualTo
(
128
/
255
));
});
testWidgets
(
'Dialog enabled action style'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -266,7 +266,7 @@ void main() {
final
DefaultTextStyle
widget
=
tester
.
widget
(
find
.
byType
(
DefaultTextStyle
));
expect
(
widget
.
style
!
.
color
!.
opacity
,
equals
(
1.0
));
expect
(
widget
.
style
.
color
!.
opacity
,
equals
(
1.0
));
});
testWidgets
(
'Message is scrollable, has correct padding with large text sizes'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test/cupertino/nav_bar_test.dart
View file @
555cb66e
...
...
@@ -1198,7 +1198,7 @@ class _ExpectStyles extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
final
TextStyle
style
=
DefaultTextStyle
.
of
(
context
).
style
!
;
final
TextStyle
style
=
DefaultTextStyle
.
of
(
context
).
style
;
expect
(
style
.
color
,
isSameColorAs
(
color
));
expect
(
style
.
fontFamily
,
'.SF Pro Text'
);
expect
(
style
.
fontSize
,
17.0
);
...
...
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