testing has commenced
adding accessibility options now
This commit is contained in:
parent
ff7cdf4907
commit
d0defec7d6
2 changed files with 8 additions and 10 deletions
|
@ -470,6 +470,7 @@ class ReceiptPage2State extends State<ReceiptPage2> {
|
|||
}
|
||||
},
|
||||
child: Text("GO",
|
||||
key: Key("goButton"),
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontSize: 22.0)),
|
||||
color: Colors.blue,
|
||||
|
|
|
@ -11,20 +11,17 @@ import 'package:flutter_test/flutter_test.dart';
|
|||
import 'package:local_spend/main.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||
|
||||
testWidgets('GO button repetition test', (WidgetTester tester) async {
|
||||
// Build our app and trigger a frame.
|
||||
await tester.pumpWidget(MyApp());
|
||||
|
||||
// Verify that our counter starts at 0.
|
||||
expect(find.text('0'), findsOneWidget);
|
||||
expect(find.text('1'), findsNothing);
|
||||
|
||||
// Tap the '+' icon and trigger a frame.
|
||||
await tester.tap(find.byIcon(Icons.add));
|
||||
// Tap the GO button and trigger a frame.
|
||||
await tester.tap(find.byKey(Key("goButton")));
|
||||
await tester.pump();
|
||||
|
||||
// Verify that our counter has incremented.
|
||||
expect(find.text('0'), findsNothing);
|
||||
expect(find.text('1'), findsOneWidget);
|
||||
// Verify that the dialog has shown
|
||||
// expect(find.text('GO'), findsNothing);
|
||||
// expect(find.text('Invalid data'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
|
|
Reference in a new issue