Unverified Commit a1097d70 authored by TheBirb's avatar TheBirb Committed by GitHub

Added tests (#62635)

parent bebd7944
...@@ -674,6 +674,7 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin { ...@@ -674,6 +674,7 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin {
), ),
Expanded( Expanded(
child: ListView( child: ListView(
physics: widget.physics,
padding: const EdgeInsets.all(24.0), padding: const EdgeInsets.all(24.0),
children: <Widget>[ children: <Widget>[
AnimatedSize( AnimatedSize(
......
...@@ -817,4 +817,33 @@ void main() { ...@@ -817,4 +817,33 @@ void main() {
expect(buttonMaterial('CANCEL').color.value, 0); expect(buttonMaterial('CANCEL').color.value, 0);
expect(buttonMaterial('CANCEL').textStyle.color.value, 0x61ffffff); expect(buttonMaterial('CANCEL').textStyle.color.value, 0x61ffffff);
}); });
testWidgets('Vertical and Horizontal Stepper physics test', (WidgetTester tester) async {
const ScrollPhysics physics = NeverScrollableScrollPhysics();
for(final StepperType type in StepperType.values) {
await tester.pumpWidget(
MaterialApp(
home: Material(
child: Stepper(
physics: physics,
type: type,
steps: const <Step>[
Step(
title: Text('Step 1'),
content: SizedBox(
width: 100.0,
height: 100.0,
),
),
],
),
),
),
);
final ListView listView = tester.widget<ListView>(find.descendant(of: find.byType(Stepper), matching: find.byType(ListView)));
expect(listView.physics, physics);
}
});
} }
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