mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-14 03:32:23 +01:00
Made build portable
This commit is contained in:
38
dependencies/fluent_ui-3.12.0/test/radio_button_test.dart
vendored
Normal file
38
dependencies/fluent_ui-3.12.0/test/radio_button_test.dart
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'app_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('RadioButton change state accordingly',
|
||||
(WidgetTester tester) async {
|
||||
bool radioButtonValue = false;
|
||||
|
||||
await tester.pumpWidget(
|
||||
StatefulBuilder(
|
||||
builder: (BuildContext context, StateSetter setState) {
|
||||
return wrapApp(
|
||||
child: RadioButton(
|
||||
checked: radioButtonValue,
|
||||
onChanged: (bool value) {
|
||||
setState(() {
|
||||
radioButtonValue = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
expect(tester.widget<RadioButton>(find.byType(RadioButton)).checked, false);
|
||||
|
||||
await tester.tap(find.byType(RadioButton));
|
||||
await tester.pumpAndSettle();
|
||||
expect(radioButtonValue, true);
|
||||
|
||||
await tester.tap(find.byType(RadioButton));
|
||||
await tester.pumpAndSettle();
|
||||
expect(radioButtonValue, false);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user