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
06314a07
Unverified
Commit
06314a07
authored
Apr 21, 2022
by
LongCatIsLooong
Committed by
GitHub
Apr 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put `waitFor` back in keyboard_textfield_test integration test (#102315)
parent
b63689de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
21 deletions
+7
-21
keyboard_textfield.dart
dev/integration_tests/ui/lib/keyboard_textfield.dart
+3
-4
keyboard_textfield_test.dart
...gration_tests/ui/test_driver/keyboard_textfield_test.dart
+4
-17
No files found.
dev/integration_tests/ui/lib/keyboard_textfield.dart
View file @
06314a07
...
...
@@ -62,11 +62,10 @@ class _MyHomePageState extends State<MyHomePage> {
Text
(
'
$offset
'
,
key:
const
ValueKey
<
String
>(
keys
.
kOffsetText
),
),
Text
(
isSoftKeyboardVisible
?
'keyboard visible'
:
'keyboard hidden
'
,
key:
const
ValueKey
<
String
>(
keys
.
kKeyboardVisibleView
),
if
(
isSoftKeyboardVisible
)
const
Text
(
'keyboard visible
'
,
key:
ValueKey
<
String
>(
keys
.
kKeyboardVisibleView
),
),
const
ElevatedButton
(
onPressed:
debugDumpApp
,
child:
Text
(
'dump app'
)),
Expanded
(
child:
ListView
(
key:
const
ValueKey
<
String
>(
keys
.
kListView
),
...
...
dev/integration_tests/ui/test_driver/keyboard_textfield_test.dart
View file @
06314a07
...
...
@@ -40,23 +40,10 @@ void main() {
// Bring up keyboard
await
driver
.
tap
(
textFieldFinder
);
const
int
keyboardTimeout
=
3
;
bool
keyboardVisible
=
false
;
for
(
int
i
=
0
;
i
<
keyboardTimeout
;
i
++)
{
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
1
));
final
String
keyboardVisibilityText
=
await
driver
.
getText
(
keyboardVisibilityIndicatorFinder
);
keyboardVisible
=
keyboardVisibilityText
==
'keyboard visible'
;
if
(
keyboardVisible
)
{
break
;
}
}
if
(!
keyboardVisible
)
{
await
driver
.
tap
(
find
.
text
(
'dump app'
));
}
// TODO(jmagman): Remove timeout once flake has been diagnosed. https://github.com/flutter/flutter/issues/96787
expect
(
keyboardVisible
,
isTrue
);
// The blinking cursor may have animation. Do not wait for it to finish.
await
driver
.
runUnsynchronized
(()
async
{
await
driver
.
waitFor
(
keyboardVisibilityIndicatorFinder
);
});
// Ensure that TextField is visible again
await
driver
.
waitFor
(
textFieldFinder
);
...
...
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