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() { ...@@ -290,7 +290,7 @@ void main() {
}); });
testWidgets('SemanticsDebugger slider', (WidgetTester tester) async { testWidgets('SemanticsDebugger slider', (WidgetTester tester) async {
double value = 0.75; double value = 0.50;
await tester.pumpWidget( await tester.pumpWidget(
Directionality( Directionality(
...@@ -322,7 +322,7 @@ void main() { ...@@ -322,7 +322,7 @@ void main() {
// interpreted as a gesture by the semantics debugger and sent to the widget // 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. // 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 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 { testWidgets('SemanticsDebugger checkbox', (WidgetTester tester) async {
......
...@@ -865,7 +865,7 @@ void main() { ...@@ -865,7 +865,7 @@ void main() {
await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget())); await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget()));
// We're expecting the traversal to start where the slider is. // 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( expect(
tester.semantics.simulatedAccessibilityTraversal(start: find.byType(Slider)), tester.semantics.simulatedAccessibilityTraversal(start: find.byType(Slider)),
...@@ -887,7 +887,7 @@ void main() { ...@@ -887,7 +887,7 @@ void main() {
await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget())); await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget()));
// We're expecting the traversal to end where the slider is, inclusive. // 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( expect(
tester.semantics.simulatedAccessibilityTraversal(end: find.byType(Slider)), tester.semantics.simulatedAccessibilityTraversal(end: find.byType(Slider)),
...@@ -909,7 +909,7 @@ void main() { ...@@ -909,7 +909,7 @@ void main() {
await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget())); await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget()));
// We're expecting the traversal to start at the text field and end at the slider. // 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( expect(
tester.semantics.simulatedAccessibilityTraversal( 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