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
213f766e
Unverified
Commit
213f766e
authored
Feb 08, 2022
by
LongCatIsLooong
Committed by
GitHub
Feb 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ValueKey finder instead of text finder in keyboard_textfield_test (#97996)
parent
3f7d997c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
keyboard_textfield.dart
dev/integration_tests/ui/lib/keyboard_textfield.dart
+5
-4
keys.dart
dev/integration_tests/ui/lib/keys.dart
+1
-0
keyboard_textfield_test.dart
...gration_tests/ui/test_driver/keyboard_textfield_test.dart
+1
-1
No files found.
dev/integration_tests/ui/lib/keyboard_textfield.dart
View file @
213f766e
...
...
@@ -55,16 +55,17 @@ class _MyHomePageState extends State<MyHomePage> {
@override
Widget
build
(
BuildContext
context
)
{
final
String
softKeyboardVisibility
=
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
>
100
?
'keyboard visible'
:
'keyboard not visible'
;
final
bool
isSoftKeyboardVisible
=
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
>
100
;
return
Scaffold
(
body:
Column
(
children:
<
Widget
>[
Text
(
'
$offset
'
,
key:
const
ValueKey
<
String
>(
keys
.
kOffsetText
),
),
Text
(
softKeyboardVisibility
),
if
(
isSoftKeyboardVisible
)
const
Text
(
'keyboard visible'
,
key:
ValueKey
<
String
>(
keys
.
kKeyboardVisibleView
),
),
Expanded
(
child:
ListView
(
key:
const
ValueKey
<
String
>(
keys
.
kListView
),
...
...
dev/integration_tests/ui/lib/keys.dart
View file @
213f766e
...
...
@@ -7,3 +7,4 @@ const String kHeightText = 'height_text';
const
String
kUnfocusButton
=
'unfocus_button'
;
const
String
kOffsetText
=
'offset_text'
;
const
String
kListView
=
'list_view'
;
const
String
kKeyboardVisibleView
=
'keyboard_visible'
;
dev/integration_tests/ui/test_driver/keyboard_textfield_test.dart
View file @
213f766e
...
...
@@ -24,7 +24,7 @@ void main() {
final
SerializableFinder
listViewFinder
=
find
.
byValueKey
(
keys
.
kListView
);
final
SerializableFinder
textFieldFinder
=
find
.
byValueKey
(
keys
.
kDefaultTextField
);
final
SerializableFinder
offsetFinder
=
find
.
byValueKey
(
keys
.
kOffsetText
);
final
SerializableFinder
keyboardVisibilityIndicatorFinder
=
find
.
text
(
'keyboard visible'
);
final
SerializableFinder
keyboardVisibilityIndicatorFinder
=
find
.
byValueKey
(
keys
.
kKeyboardVisibleView
);
// Align TextField with bottom edge to ensure it would be covered when keyboard comes up.
await
driver
.
waitForAbsent
(
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