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
11e7dfbe
Commit
11e7dfbe
authored
Sep 30, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port input_test to fn3
parent
347bd25c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
input_test.dart
packages/unit/test/widget/input_test.dart
+7
-8
No files found.
packages/unit/test/widget/input_test.dart
View file @
11e7dfbe
...
...
@@ -2,10 +2,10 @@ import 'package:mojo_services/keyboard/keyboard.mojom.dart';
import
'package:quiver/testing/async.dart'
;
import
'package:sky/rendering.dart'
;
import
'package:sky/services.dart'
;
import
'package:sky/widgets.dart'
;
import
'package:sky/widgets
_next
.dart'
;
import
'package:test/test.dart'
;
import
'widget_tester.dart'
;
import
'
../fn3/
widget_tester.dart'
;
import
'../services/mock_services.dart'
;
class
MockKeyboard
implements
KeyboardService
{
...
...
@@ -40,9 +40,9 @@ void main() {
);
}
tester
.
pumpFrame
(
builder
);
tester
.
pumpFrame
(
builder
()
);
Input
input
=
tester
.
findWidget
((
Widget
widget
)
=>
widget
.
key
==
inputKey
);
Element
input
=
tester
.
findElementByKey
(
inputKey
);
Size
emptyInputSize
=
(
input
.
renderObject
as
RenderBox
).
size
;
// Simulate entry of text through the keyboard.
...
...
@@ -53,7 +53,7 @@ void main() {
// Check that the onChanged event handler fired.
expect
(
inputValue
,
equals
(
testValue
));
tester
.
pumpFrame
(
builder
);
tester
.
pumpFrame
(
builder
()
);
// Check that the Input with text has the same size as the empty Input.
expect
((
input
.
renderObject
as
RenderBox
).
size
,
equals
(
emptyInputSize
));
...
...
@@ -74,10 +74,9 @@ void main() {
}
new
FakeAsync
().
run
((
async
)
{
tester
.
pumpFrame
(
builder
);
tester
.
pumpFrame
(
builder
()
);
EditableText
editableText
=
tester
.
findWidget
(
(
Widget
widget
)
=>
widget
is
EditableText
);
EditableTextState
editableText
=
tester
.
findStateOfType
(
EditableTextState
);
// Check that the cursor visibility toggles after each blink interval.
void
checkCursorToggle
()
{
...
...
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