Unverified Commit 8473da22 authored by Taha Tesser's avatar Taha Tesser Committed by GitHub

Fix `Slider` semantic node size (#115285)

parent 333397a0
......@@ -290,7 +290,7 @@ void main() {
});
testWidgets('SemanticsDebugger slider', (WidgetTester tester) async {
double value = 0.75;
double value = 0.50;
await tester.pumpWidget(
Directionality(
......@@ -322,7 +322,7 @@ void main() {
// interpreted as a gesture by the semantics debugger and sent to the widget
// as a semantic action that always moves by 10% of the complete track.
await tester.fling(find.byType(Slider), const Offset(-100.0, 0.0), 2000.0, warnIfMissed: false); // hitting the debugger
expect(value, equals(0.70));
expect(value, equals(0.45));
});
testWidgets('SemanticsDebugger checkbox', (WidgetTester tester) async {
......
......@@ -865,7 +865,7 @@ void main() {
await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget()));
// We're expecting the traversal to start where the slider is.
final List<Matcher> expectedMatchers = <Matcher>[...fullTraversalMatchers]..removeRange(0, 8);
final List<Matcher> expectedMatchers = <Matcher>[...fullTraversalMatchers]..removeRange(0, 7);
expect(
tester.semantics.simulatedAccessibilityTraversal(start: find.byType(Slider)),
......@@ -887,7 +887,7 @@ void main() {
await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget()));
// We're expecting the traversal to end where the slider is, inclusive.
final Iterable<Matcher> expectedMatchers = <Matcher>[...fullTraversalMatchers].getRange(0, 9);
final Iterable<Matcher> expectedMatchers = <Matcher>[...fullTraversalMatchers].getRange(0, 8);
expect(
tester.semantics.simulatedAccessibilityTraversal(end: find.byType(Slider)),
......@@ -909,7 +909,7 @@ void main() {
await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget()));
// We're expecting the traversal to start at the text field and end at the slider.
final Iterable<Matcher> expectedMatchers = <Matcher>[...fullTraversalMatchers].getRange(1, 9);
final Iterable<Matcher> expectedMatchers = <Matcher>[...fullTraversalMatchers].getRange(1, 8);
expect(
tester.semantics.simulatedAccessibilityTraversal(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment