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
0a130100
Unverified
Commit
0a130100
authored
Oct 14, 2020
by
Yash Johri
Committed by
GitHub
Oct 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tests (#67083)
parent
83e99f75
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
24 deletions
+21
-24
text_field_test.dart
packages/flutter/test/material/text_field_test.dart
+5
-5
theme_data_test.dart
packages/flutter/test/material/theme_data_test.dart
+9
-11
text_formatter_test.dart
packages/flutter/test/services/text_formatter_test.dart
+7
-7
stack_test.dart
packages/flutter/test/widgets/stack_test.dart
+0
-1
No files found.
packages/flutter/test/material/text_field_test.dart
View file @
0a130100
...
...
@@ -3201,7 +3201,7 @@ void main() {
controller:
textController
,
decoration:
null
,
inputFormatters:
<
TextInputFormatter
>
[
BlacklistingTextInputFormatter
(
FilteringTextInputFormatter
.
deny
(
RegExp
(
r'[a-z]'
),
replacementString:
'#'
,
),
...
...
@@ -3250,11 +3250,11 @@ void main() {
decoration:
null
,
maxLines:
2
,
inputFormatters:
<
TextInputFormatter
>
[
BlacklistingTextInputFormatter
(
FilteringTextInputFormatter
.
deny
(
RegExp
(
r'[a-z]'
),
replacementString:
'12
\n
'
,
),
WhitelistingTextInputFormatter
(
RegExp
(
r'\n[0-9]'
)),
FilteringTextInputFormatter
.
allow
(
RegExp
(
r'\n[0-9]'
)),
],
),
));
...
...
@@ -3315,7 +3315,7 @@ void main() {
controller:
textController
,
decoration:
null
,
inputFormatters:
<
TextInputFormatter
>
[
Whitelist
ingTextInputFormatter
.
digitsOnly
,
Filter
ingTextInputFormatter
.
digitsOnly
,
],
),
),
...
...
@@ -3635,7 +3635,7 @@ void main() {
controller:
textController
,
maxLength:
10
,
inputFormatters:
<
TextInputFormatter
>
[
BlacklistingTextInputFormatter
(
FilteringTextInputFormatter
.
deny
(
RegExp
(
r'[a-z]'
),
replacementString:
'#'
,
),
...
...
packages/flutter/test/material/theme_data_test.dart
View file @
0a130100
...
...
@@ -153,7 +153,7 @@ void main() {
});
test
(
'cursorColor'
,
()
{
expect
(
ThemeData
(
cursorColor:
Colors
.
red
).
cursorColor
,
Colors
.
red
);
expect
(
const
TextSelection
ThemeData
(
cursorColor:
Colors
.
red
).
cursorColor
,
Colors
.
red
);
});
testWidgets
(
'ThemeData.from a light color scheme sets appropriate values'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -430,9 +430,9 @@ void main() {
toggleButtonsTheme:
otherTheme
.
toggleButtonsTheme
,
buttonColor:
otherTheme
.
buttonColor
,
secondaryHeaderColor:
otherTheme
.
secondaryHeaderColor
,
textSelectionColor:
otherTheme
.
textSelectionColor
,
cursorColor:
otherTheme
.
cursorColor
,
textSelectionHandleColor:
otherTheme
.
textSelectionHandleColor
,
textSelectionColor:
otherTheme
.
textSelection
Theme
.
selection
Color
,
cursorColor:
otherTheme
.
textSelectionTheme
.
cursorColor
,
textSelectionHandleColor:
otherTheme
.
textSelection
Theme
.
selection
HandleColor
,
backgroundColor:
otherTheme
.
backgroundColor
,
dialogBackgroundColor:
otherTheme
.
dialogBackgroundColor
,
indicatorColor:
otherTheme
.
indicatorColor
,
...
...
@@ -476,7 +476,6 @@ void main() {
outlinedButtonTheme:
otherTheme
.
outlinedButtonTheme
,
textSelectionTheme:
otherTheme
.
textSelectionTheme
,
fixTextFieldOutlineLabel:
otherTheme
.
fixTextFieldOutlineLabel
,
useTextSelectionTheme:
otherTheme
.
useTextSelectionTheme
,
);
expect
(
themeDataCopy
.
brightness
,
equals
(
otherTheme
.
brightness
));
...
...
@@ -505,11 +504,11 @@ void main() {
expect
(
themeDataCopy
.
toggleButtonsTheme
,
equals
(
otherTheme
.
toggleButtonsTheme
));
expect
(
themeDataCopy
.
buttonColor
,
equals
(
otherTheme
.
buttonColor
));
expect
(
themeDataCopy
.
secondaryHeaderColor
,
equals
(
otherTheme
.
secondaryHeaderColor
));
expect
(
themeDataCopy
.
textSelection
Color
,
equals
(
otherTheme
.
textS
electionColor
));
expect
(
themeDataCopy
.
cursorColor
,
equals
(
other
Theme
.
cursorColor
));
expect
(
themeDataCopy
.
textSelection
Color
,
equals
(
otherTheme
.
textS
electionColor
));
expect
(
themeDataCopy
.
cursorColor
,
equals
(
other
Theme
.
cursorColor
));
expect
(
themeDataCopy
.
textSelection
HandleColor
,
equals
(
otherTheme
.
textS
electionHandleColor
));
expect
(
themeDataCopy
.
textSelection
Theme
.
selectionColor
,
equals
(
otherTheme
.
textSelectionTheme
.
s
electionColor
));
expect
(
themeDataCopy
.
textSelectionTheme
.
cursorColor
,
equals
(
otherTheme
.
textSelection
Theme
.
cursorColor
));
expect
(
themeDataCopy
.
textSelection
Theme
.
selectionColor
,
equals
(
otherTheme
.
textSelectionTheme
.
s
electionColor
));
expect
(
themeDataCopy
.
textSelectionTheme
.
cursorColor
,
equals
(
otherTheme
.
textSelection
Theme
.
cursorColor
));
expect
(
themeDataCopy
.
textSelection
Theme
.
selectionHandleColor
,
equals
(
otherTheme
.
textSelectionTheme
.
s
electionHandleColor
));
expect
(
themeDataCopy
.
backgroundColor
,
equals
(
otherTheme
.
backgroundColor
));
expect
(
themeDataCopy
.
dialogBackgroundColor
,
equals
(
otherTheme
.
dialogBackgroundColor
));
expect
(
themeDataCopy
.
indicatorColor
,
equals
(
otherTheme
.
indicatorColor
));
...
...
@@ -549,7 +548,6 @@ void main() {
expect
(
themeDataCopy
.
outlinedButtonTheme
,
equals
(
otherTheme
.
outlinedButtonTheme
));
expect
(
themeDataCopy
.
textSelectionTheme
,
equals
(
otherTheme
.
textSelectionTheme
));
expect
(
themeDataCopy
.
fixTextFieldOutlineLabel
,
equals
(
otherTheme
.
fixTextFieldOutlineLabel
));
expect
(
themeDataCopy
.
useTextSelectionTheme
,
equals
(
otherTheme
.
useTextSelectionTheme
));
});
testWidgets
(
'ThemeData.toString has less than 200 characters output'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test/services/text_formatter_test.dart
View file @
0a130100
...
...
@@ -101,7 +101,7 @@ void main() {
test
(
'test filtering formatter, deny mode (deprecated names)'
,
()
{
final
TextEditingValue
actualValue
=
BlacklistingTextInputFormatter
(
RegExp
(
r'[a-z]'
))
FilteringTextInputFormatter
.
deny
(
RegExp
(
r'[a-z]'
))
.
formatEditUpdate
(
testOldValue
,
testNewValue
);
// Expecting
...
...
@@ -134,7 +134,7 @@ void main() {
test
(
'test single line formatter (deprecated names)'
,
()
{
final
TextEditingValue
actualValue
=
Blacklist
ingTextInputFormatter
.
singleLineFormatter
Filter
ingTextInputFormatter
.
singleLineFormatter
.
formatEditUpdate
(
testOldValue
,
testNewValue
);
// Expecting
...
...
@@ -166,7 +166,7 @@ void main() {
test
(
'test filtering formatter, allow mode (deprecated names)'
,
()
{
final
TextEditingValue
actualValue
=
WhitelistingTextInputFormatter
(
RegExp
(
r'[a-c]'
))
FilteringTextInputFormatter
.
allow
(
RegExp
(
r'[a-c]'
))
.
formatEditUpdate
(
testOldValue
,
testNewValue
);
// Expecting
...
...
@@ -198,7 +198,7 @@ void main() {
test
(
'test digits only formatter (deprecated names)'
,
()
{
final
TextEditingValue
actualValue
=
Whitelist
ingTextInputFormatter
.
digitsOnly
Filter
ingTextInputFormatter
.
digitsOnly
.
formatEditUpdate
(
testOldValue
,
testNewValue
);
// Expecting
...
...
@@ -528,7 +528,7 @@ void main() {
const
TextEditingValue
oldValue
=
TextEditingValue
(
text:
'12345'
);
const
TextEditingValue
newValue
=
TextEditingValue
(
text:
'12345@'
);
final
WhitelistingTextInputFormatter
formatter
=
Whitelist
ingTextInputFormatter
.
digitsOnly
;
final
TextInputFormatter
formatter
=
Filter
ingTextInputFormatter
.
digitsOnly
;
final
TextEditingValue
formatted
=
formatter
.
formatEditUpdate
(
oldValue
,
newValue
);
// assert that we are passing digits only at the first time
...
...
@@ -583,8 +583,8 @@ void main() {
TextEditingValue
oldValue
=
collapsedValue
(
'123'
,
0
);
TextEditingValue
newValue
=
collapsedValue
(
'123456'
,
6
);
final
Whitelisting
TextInputFormatter
formatter
=
Whitelist
ingTextInputFormatter
.
digitsOnly
;
final
TextInputFormatter
formatter
=
Filter
ingTextInputFormatter
.
digitsOnly
;
TextEditingValue
formatted
=
formatter
.
formatEditUpdate
(
oldValue
,
newValue
);
...
...
packages/flutter/test/widgets/stack_test.dart
View file @
0a130100
...
...
@@ -453,7 +453,6 @@ void main() {
textDirection:
TextDirection
.
ltr
,
child:
Center
(
child:
Stack
(
overflow:
Overflow
.
visible
,
clipBehavior:
Clip
.
none
,
children:
const
<
Widget
>[
SizedBox
(
...
...
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