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
9ecb4ce9
Unverified
Commit
9ecb4ce9
authored
Nov 09, 2018
by
Jonah Williams
Committed by
GitHub
Nov 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove deprecated testing members (#24115)
parent
ae2b215e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
187 deletions
+0
-187
matchers.dart
packages/flutter_test/lib/src/matchers.dart
+0
-163
widget_tester.dart
packages/flutter_test/lib/src/widget_tester.dart
+0
-24
No files found.
packages/flutter_test/lib/src/matchers.dart
View file @
9ecb4ce9
...
...
@@ -509,169 +509,6 @@ Matcher matchesSemantics({
);
}
/// DEPRECATED: use [matchesSemantics] instead.
@Deprecated
(
'use matchesSemantics instead'
)
Matcher
matchesSemanticsData
(
{
String
label
,
String
hint
,
String
value
,
String
increasedValue
,
String
decreasedValue
,
TextDirection
textDirection
,
Rect
rect
,
Size
size
,
// Flags //
bool
hasCheckedState
=
false
,
bool
isChecked
=
false
,
bool
isSelected
=
false
,
bool
isButton
=
false
,
bool
isFocused
=
false
,
bool
isTextField
=
false
,
bool
hasEnabledState
=
false
,
bool
isEnabled
=
false
,
bool
isInMutuallyExclusiveGroup
=
false
,
bool
isHeader
=
false
,
bool
isObscured
=
false
,
bool
namesRoute
=
false
,
bool
scopesRoute
=
false
,
bool
isHidden
=
false
,
bool
isImage
=
false
,
bool
isLiveRegion
=
false
,
bool
hasToggledState
=
false
,
bool
isToggled
=
false
,
bool
hasImplicitScrolling
=
false
,
// Actions //
bool
hasTapAction
=
false
,
bool
hasLongPressAction
=
false
,
bool
hasScrollLeftAction
=
false
,
bool
hasScrollRightAction
=
false
,
bool
hasScrollUpAction
=
false
,
bool
hasScrollDownAction
=
false
,
bool
hasIncreaseAction
=
false
,
bool
hasDecreaseAction
=
false
,
bool
hasShowOnScreenAction
=
false
,
bool
hasMoveCursorForwardByCharacterAction
=
false
,
bool
hasMoveCursorBackwardByCharacterAction
=
false
,
bool
hasMoveCursorForwardByWordAction
=
false
,
bool
hasMoveCursorBackwardByWordAction
=
false
,
bool
hasSetSelectionAction
=
false
,
bool
hasCopyAction
=
false
,
bool
hasCutAction
=
false
,
bool
hasPasteAction
=
false
,
bool
hasDidGainAccessibilityFocusAction
=
false
,
bool
hasDidLoseAccessibilityFocusAction
=
false
,
bool
hasDismissAction
=
false
,
// Custom actions and overrides
String
onTapHint
,
String
onLongPressHint
,
List
<
CustomSemanticsAction
>
customActions
,
})
{
final
List
<
SemanticsFlag
>
flags
=
<
SemanticsFlag
>[];
if
(
hasCheckedState
)
flags
.
add
(
SemanticsFlag
.
hasCheckedState
);
if
(
isChecked
)
flags
.
add
(
SemanticsFlag
.
isChecked
);
if
(
isSelected
)
flags
.
add
(
SemanticsFlag
.
isSelected
);
if
(
isButton
)
flags
.
add
(
SemanticsFlag
.
isButton
);
if
(
isTextField
)
flags
.
add
(
SemanticsFlag
.
isTextField
);
if
(
isFocused
)
flags
.
add
(
SemanticsFlag
.
isFocused
);
if
(
hasEnabledState
)
flags
.
add
(
SemanticsFlag
.
hasEnabledState
);
if
(
isEnabled
)
flags
.
add
(
SemanticsFlag
.
isEnabled
);
if
(
isInMutuallyExclusiveGroup
)
flags
.
add
(
SemanticsFlag
.
isInMutuallyExclusiveGroup
);
if
(
isHeader
)
flags
.
add
(
SemanticsFlag
.
isHeader
);
if
(
isObscured
)
flags
.
add
(
SemanticsFlag
.
isObscured
);
if
(
namesRoute
)
flags
.
add
(
SemanticsFlag
.
namesRoute
);
if
(
scopesRoute
)
flags
.
add
(
SemanticsFlag
.
scopesRoute
);
if
(
isHidden
)
flags
.
add
(
SemanticsFlag
.
isHidden
);
if
(
isImage
)
flags
.
add
(
SemanticsFlag
.
isImage
);
if
(
isLiveRegion
)
flags
.
add
(
SemanticsFlag
.
isLiveRegion
);
if
(
hasToggledState
)
flags
.
add
(
SemanticsFlag
.
hasToggledState
);
if
(
isToggled
)
flags
.
add
(
SemanticsFlag
.
isToggled
);
if
(
hasImplicitScrolling
)
flags
.
add
(
SemanticsFlag
.
hasImplicitScrolling
);
final
List
<
SemanticsAction
>
actions
=
<
SemanticsAction
>[];
if
(
hasTapAction
)
actions
.
add
(
SemanticsAction
.
tap
);
if
(
hasLongPressAction
)
actions
.
add
(
SemanticsAction
.
longPress
);
if
(
hasScrollLeftAction
)
actions
.
add
(
SemanticsAction
.
scrollLeft
);
if
(
hasScrollRightAction
)
actions
.
add
(
SemanticsAction
.
scrollRight
);
if
(
hasScrollUpAction
)
actions
.
add
(
SemanticsAction
.
scrollUp
);
if
(
hasScrollDownAction
)
actions
.
add
(
SemanticsAction
.
scrollDown
);
if
(
hasIncreaseAction
)
actions
.
add
(
SemanticsAction
.
increase
);
if
(
hasDecreaseAction
)
actions
.
add
(
SemanticsAction
.
decrease
);
if
(
hasShowOnScreenAction
)
actions
.
add
(
SemanticsAction
.
showOnScreen
);
if
(
hasMoveCursorForwardByCharacterAction
)
actions
.
add
(
SemanticsAction
.
moveCursorForwardByCharacter
);
if
(
hasMoveCursorBackwardByCharacterAction
)
actions
.
add
(
SemanticsAction
.
moveCursorBackwardByCharacter
);
if
(
hasSetSelectionAction
)
actions
.
add
(
SemanticsAction
.
setSelection
);
if
(
hasCopyAction
)
actions
.
add
(
SemanticsAction
.
copy
);
if
(
hasCutAction
)
actions
.
add
(
SemanticsAction
.
cut
);
if
(
hasPasteAction
)
actions
.
add
(
SemanticsAction
.
paste
);
if
(
hasDidGainAccessibilityFocusAction
)
actions
.
add
(
SemanticsAction
.
didGainAccessibilityFocus
);
if
(
hasDidLoseAccessibilityFocusAction
)
actions
.
add
(
SemanticsAction
.
didLoseAccessibilityFocus
);
if
(
customActions
!=
null
&&
customActions
.
isNotEmpty
)
actions
.
add
(
SemanticsAction
.
customAction
);
if
(
hasDismissAction
)
actions
.
add
(
SemanticsAction
.
dismiss
);
if
(
hasMoveCursorForwardByWordAction
)
actions
.
add
(
SemanticsAction
.
moveCursorForwardByWord
);
if
(
hasMoveCursorBackwardByWordAction
)
actions
.
add
(
SemanticsAction
.
moveCursorBackwardByWord
);
SemanticsHintOverrides
hintOverrides
;
if
(
onTapHint
!=
null
||
onLongPressHint
!=
null
)
hintOverrides
=
SemanticsHintOverrides
(
onTapHint:
onTapHint
,
onLongPressHint:
onLongPressHint
,
);
return
_MatchesSemanticsData
(
label:
label
,
hint:
hint
,
value:
value
,
increasedValue:
increasedValue
,
decreasedValue:
decreasedValue
,
actions:
actions
,
flags:
flags
,
textDirection:
textDirection
,
rect:
rect
,
size:
size
,
customActions:
customActions
,
hintOverrides:
hintOverrides
,
);
}
/// Asserts that the currently rendered widget meets the provided accessibility
/// `guideline`.
///
...
...
packages/flutter_test/lib/src/widget_tester.dart
View file @
9ecb4ce9
...
...
@@ -647,30 +647,6 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker
return
result
;
}
/// DEPRECATED: use [getSemantics] instead.
@Deprecated
(
'use getSemantics instead'
)
SemanticsData
getSemanticsData
(
Finder
finder
)
{
if
(
binding
.
pipelineOwner
.
semanticsOwner
==
null
)
throw
StateError
(
'Semantics are not enabled.'
);
final
Iterable
<
Element
>
candidates
=
finder
.
evaluate
();
if
(
candidates
.
isEmpty
)
{
throw
StateError
(
'Finder returned no matching elements.'
);
}
if
(
candidates
.
length
>
1
)
{
throw
StateError
(
'Finder returned more than one element.'
);
}
final
Element
element
=
candidates
.
single
;
RenderObject
renderObject
=
element
.
findRenderObject
();
SemanticsNode
result
=
renderObject
.
debugSemantics
;
while
(
renderObject
!=
null
&&
result
==
null
)
{
renderObject
=
renderObject
?.
parent
;
result
=
renderObject
?.
debugSemantics
;
}
if
(
result
==
null
)
throw
StateError
(
'No Semantics data found.'
);
return
result
.
getSemanticsData
();
}
/// Enable semantics in a test by creating a [SemanticsHandle].
///
/// The handle must be disposed at the end of the test.
...
...
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