Skip to content

Instantly share code, notes, and snippets.

@enzoftware
Created July 3, 2021 03:52
Show Gist options
  • Save enzoftware/2556855fcbe9410616bc21fb92aedb0f to your computer and use it in GitHub Desktop.
Save enzoftware/2556855fcbe9410616bc21fb92aedb0f to your computer and use it in GitHub Desktop.
//1
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:flutter_transaction_tracker/main.dart';
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
// 2
testWidgets('bySemanticsLabel test', (WidgetTester tester) async {
// 3
await tester.pumpWidget(const TransactionTrackerApp());
// 4
await tester.pumpAndSettle();
// 5
expect(find.bySemanticsLabel(RegExp('Transaction')), findsNWidgets(3));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment